[Python-Dev] Integrate the faulthandler module into Python 3.3?

Nick Coghlan ncoghlan at gmail.com
Fri Mar 4 12:10:13 CET 2011


On Fri, Mar 4, 2011 at 10:58 AM, Victor Stinner
<victor.stinner at haypocalc.com> wrote:
> Hi,
>
> Some months ago, I proposed a patch to display the Python backtrace on a
> segfault. The API was not stable, it was too for Python 3.2, and it was
> enabled by default. I wrote a module instead of a patch so it can be
> used on any version of Python, and it has a better API. And now I would
> like to include the module into Python directly to use it more easily.
> See http://bugs.python.org/issue11393 for the details. The module:
>
>   https://github.com/haypo/faulthandler
>
> It is now possible to dump the backtrace on an user signal (eg. SIGUSR1)
> or after a delay in seconds (it may be useful for buildbot hangs without
> user interaction). You can choose to display the current thread or all
> threads, and in which file the trace is written.
>
> So, what do you think?

+1

It's a very helpful capability, and getting it in early in the 3.3
cycle will give us more time to refine the API and functionality.

Something we may want to consider is enabling it by default in
interactive mode, and also when `-i` is specified on the command line.

Cheers,
Nick.

-- 
Nick Coghlan   |   ncoghlan at gmail.com   |   Brisbane, Australia


More information about the Python-Dev mailing list