-
Enhancement
-
Resolution: Fixed
-
P4
-
13
-
b12
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8221241 | 12.0.2 | Martin Doerr | P4 | Resolved | Fixed | b01 |
JDK-8220778 | 11.0.4 | Martin Doerr | P4 | Resolved | Fixed | b01 |
The VM supports diagnostic flags -XX:+SafepointTimeout and -XX:+AbortVMOnSafepointTimeout to detect safepoint synchronization timeouts and to exit with an error message.
However, we usually don't see what the thread was doing which didn't reach the safepoint.
We can get a more helpful hs_err file if we kill that thread and let it dump the hs_err file.
Note: This feature doesn't work on Windows. Some additional information (si_code, "sent by kill") is only displayed on linux.
New hs_err output:
#
# A fatal error has been detected by the Java Runtime Environment:
#
# SIGILL (0x4) at pc=... (sent by kill), ...
#
The "T H R E A D" section should show a stack trace showing what the thread was actually doing.
The "printing siginfo" step should show more info like si_code (SI_TKILL), pid of the sender, etc if possible.
An Event is added:
Event: ... Thread ... sent signal 4 to Thread ... because blocking a safepoint.
Flags for using the feature this way:
-XX:+UnlockDiagnosticVMOptions
-XX:+SafepointTimeout
-XX:+SafepointALot
-XX:+AbortVMOnSafepointTimeout
-XX:SafepointTimeoutDelay=500
-XX:GuaranteedSafepointInterval=500
However, we usually don't see what the thread was doing which didn't reach the safepoint.
We can get a more helpful hs_err file if we kill that thread and let it dump the hs_err file.
Note: This feature doesn't work on Windows. Some additional information (si_code, "sent by kill") is only displayed on linux.
New hs_err output:
#
# A fatal error has been detected by the Java Runtime Environment:
#
# SIGILL (0x4) at pc=... (sent by kill), ...
#
The "T H R E A D" section should show a stack trace showing what the thread was actually doing.
The "printing siginfo" step should show more info like si_code (SI_TKILL), pid of the sender, etc if possible.
An Event is added:
Event: ... Thread ... sent signal 4 to Thread ... because blocking a safepoint.
Flags for using the feature this way:
-XX:+UnlockDiagnosticVMOptions
-XX:+SafepointTimeout
-XX:+SafepointALot
-XX:+AbortVMOnSafepointTimeout
-XX:SafepointTimeoutDelay=500
-XX:GuaranteedSafepointInterval=500
- backported by
-
JDK-8220778 Try to dump error file by thread which causes safepoint timeout
- Resolved
-
JDK-8221241 Try to dump error file by thread which causes safepoint timeout
- Resolved
- relates to
-
JDK-8220353 [TESTBUG] TestRegisterRestoring uses SafepointALot without UnlockDiagnosticVMOptions
- Resolved
-
JDK-8227528 TestAbortVMOnSafepointTimeout.java failed due to "RuntimeException: 'Safepoint sync time longer than' missing from stdout/stderr"
- Closed