This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: SocketServer.ForkingMixIn creates a zombie
Type: behavior Stage:
Components: Library (Lib) Versions: Python 2.6
process
Status: closed Resolution: wont fix
Dependencies: Superseder:
Assigned To: Nosy List: christian.heimes, gvanrossum, schmir
Priority: normal Keywords:

Created on 2008-01-28 05:51 by schmir, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Messages (4)
msg61773 - (view) Author: Ralf Schmitt (schmir) Date: 2008-01-28 05:51
collect_children is only called in process_request, so at least the last
process forked is not collected. This could be handled by calling
collect_children every X seconds or by handling SIGCHLD.
msg61787 - (view) Author: Christian Heimes (christian.heimes) * (Python committer) Date: 2008-01-28 17:55
Can you provide a patch?

Next time please fill in type, components and versions, too. :)
msg61789 - (view) Author: Guido van Rossum (gvanrossum) * (Python committer) Date: 2008-01-28 17:59
Using signals is asking for all sorts of trouble.

What is the point of collecting the last process? Having one zombie
child max as a steady state strikes me as totally acceptable.
msg61814 - (view) Author: Ralf Schmitt (schmir) Date: 2008-01-29 06:34
Well, one child isn't the maximum. All children which do not finish
before the last client connects, will live on as zombies (and will be
collected when the next client connects). If that is acceptable, then
just close this report.

Using signals would be easier if http://bugs.python.org/issue1089358
goes in. But even then a single accept call might not suffice and the
code might need to select on the listening socket and another
filedescriptor (on which the signal handler writes).

The simplest solution might be to use select with a timeout and check
for dead children periodically.

(and sorry for not filling out the complete form.)
History
Date User Action Args
2022-04-11 14:56:30adminsetgithub: 46246
2008-01-29 17:36:41gvanrossumsetstatus: open -> closed
resolution: wont fix
2008-01-29 06:34:22schmirsetmessages: + msg61814
2008-01-28 17:59:36gvanrossumsetnosy: + gvanrossum
messages: + msg61789
2008-01-28 17:55:59christian.heimessetversions: + Python 2.6
nosy: + christian.heimes
messages: + msg61787
priority: normal
components: + Library (Lib)
type: behavior
2008-01-28 05:51:18schmircreate