salt icon indicating copy to clipboard operation
salt copied to clipboard

OSError 'No child processes' in multiprocessing/forking.py

Open l2ol33rt opened this issue 13 years ago • 9 comments

On Oracle Linux 5.9 the salt-minion displays an OSError when the tune_in method is called.

Trackback:

[CRITICAL] Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/salt/minion.py", line 792, in tune_in
    multiprocessing.active_children()
  File "/usr/lib64/python2.6/multiprocessing/process.py", line 43, in active_children
    _cleanup()
  File "/usr/lib64/python2.6/multiprocessing/process.py", line 53, in _cleanup
    if p._popen.poll() is not None:
  File "/usr/lib64/python2.6/multiprocessing/forking.py", line 106, in poll
    pid, sts = os.waitpid(self.pid, flag)
OSError: [Errno 10] No child processes
Platform:
Minion:
Oracle Linux 5.9
Latest Salt Dev branch 0.13.0-601-g233f7e2
zeromq-2.1.9-1.el5

Master:
CentOS 6.3
Latest Salt Dev branch 0.13.0-601-g233f7e2
zeromq-2.1.9-1.el6.x86_64

~Rob

l2ol33rt avatar Mar 08 '13 19:03 l2ol33rt

@thatch45 want me to cherry-pick my fix?

s0undt3ch avatar Mar 08 '13 19:03 s0undt3ch

This issue, goes deeper

http://stackoverflow.com/questions/1008858/popen-communicate-throws-oserror-errno-10-no-child-processes#4

s0undt3ch avatar Mar 08 '13 20:03 s0undt3ch

We need to momentarily, not handle SIGCHLD when calling communicate, but what will this trigger!?

s0undt3ch avatar Mar 08 '13 20:03 s0undt3ch

This will return us to where we were before where we would have a few zombie processes around for a few seconds until they are cleaned up.

On Fri, Mar 8, 2013 at 1:25 PM, Pedro Algarvio [email protected]:

We need to momentarily, not handle SIGCHLD when calling communicate, but what will this trigger!?

— Reply to this email directly or view it on GitHubhttps://github.com/saltstack/salt/issues/4008#issuecomment-14643569 .

Dave Boucha | Sr. Engineer

5272 South College Drive, Suite 301 | Murray, UT 84123 office 801-305-3563 [email protected] | www.saltstack.com http://saltstack.com/

UtahDave avatar Mar 08 '13 21:03 UtahDave

This issue has been fixed for python 2.7.

Two options:

  1. Force an extra dependency on python-subprocess32 for python 2.6
  2. Under python 2.6, we document and accept that some children zombies will exist within some time frames, ie, until we call multiprocessing.active_children() since we should not catch and ignore SIGCHLD.

s0undt3ch avatar Mar 09 '13 13:03 s0undt3ch

#4022 should take care of this, still, can any you of try my fix from my fork, branch issues/4008 to confirm if I addressed all problems?

s0undt3ch avatar Mar 09 '13 18:03 s0undt3ch

@s0undt3ch Ill give it a try on my dev environment later today. Thanks everyone for looking into this!

l2ol33rt avatar Mar 09 '13 19:03 l2ol33rt

This issue can be closed, current git develop is fixed.

s0undt3ch avatar Mar 11 '13 00:03 s0undt3ch

@s0undt3ch Finally was able to test this and it all looks great on my end, thanks again!

l2ol33rt avatar Mar 11 '13 17:03 l2ol33rt