Bug 4239 - tlstunnel occasionally leaves behind zombie processes
: tlstunnel occasionally leaves behind zombie processes
: ThinLinc
Web Administration
: 3.3.0
: PC Unknown
: P2 Normal
: 4.1.1
Assigned To:
  Show dependency treegraph
Reported: 2012-03-26 10:00 by
Modified: 2013-10-24 10:50 (History)
Acceptance Criteria:



You need to log in before you can comment on or make changes to this bug.

Description From cendio 2012-03-26 10:00:14
See issue 13173 for details; we should make sure that tlstunnel waits on its
children properly.
------- Comment #1 From cendio 2012-06-07 14:16:14 -------
Noticed this on castro too with 3.3.0.
------- Comment #2 From cendio 2013-07-26 13:43:58 -------
This is because tlstunnel's child handling is all kinds of broken.

Inside the main loop, we call a non-blocking waitpid() on our children, but
then call a blocking accept() call while we wait for new connections. This
means that children which exit after waitpid() but during accept() will not be
reaped until the next iteration of the loop; i.e. until a new connection is
made. After this, new zombie processes will eventually be created.

We can probably do better than this.
------- Comment #3 From cendio 2013-07-26 14:58:38 -------
(In reply to comment #2)
> We can probably do better than this.

We should either write our own SIGCHLD handler, or ignore SIGCHLD completely.
Probably the latter.
------- Comment #4 From cendio 2013-07-26 15:51:52 -------
Created an attachment (id=484) [details]
Suggested patch to avoid having to wait on child processes
------- Comment #5 From cendio 2013-07-30 11:38:46 -------
------- Comment #6 From cendio 2013-10-11 10:50:36 -------
Verified and works as expected on SLED11 Sp2 ThinLinc build 4110.
Tested both webadmin and webaccess.