Killing plots.py does not kill inference subprocesses
hyanwong opened this issue · comments
If an inference subprocess stalls, and the main plots.py routine is killed, the inference subprocess carries on running. When the main process is killed, it should probably kill all child processes too. Is there an easy way to do this, @jeromekelleher ?
Using ctrl-D instead of ctrl-C is the easy way to do this @hyanwong. I'm not sure why, but it kills all child processes as well as the main process.
Ah, thanks!
How do I debug a subprocess? I have a seemingly hanging tsinfer process (see my email)
The trick with subprocesses is to get things working properly with a -p=1 first (which doesn't invoke any subprocesses) and then try it with many processes. Tracing errors is tricky with subprocesses.
I wasn't able to reproduce your issue with hanging tsinfer.
Ah yes, that's true. I thought you were talking about worker processes.
Reopening, as Cntl-D doesn't terminate the process on my machine.
I've just pushed a change that might help. It's a bit messy, but if you hit CTRL-C now it should clean up all descendant processes.
OK, seems to work. closing