-
Notifications
You must be signed in to change notification settings - Fork 393
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
Raise SIGTRAP in TR::trap() instead of SIGABRT #5774
Conversation
0b8e832
to
6b92b01
Compare
Converting this to a draft PR, as I'm not seeing expected results. This PR is being driven by some work in OpenJ9. I'm finding that while I am able to set the new option for JitDump compilations, it seems we are unable to catch It seems as if whatever the global abort signal handler is doing is affecting our ability to catch any other signal. |
I can get everything to work if we use This is because we could in theory still encounter a crash at a different location when generating the JitDump, in which case we're back in the same scenario. |
Just spoke to @babsingh who kindly explained some stuff to me. He explained that the way we catch sync/async signals is different. Calling The unfortunate side-effect of such a change, for OpenJ9 at least is that using
For reference this is how things looked like before:
Notice that |
This happens when we hit a VM assert too in OpenJ9 doesn't it? In which case we'd be consistent with the VM. |
The VM does different things. Some of their asserts call |
6b92b01
to
196b259
Compare
4df654b
to
5d19aba
Compare
SIGABRT only has one global signal handler, so we cannot guard function calls against SIGABRT using the port library APIs. Raising a SIGTRAP is useful for downstream projects who may want to catch such signals for compilation thread crashes and requeue such compilations (for another attempt, or perhaps to generate additional diagnostic data). Signed-off-by: Filip Jeremic <fjeremic@ca.ibm.com>
5d19aba
to
5a20f67
Compare
I asked the community and no one seems to have concerns: I'd like to proceed with the |
@genie-omr build all |
No issues on my end. |
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.
LGTM.
|
//FIXME: this doesn't work on z/OS | ||
*(volatile int*)(0) = 0; // let crashlog do its thing | ||
} | ||
|
||
#ifdef _MSC_VER |
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.
@babsingh yes it will run on Windows. There is an ifdef to handle Windows specifically.
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.
LGTM: DebugBreak
/SIGSEGV
on Windows and raise(SIGTRAP)
on Unix platforms.
SIGABRT only has one global signal handler, so we cannot guard
function calls against SIGABRT using the port library APIs. Raising a
SIGTRAP is useful for downstream projects who may want to catch such
signals for compilation thread crashes and requeue such compilations
(for another attempt, or perhaps to generate additional diagnostic data).
Signed-off-by: Filip Jeremic fjeremic@ca.ibm.com