Firefox automated test harnesses should check for zombie processes
Categories
(Testing :: General, enhancement)
Tracking
(Not tracked)
People
(Reporter: jld, Unassigned)
References
Details
I'm not sure which component this belongs in, but recently we've had some issues due to Firefox creating child processes and not properly cleaning them up:
- On Unix, in bug 1697429, where processes would exit and we wouldn't call
waitpidon them (only on some build types not including normal release builds), which consumes a process ID and an uncertain amount of kernel resources. - On Windows, in bug 1440103, leaking a handle to every child process, which is similar: it leaks 64kB of unswappable kernel memory each time. This one we did ship, probably for many years, because the usual system tools don't reveal it; a third-party tool was involved in finding the bug.
These are similar conceptually, but they might end up being two different issues from the implementation side.
I filed this under testing because we already have some code to keep track of child processes and check for discrepancies (like failing to write expected log files for memory leaks), so this might fit there. In principle it should also be possible for Gecko to run this kind of check at shutdown.
We do need to run the test before the parent process exits, because that will clean up all the zombies (reparent them to init on Unix, close the handles on Windows); but checking for zombies at arbitrary times might have false positives (if it happens after a child process exits but before the parent process has finished handling it).
Description
•