Le vendredi 04 mars 2011 à 21:10 +1000, Nick Coghlan a écrit :
> > 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.

Even if it has a complete test suite (for all features), it would be
nice to test it as much as possible. So introduce it quickly into Python
3.3 would be nice.

The API can be completly changed, I don't care of the API :-)

But I will try to continue to maintain the project as a third party
module for older Python versions.

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

In the issue, I proposed:

 * an option on the command line, eg. python -x faulthandler script.py
 * an environment variable, eg. PYTHONFAULTHANDLER=y python script.py

Both have different usages: the command line option can be used once to
try to get more information when trying to reproduce a crash, the
environment variable can be used to always enable it by default on your
computer.

I also would like to enable it by default in regrtest.py.

Victor

_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to