Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

faulthandler: setup an exception handler on Windows #68036

Closed
vstinner opened this issue Apr 2, 2015 · 8 comments
Closed

faulthandler: setup an exception handler on Windows #68036

vstinner opened this issue Apr 2, 2015 · 8 comments

Comments

@vstinner
Copy link
Member

vstinner commented Apr 2, 2015

BPO 23848
Nosy @vstinner, @tjguk, @zware, @zooba
Files
  • faulthandler_exc_handler.patch
  • faulthandler_exc_handler-2.patch
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = None
    closed_at = <Date 2016-03-23.14:37:17.586>
    created_at = <Date 2015-04-02.08:15:59.572>
    labels = ['OS-windows']
    title = 'faulthandler: setup an exception handler on Windows'
    updated_at = <Date 2016-03-23.17:38:16.892>
    user = 'https://github.com/vstinner'

    bugs.python.org fields:

    activity = <Date 2016-03-23.17:38:16.892>
    actor = 'python-dev'
    assignee = 'none'
    closed = True
    closed_date = <Date 2016-03-23.14:37:17.586>
    closer = 'vstinner'
    components = ['Windows']
    creation = <Date 2015-04-02.08:15:59.572>
    creator = 'vstinner'
    dependencies = []
    files = ['38802', '38860']
    hgrepos = []
    issue_num = 23848
    keywords = ['patch']
    message_count = 8.0
    messages = ['239890', '240229', '262255', '262266', '262269', '262270', '262271', '262289']
    nosy_count = 5.0
    nosy_names = ['vstinner', 'tim.golden', 'python-dev', 'zach.ware', 'steve.dower']
    pr_nums = []
    priority = 'normal'
    resolution = 'fixed'
    stage = None
    status = 'closed'
    superseder = None
    type = None
    url = 'https://bugs.python.org/issue23848'
    versions = ['Python 3.5']

    @vstinner
    Copy link
    Member Author

    vstinner commented Apr 2, 2015

    Attached patch setup an exception handler on Windows.

    I wrote it when investigating a failure of test_exceptions related to the issue bpo-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?

    @vstinner
    Copy link
    Member Author

    vstinner commented Apr 7, 2015

    More complete (and working) patch. Most unit tests pass, but two unit tests must be updated to match the new error message.

    @python-dev
    Copy link
    Mannequin

    python-dev mannequin commented Mar 23, 2016

    New changeset b2f7bb63377b by Victor Stinner in branch 'default':
    Issue bpo-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

    @python-dev
    Copy link
    Mannequin

    python-dev mannequin commented Mar 23, 2016

    New changeset efcc48cd5bfb by Victor Stinner in branch 'default':
    faulthandler: only log fatal exceptions
    https://hg.python.org/cpython/rev/efcc48cd5bfb

    @python-dev
    Copy link
    Mannequin

    python-dev mannequin commented Mar 23, 2016

    New changeset e6f00778d61f by Victor Stinner in branch 'default':
    Issue bpo-23848: Try to fix test_faulthandler on ARM
    https://hg.python.org/cpython/rev/e6f00778d61f

    @vstinner
    Copy link
    Member Author

    vstinner commented Mar 23, 2016

    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
    ...

    @vstinner vstinner reopened this Mar 23, 2016
    @vstinner
    Copy link
    Member Author

    vstinner commented Mar 23, 2016

    Pass succeeded again on ARM, I close the issue.

    @python-dev
    Copy link
    Mannequin

    python-dev mannequin commented Mar 23, 2016

    New changeset 3247f8df5514 by Victor Stinner in branch 'default':
    Issue bpo-23848: Fix usage of _Py_DumpDecimal()
    https://hg.python.org/cpython/rev/3247f8df5514

    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Projects
    None yet
    Development

    No branches or pull requests

    1 participant