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

[release-1.6] backport signal handling improvements from #40056 #41774

Closed
wants to merge 1 commit into from

Commits on Aug 3, 2021

  1. Try to avoid julia becoming unkillable after fatal errors (#40056)

    - don't smash the alt-stack when already using it
    - handle jl_critical_error on the original stack, leaving our signal
    handling thread free to handle more signals (and helping lock corruption
    detection in some cases)
    - unblock signals when handling signals: some libc apparently like to
    block all signals, which can cause mild havoc, since we'd really like
    the user or bad data to be able to still kill the process (and not just
    be ignored or cause it to hang)
    - reset signals to SIG_DFL earlier (so we recurse less)
    - destroy some state from the Task we co-opted to run the exit handlers,
    so that it can't accidentally jump back into the running program after
    we've started tearing down the process, from an untimely ^C (previously
    ^C might cancel the exit) or a jlbacktrace call.
    - mark functions as leaf with CFI instead of (potentially) smashing the
    stack, and add a bit of red-zone if we are recursing (to keep pgcstack
    sensible)
    - support safe_restore for the mach catch_exception_raise (while we're
    trying to generate the backtrace)
    
    (cherry picked from commit 107901d)
    vtjnash authored and JeffBezanson committed Aug 3, 2021
    Configuration menu
    Copy the full SHA
    f02a790 View commit details
    Browse the repository at this point in the history