-
Notifications
You must be signed in to change notification settings - Fork 720
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
JIT SIGTRAP Signal Handler Issue #10744
Comments
The problem also happens on SLES 15 for PPCle. |
@andrewcraik The failure was only observed on ppc64le platforms, specifically RHEL8.2 and SLES15, since JIT's SIGTRAP signal handler only gets used on these platforms. There is a workaround, |
I tested zLinux and was unable to recreate the problem. It's unknown if the problem exists on LinuxPPCbe because there is no up to date distribution on PPC BE. The problem only appears on newer distributions (older SLES and RHEL distributions of PPC LE do not show the problem). |
OK since this is P specific - FYI @gita-omr and I am going to tag this with the arch:p label |
@klangman SLES has YaST as the package manager. It also supports RPM. Was the problem recreated using YaST or RPM on SLES 15? |
Looking at the signal masks in
* SIGTRAP bit = What of interest here is the last change, the SIGTRAP handler is not set with the OS anymore and it was unblocked in the main thread. There is no related
|
@rmnattas is looking at it. |
Adding an OR condition |
@babsingh Any reason why would a change in a signal mask/handler like the last row change in #10744 (comment) happen in OpenJ9/OMR? But then no related @klangman mentioned that it could be a PPCle kernel bug which I agree that its a plausible theory given the strange circumstances of the signal mask/handler change without seeing the java process and its threads doing the change. I'm trying to test that somehow with a C process. Also, if it's urgent, I think a temporary fix could be my last comment. Allowing synchronous signals (or maybe just SIGTRAP) to get unblocked under |
Allow synchronous signals to get unblocked when a signal handler is set for them. Issue: eclipse-openj9/openj9#10744 Signed-off-by: Abdulrahman Alattas <rmnattas@gmail.com>
None. I agree that there is an external entity responsible for interfering with the SIGTRAP handler, which is environment specific (RPM + RHEL + PPCLE).
As per the Notes in https://man7.org/linux/man-pages/man2/sigprocmask.2.html, there are only side-effects for blocking signals such as @rmnattas is working on the FIX: https://github.com/rmnattas/omr/commits/unix-signal-unblock. Currently, only asynchronous signals are unblocked. The FIX will unblock ALL signals. The FIX will also unblock after the signal handler is registered in order to avoid receiving signals between unblock and registration. The following tests have been suggested to verify functionality:
|
Allow synchronous signals to get unblocked when a signal handler is set for them. Issue: eclipse-openj9/openj9#10744 Signed-off-by: Abdulrahman Alattas <rmnattas@gmail.com>
Allow synchronous signals to get unblocked when a signal handler is set for them. Issue: eclipse-openj9/openj9#10744 Signed-off-by: Abdulrahman Alattas <rmnattas@gmail.com>
On a RHEL 8.3 (Ootpa) ppc64le machine, I ran the failing test, #10744 (comment), 100 times using a nightly build (https://ci.eclipse.org/openj9/job/Build_JDK8_ppc64le_linux_Nightly/636/), which has @rmnattas's fix (eclipse-omr/omr#5742). No failures were seen, which verifies that eclipse-omr/omr#5742 works as a fix. Thus, closing this issue. |
Issue
Incorrect behaviour: OpenJ9 terminates abruptly or generates a core file for TRAP instructions when run in
RPM
package manager on RHEL8.2 ppc64le. This behaviour is not seen outside ofRPM
package manager. Similar behaviour is also seen on SLES15 ppc64leThe issue is introduced because of eclipse-omr/omr#4554, which impacts JIT's
SIGTRAP
signal handler.Reverting eclipse-omr/omr#4554 corrects the behaviour. eclipse-omr/omr#4554 can't be reverted since it fixes #7749.
There is no direct link between unblocking a signal and JIT's
SIGTRAP
signal handler. Also,SIGTRAP
is categorized as a synchronous signal, and only asynchronous signals are unblocked.We need to investigate how eclipse-omr/omr#4554 impacts JIT's
SIGTRAP
signal handler.The below workaround, test case and instructions to reproduce the behaviour are provided by @klangman.
Workaround
The JVM command line option,
-Xjit:NoResumableTrapHandler
, will avoid the above reported problem. This option prevents the JIT from using TRAP instructions.Steps to reproduce
WORK
directory:mkdir /root/work; export WORK=/root/work
cd $WORK
$WORK/jdk8
NPETest.java
test.jvmtrap.spec
run.sh
./run.sh
should reproduce the incorrect behaviourMachine setup
rpmbuild
rpm
Create the test case:
NPETest.java
Create the RPM spec:
test.jvmtrap.spec
Create the run script:
run.sh
The text was updated successfully, but these errors were encountered: