A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2011-March/110105.html below:

[Python-Dev] I plan to push faulthandler into Python 3.3 in one week

[Python-Dev] I plan to push faulthandler into Python 3.3 in one weekVictor Stinner victor.stinner at haypocalc.com
Fri Mar 25 17:39:30 CET 2011
Le jeudi 24 mars 2011 à 00:49 +0100, Victor Stinner a écrit :
> If nobody complains, I plan to push my faulthandler module into Python
> 3.3 in one week. It's a module to display the Python backtrace on a
> segfault, on a user signal or after a timeout.

I created a feature repo to prepare the work, features/faulthandler, and
the integration is done. You can try it, or try the last patch attached
to #11393.

I choose to add faulthandler as a builtin module to be able to control
exactly when it is initialized/finalized.

You can enable it at startup using -X faulthandler=1 or
PYTHONFAULTHANDLER=1 env var.

Example:
--------------
$ ./python -X faulthandler Lib/test/crashers/borrowed_ref_2.py 
hi
Fatal Python error: Segmentation fault

Traceback (most recent call first):
  File "Lib/test/crashers/borrowed_ref_2.py", line 18 in __set__
  File "Lib/test/crashers/borrowed_ref_2.py", line 36 in <module>
Erreur de segmentation
--------------

Try Lib/test/crashers/recursive_call.py if you would like to try the
stack overflow feature: faulthandler is able to dump the traceback, even
after a stack overflow. But only if sigaltstack() is available (e.g. not
on Windows, sorry).

faulthandler can also dump the traceback explicitly, after a timeout, or
on a user signal: it is not specific to segmentation faults ;-)

Victor

More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4