-
Notifications
You must be signed in to change notification settings - Fork 13.2k
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
SIGBUS has to be sent twice before the rust runtime exits #84118
Comments
@silence-coding I'm not sure what you're trying to say. Could you post more info about the problem you're running into? |
@jyn514 Thank you for your reply. |
It looks like the standard library installs a signal handler:
I think it needs to re-raise the same signal it receives after unregistering itself as the signal handler. @alexcrichton you were the author of #27338 - does that sound about right to you? |
Well #27338 is 6+ years old so I only remember but so much. SIGBUS IIRC needs to be installed to catch some out-of-stack conditions at least at the time (it may no longer be the case). We assume SIGBUS signals are generated in-process so by unregistering the signal handler and returning the expectation is that the process will exit immediately. |
Is there a follow-up plan for this issue? |
For a normal SIGBUS there is no need to re-raise the signal since simply returning from the signal handler will cause the instruction that triggered the signal to execute again and re-trigger the signal. This only happens because you are sending an "artificial" SIGBUS using kill, which is not caused by an instruction. I don't think this is something we need to support. As a workaround you can use a different signal that generates a core dump like SIGABRT. |
Why Does the Rust Not Occur When the SIGBUS Is Killed Once?
The text was updated successfully, but these errors were encountered: