Here's one more theory - Lifeless noticed correctly that "_start_child in service.py is leaky" but that really should not matter because child processes should die if the parent dies an unexpected death (from openstack/common/service.py):
# Reopen the eventlet hub to make sure we don't share an epoll
# fd with parent and/or siblings, which would be bad eventlet.hubs.use_hub()
# Close write to ensure only parent has it open os.close(self.writepipe)
# Create greenthread to watch for parent to close pipe eventlet.spawn_n(self._pipe_watcher)
and the _pipe_watcher method:
def _pipe_watcher(self):
# This will block until the write end is closed when the parent
# dies unexpectedly self.readpipe.read()
LOG.info(_LI('Parent process has died unexpectedly, exiting'))
sys.exit(1)
interesting bit is that it will only raise a SystemExit (not sure why it doesn't do the os._exit there) in a fork of a testr process that might actually be handling it in some way that can cause unexpected behavior?
Here's one more theory - Lifeless noticed correctly that "_start_child in service.py is leaky" but that really should not matter because child processes should die if the parent dies an unexpected death (from openstack/ common/ service. py):
This bit happens in the forked worker:
def _child_ process( self, service):
self._ child_process_ handle_ signal( )
# Reopen the eventlet hub to make sure we don't share an epoll
eventlet. hubs.use_ hub()
# fd with parent and/or siblings, which would be bad
# Close write to ensure only parent has it open
os.close( self.writepipe)
eventlet. spawn_n( self._pipe_ watcher)
# Create greenthread to watch for parent to close pipe
and the _pipe_watcher method:
def _pipe_watcher( self):
self.readpipe. read()
# This will block until the write end is closed when the parent
# dies unexpectedly
sys.exit(1)
interesting bit is that it will only raise a SystemExit (not sure why it doesn't do the os._exit there) in a fork of a testr process that might actually be handling it in some way that can cause unexpected behavior?