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.

classification
Title: faulthandler: setup an exception handler on Windows
Type: Stage:
Components: Windows Versions: Python 3.5
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: python-dev, steve.dower, tim.golden, vstinner, zach.ware
Priority: normal Keywords: patch

Created on 2015-04-02 08:15 by vstinner, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
faulthandler_exc_handler.patch vstinner, 2015-04-02 08:15 review
faulthandler_exc_handler-2.patch vstinner, 2015-04-07 20:42 review
Messages (8)
msg239890 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2015-04-02 08:15
Attached patch setup an exception handler on Windows.

I wrote it when investigating a failure of test_exceptions related to the issue #22977. faulthandler was not trigerred while the program crashed.

I didn't test the patch yet (I tested a previous attempt, a little bit different). Maybe we can avoid setting signal handlers on Windows if an exception handler is set?
msg240229 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2015-04-07 20:42
More complete (and working) patch. Most unit tests pass, but two unit tests must be updated to match the new error message.
msg262255 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2016-03-23 10:23
New changeset b2f7bb63377b by Victor Stinner in branch 'default':
Issue #23848: Expose _Py_DumpHexadecimal()
https://hg.python.org/cpython/rev/b2f7bb63377b

New changeset b114dbbe2d31 by Victor Stinner in branch 'default':
faulthandler: add Windows exception handler
https://hg.python.org/cpython/rev/b114dbbe2d31
msg262266 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2016-03-23 13:46
New changeset efcc48cd5bfb by Victor Stinner in branch 'default':
faulthandler: only log fatal exceptions
https://hg.python.org/cpython/rev/efcc48cd5bfb
msg262269 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2016-03-23 14:20
New changeset e6f00778d61f by Victor Stinner in branch 'default':
Issue #23848: Try to fix test_faulthandler on ARM
https://hg.python.org/cpython/rev/e6f00778d61f
msg262270 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2016-03-23 14:22
The change b114dbbe2d31 introduced a regression on the ARM buildbot. I hope that it's fixed by the change e6f00778d61f.

http://buildbot.python.org/all/builders/ARMv7%20Ubuntu%203.x/builds/3800/steps/test/logs/stdio

1:06:35 [400/400/1] test_faulthandler
Timeout (1:00:00)!
Thread 0x40102110 (most recent call first):
  File "/ssd/buildbot/buildarea/3.x.gps-ubuntu-exynos5-armv7l/build/Lib/subprocess.py", line 1608 in _try_wait
  File "/ssd/buildbot/buildarea/3.x.gps-ubuntu-exynos5-armv7l/build/Lib/subprocess.py", line 1658 in wait
  File "/ssd/buildbot/buildarea/3.x.gps-ubuntu-exynos5-armv7l/build/Lib/subprocess.py", line 1002 in __exit__
  File "/ssd/buildbot/buildarea/3.x.gps-ubuntu-exynos5-armv7l/build/Lib/test/test_faulthandler.py", line 64 in get_output
  File "/ssd/buildbot/buildarea/3.x.gps-ubuntu-exynos5-armv7l/build/Lib/test/test_faulthandler.py", line 108 in check_error
  File "/ssd/buildbot/buildarea/3.x.gps-ubuntu-exynos5-armv7l/build/Lib/test/test_faulthandler.py", line 115 in check_fatal_error
  File "/ssd/buildbot/buildarea/3.x.gps-ubuntu-exynos5-armv7l/build/Lib/test/test_faulthandler.py", line 241 in test_stack_overflow
...
msg262271 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2016-03-23 14:37
Pass succeeded again on ARM, I close the issue.
msg262289 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2016-03-23 17:38
New changeset 3247f8df5514 by Victor Stinner in branch 'default':
Issue #23848: Fix usage of _Py_DumpDecimal()
https://hg.python.org/cpython/rev/3247f8df5514
History
Date User Action Args
2022-04-11 14:58:15adminsetgithub: 68036
2016-03-23 17:38:16python-devsetmessages: + msg262289
2016-03-23 14:37:17vstinnersetstatus: open -> closed
resolution: fixed
messages: + msg262271
2016-03-23 14:22:27vstinnersetstatus: closed -> open
resolution: fixed -> (no value)
2016-03-23 14:22:21vstinnersetmessages: + msg262270
2016-03-23 14:20:51python-devsetmessages: + msg262269
2016-03-23 13:47:51vstinnersetstatus: open -> closed
resolution: fixed
2016-03-23 13:46:59python-devsetmessages: + msg262266
2016-03-23 10:23:59python-devsetnosy: + python-dev
messages: + msg262255
2015-04-07 20:42:53vstinnersetfiles: + faulthandler_exc_handler-2.patch

messages: + msg240229
2015-04-02 08:15:59vstinnercreate