petersalas commented on code in PR #11094:
URL: https://github.com/apache/tvm/pull/11094#discussion_r855730149
##########
python/tvm/contrib/popen_pool.py:
##########
@@ -133,7 +139,11 @@ def kill(self):
self._proc.kill()
except OSError:
pass
+
+ # Join the child process to avoid zombie processes
+ self.join(timeout=1.0)
Review Comment:
Without it the behavior is (very) non-deterministic (TIL if the process
hasn't exited when its `__del__` runs then it gets added to a list(!) that gets
polled when future `Popen`s are created) -- but indeed it should eventually get
reaped. (Granted there's no guarantee that it exits 1s after SIGKILL either but
I was reluctant to block on it forever...)
Having spent time debugging accumulating zombie processes in the past I'm
generally loathe to leave them...but I'm good with removing it. LMK what you
think
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]