Bug 4239 - tlstunnel occasionally leaves behind zombie processes
Summary: tlstunnel occasionally leaves behind zombie processes
Status: CLOSED FIXED
Alias: None
Product: ThinLinc
Classification: Unclassified
Component: Web Administration (show other bugs)
Version: 3.3.0
Hardware: PC Unknown
: P2 Normal
Target Milestone: 4.1.1
Assignee: Aaron Sowry
URL:
Keywords: hean01_tester, prosaic
Depends on:
Blocks:
 
Reported: 2012-03-26 10:00 CEST by Aaron Sowry
Modified: 2013-10-24 10:50 CEST (History)
2 users (show)

See Also:
Acceptance Criteria:


Attachments

Description Aaron Sowry cendio 2012-03-26 10:00:14 CEST
See issue 13173 for details; we should make sure that tlstunnel waits on its children properly.
Comment 1 Aaron Sowry cendio 2012-06-07 14:16:14 CEST
Noticed this on castro too with 3.3.0.
Comment 2 Aaron Sowry cendio 2013-07-26 13:43:58 CEST
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 Aaron Sowry cendio 2013-07-26 14:58:38 CEST
(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 Aaron Sowry cendio 2013-07-26 15:51:52 CEST
Created attachment 484 [details]
Suggested patch to avoid having to wait on child processes
Comment 5 Aaron Sowry cendio 2013-07-30 11:38:46 CEST
r27743
Comment 6 Henrik Andersson cendio 2013-10-11 10:50:36 CEST
Verified and works as expected on SLED11 Sp2 ThinLinc build 4110.
Tested both webadmin and webaccess.

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