<meta http-equiv="Content-Type" content="text/html; charset=utf-8"><div>Dear all,</div><br><div>My MPI application spawns a large number of MPI processes using MPI_Comm_spawn over its total lifetime. Unfortunately, I have experienced that this results in zombie processes of hydra_pmi_proxy accumulating over time. As a result, my MPI application will eventually crash because there are too many zombie processes and no new processes can be created.</div><br><div>This issue does not seem to be new; I have found references to similar issues in at least three different places:</div><br><div>- <a href="https://lists.mpich.org/pipermail/discuss/2013-March/000599.html" title="https://lists.mpich.org/pipermail/discuss/2013-March/000599.html">[mpich-discuss] MPI_Comm_Spawn causing zombies of hydra_pmi_proxy</a> (March 2013)</div><div>- <a href="https://github.com/pmodels/mpich/issues/1677" title="https://github.com/pmodels/mpich/issues/1677">[GitHub issue] hydra_pmi_proxy zombie MPI_comm_spawn #1677</a> (October 2016)</div><div>- <a href="https://groups.google.com/forum/#!msg/mpi4py/A9mN-2UkFf8/2gnUEtArDwAJ" title="https://groups.google.com/forum/#!msg/mpi4py/A9mN-2UkFf8/2gnUEtArDwAJ">[Google Groups] Hanging in spawn in master-slave code and hydra_pmi_proxy zombies</a> (December 2016)</div><div>In the first reference, a dirty fix was proposed by Silvan Brändli to simply reap all the zombie processes in a loop at the start of the function HYDU_create_process in src/pm/hydra/utils/launch/launch.c. However, I have found that this comes with its own set of problems and makes my MPI application unstable.</div><br><div>In the GitHub issue, the problem was marked as "worksforme". However, this problem persists for me and other machines that I have tried to reproduce it on, so it clearly has not yet been resolved.</div><br><div>In the Google Groups thread, the problem was "resolved" by avoiding spawning MPI processes entirely, which is not an option in my case.</div><br><div>Pavan Balaji mentions in the 2013 mpi-discuss thread that this issue was a problem "once upon a time". It seems to have risen from the dead again.</div><br><div>I have attached a short and self-contained program written in C that reproduces the problem. The program simply spawns child processes using MPI_Comm_spawn in an infinite loop, where each child process exits after writing a message to stdout. I use MPI_Comm_disconnect to disconnect the Intercommunicator, but the same problem occurs when using MPI_Comm_free instead.</div><br><div>I have also attached the logfiles generated while building MPICH, as described in the README, except for the file mpich-3.2.1/src/pm/hydra/tools/topo/hwloc/hwloc/config.log, as that was missing. I am using MPICH version 3.2.1, which is the latest stable release at the time of writing.</div><br><div>Thanks in advance for your help!</div><br><div>Best wishes,</div><div>Thomas Pak</div>