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

ENH enable faulthandler traceback reporting on worker crash by SIGSEV #419

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

ogrisel
Copy link
Collaborator

@ogrisel ogrisel commented Aug 1, 2024

Automatically call faulthandler.enable() by default to dump extra debug info to crashed workers' stderr, typically on SIGSEV, SIGBUS and co.

I also expanded the error message of TerminatedWorkerError to point the users to look at stderr for more details. This should help us debug stability problems on our CI but also assist our users and interact more productively with them when they report problems.

if faulthandler.is_enabled():
# Fault handler is already enabled, possibly via a custom
# initializer to customize the behavior.
mp.util.debug("faulthandler already enabled.")
Copy link
Collaborator Author

@ogrisel ogrisel Aug 1, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be covered by "Case 4" in the test but this it detected by the coverage module because we use subprocess.Popen in this test to get a full control on the env and ability to inspect stderr in isolation of pytest.

@ogrisel
Copy link
Collaborator Author

ogrisel commented Aug 1, 2024

The pypy build deadlocked on commit 9d868e7 before reaching the new faulthandler test. Triggering CI again to see if it's likely to be related to this PR or not.

@ogrisel
Copy link
Collaborator Author

ogrisel commented Aug 1, 2024

The pypy deadlock is probably unrelated to this PR, but let's push on more time to make sure.

@ogrisel
Copy link
Collaborator Author

ogrisel commented Aug 1, 2024

I think this is ready for review @tomMoral and/or @lesteve.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant