[New-bugs-announce] [issue12413] make faulthandler dump traceback of child processes

Charles-François Natali report at bugs.python.org
Sun Jun 26 01:53:31 CEST 2011

New submission from Charles-François Natali <neologix at free.fr>:

As noted in issue #11870, making faulthandler capable of dumping child processes' tracebacks could be a great aid in debugging tricky deadlocks involving for example multiprocessing and subprocess.
Since there's no portable way to find out child processes, a possible idea would be to make the handler send a signal to its process group if the current process is the process group leader.
- simple
- async-safe
- since all the processes receive the signal at the same time, their outputs will be interleaved (we could maybe add a random sleep before dumping the traceback?)
- children not part of the same process group (for example those who called setsid() or setpgrp()) won't be handled

I'm not sure how this would work out on Windows, but I don't event know if Windows has a notion of child processes or process groups...

components: Library (Lib)
messages: 139132
nosy: haypo, neologix
priority: normal
severity: normal
stage: needs patch
status: open
title: make faulthandler dump traceback of child processes
type: feature request

Python tracker <report at bugs.python.org>

More information about the New-bugs-announce mailing list