This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author dmalcolm
Recipients bquinlan, dmalcolm, jnoller, kristjan.jonsson, lukasz.langa, ysj.ray
Date 2011-02-10.21:59:21
SpamBayes Score 1.663003e-11
Marked as misclassified No
Message-id <1297375162.0.0.799854247134.issue10517@psf.upfronthosting.co.za>
In-reply-to
Content
This appears to be happening in a child process when the parent process is running:
  Lib/multiprocessing/util.py, line 255, in _exit_function ()

Liberally adding printf() and getpid() calls in various places, seems to always happen when parent process is within "call_py_exitfuncs()" within Py_Finalize; error is from the child process that was created last.

Using gdb with a breakpoint on "call_py_exitfuncs" and single-stepping seems to confirm a single exitfunc:
  Lib/multiprocessing/util.py, line 255, in _exit_function ()
and that the child dies as that bytecode function is executed.

$ ./python -c "import multiprocessing.managers ; mpp = multiprocessing.Pool(4); sm = multiprocessing.managers.SyncManager(); sm.start()"
Py_InitializeEx called for PID 27824
posix_fork called by PID 27824
child of posix_fork has PID 27825
posix_fork called by PID 27824
child of posix_fork has PID 27826
posix_fork called by PID 27824
child of posix_fork has PID 27827
posix_fork called by PID 27824
child of posix_fork has PID 27828
posix_fork called by PID 27824
child of posix_fork has PID 27832
Py_Finalize called for PID 27824
wait_for_thread_shutdown() finished for PID 27824
Fatal Python error for PID 27832: Invalid thread state for this thread
call_py_exitfuncs() finished for PID 27824
PyOS_FiniInterrupts() finished for PID 27824
[64240 refs]
History
Date User Action Args
2011-02-10 21:59:22dmalcolmsetrecipients: + dmalcolm, bquinlan, kristjan.jonsson, jnoller, ysj.ray, lukasz.langa
2011-02-10 21:59:21dmalcolmsetmessageid: <1297375162.0.0.799854247134.issue10517@psf.upfronthosting.co.za>
2011-02-10 21:59:21dmalcolmlinkissue10517 messages
2011-02-10 21:59:21dmalcolmcreate