-
-
Notifications
You must be signed in to change notification settings - Fork 315
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
feat: Support for ignored signals with SIGN_IGN #1489
Conversation
@philipphofmann would you mind taking a pass on this PR? It's been sitting for a few days. Thanks so much! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you please add an entry to the Changelog, please? As I'm not an expert on signal handlers, I need someone from the native team to review this PR.
@Swatinem, can you help us out here, and do you know how to add tests for this? I have no idea how to test signal handlers.
Codecov Report
@@ Coverage Diff @@
## master #1489 +/- ##
=======================================
Coverage 95.93% 95.93%
=======================================
Files 157 157
Lines 7003 7003
=======================================
Hits 6718 6718
Misses 285 285 Continue to review full report at Codecov.
|
Sure--added an entry to the changelog. Tried my best to match existing wording but lmk if there are any edits you'd like me to make to it |
📜 Description
💡 Motivation and Context
Currently, if a signal is ignored via
SIG_IGN
(which is especially common for signals likeSIGPIPE
), Sentry will still report a fatal, unhandled crash even though the application never received the signal and continued to run just fine.This PR fixes this behavior by only setting a signal handler to report a crash from signal if the original handler is NOT
SIG_IGN
#1472
💚 How did you test it?
Tested locally--by using the local version of Sentry and ensuring sending the
SIGPIPE
signal (kill -SIGPIPE {pid}
) didn't cause a sentry issue to be created. Tested that other signals were not ignored. Would love a way to add tests for this (I assume via an integration test) but from looking at the code it's not clear me to if there's infrastructure to do that currently.📝 Checklist
🔮 Next steps