When neutorn server starts, it will spawn two green threads for rpc and api. If multi rpc workers and api workers are configured, each green thread will fork several child processes to handle the requests, then os.waitpid(0, os.WNOHANG) is called so if one child process exits, it can restart the child process to guarantee the number of running workers.
Here comes the problem, both rpc and api green thread will maintain a list of pid of the child processes they fork, only when the pid return from os.waitpid is in the list, the child process will be restarted. But since rpc and api green thread are in the same parent process, there is one scenario that rpc green thread get a pid from os.waitpid which is forked by api green thread, of course this pid is not in the pid list of rpc green thread, so it will not restart the child process and there is no chance the child process can be restarted.
Change abandoned by Armando Migliaccio (<email address hidden>) on branch: master /review. openstack. org/130707
Review: https:/
Reason: As per Oleg, comment this is dead in the water