Comment 76 for bug 73536

Revision history for this message
In , Gbrown-s (gbrown-s) wrote :

Comment on attachment 8963553
Bug 336193 - P2: Use a second SIGTERM in killPid() to ensure parent process is killed.

https://reviewboard.mozilla.org/r/232486/#review237940

r+ with improved logging.

It seems odd that this is the only place in our test automation requiring this change. Other test harnesses have similar measures in place to ensure the browser is killed. Do none of them use sigterm?

::: testing/mochitest/runtests.py:344
(Diff revision 1)
> for p in gone:
> log.info('psutil found pid %s dead' % p.pid)
> for p in alive:
> log.info('failed to kill pid %d after 30s' % p.pid)
> + # Try again, second SIGTERM is more forceful
> + p.send_signal(signal.SIGTERM)

It is important for debugging intermittent failures that logging accurately identifies when a process cannot be killed.
I suggest you add another wait_procs call after the second sigterm and log its results before exiting killPid.