[ https://issues.apache.org/jira/browse/TC-158?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Oren Shemesh resolved TC-158. ----------------------------- Resolution: Fixed Here is the commit that closes PR #295, which solves this issue: https://github.com/apache/incubator-trafficcontrol/commits/051d5f016e0bb8b5950bc6e28ebb27e48cf3a55e > daemonize() leaves parent process with bad SIGCHLD handler > ---------------------------------------------------------- > > Key: TC-158 > URL: https://issues.apache.org/jira/browse/TC-158 > Project: Traffic Control > Issue Type: Bug > Components: Traffic Ops > Affects Versions: 1.8.0, 2.0.0, 1.7.0 > Reporter: Oren Shemesh > Assignee: Oren Shemesh > Fix For: 2.0.0 > > > Daemon::daemonize() was created to allow a process to run sub-processes in > the background, without waiting for their immediate termination. > In order for terminated processes to be reaped and not become zombies, the > SIGCHLD handler in the parent should be set to IGNORE. > However, doing so in a standard process prevents it from reliably running > waitpid(), so many operations that involve forking and waiting for the forked > process return code (Such as: Sending e-mail, generating SSL keys, and any > functionality using UI::Utils->exec_command() ) become unreliable. > The problem is not easily noticed, since daemonize is currently called only > by API::Cdn::dnssec_keys_refresh(), which is being called twice every 5 > minutes. Since there are 96 TO workers by default, it takes a few hours until > most of the workers get contaminated with a bad SIGCHLD handler. > A proper solution is to use double forking in daemonize(). -- This message was sent by Atlassian JIRA (v6.3.15#6346)