Details
-
Bug
-
Resolution: Fixed
-
P4
-
17.0.3, 19, 20
-
b15
Backports
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8296596 | 19u-cpu | Man Cao | P4 | Resolved | Fixed | master |
JDK-8296267 | 19.0.2 | Man Cao | P4 | Resolved | Fixed | b04 |
JDK-8295451 | 17.0.6-oracle | Fairoz Matte | P4 | Resolved | Fixed | b03 |
JDK-8296309 | 17.0.6 | Goetz Lindenmaier | P4 | Resolved | Fixed | b02 |
JDK-8295712 | 11.0.18-oracle | Fairoz Matte | P4 | Resolved | Fixed | b04 |
JDK-8295374 | 8u361 | Larry Cable | P4 | Resolved | Fixed | b04 |
JDK-8296650 | 8u351 | Ryan Wallace | P4 | Closed | Fixed | b32 |
Description
According to test/hotspot/jtreg/runtime/signal/README, SIGQUIT does not support chaining. After
if (jvm_signal_installed && sigused) {
/* jvm has installed its signal handler for this signal. */
/* Save the handler. Don't really install it. */
if (oact != NULL) {
*oact = sact[sig];
}
if (act != NULL) {
sact[sig] = *act;
}
signal_unlock();
return 0;
}
As a result, the second time does not really install the UserHandler for SIGQUIT.
Context: Our Java applications almost always enable signal chaining. We have a customized launcher with logic to override sigaction() similarly to what libjsig.so does.
Reproducible steps:
$ LD_PRELOAD=<jdk_path>lib/server/libjsig.so <jdk_path>/bin/java -jar <application_jar>
$ kill -SIGQUIT <application_pid>
Expected: Thread dump is printed on stdout.
Actual: Nothing is printed.
Also "$ jcmd <application_pid>" gives an error:
2006627:
java.io.IOException: No such process
at jdk.attach/sun.tools.attach.VirtualMachineImpl.sendQuitTo(Native Method)
at jdk.attach/sun.tools.attach.VirtualMachineImpl.<init>(VirtualMachineImpl.java:83)
at jdk.attach/sun.tools.attach.AttachProviderImpl.attachVirtualMachine(AttachProviderImpl.java:58)
at jdk.attach/com.sun.tools.attach.VirtualMachine.attach(VirtualMachine.java:207)
at jdk.jcmd/sun.tools.jcmd.JCmd.executeCommandForPid(JCmd.java:113)
at jdk.jcmd/sun.tools.jcmd.JCmd.main(JCmd.java:97)
Attachments
Issue Links
- backported by
-
JDK-8295374 SIGQUIT and jcmd attaching mechanism does not work with signal chaining library
- Resolved
-
JDK-8295451 SIGQUIT and jcmd attaching mechanism does not work with signal chaining library
- Resolved
-
JDK-8295712 SIGQUIT and jcmd attaching mechanism does not work with signal chaining library
- Resolved
-
JDK-8296267 SIGQUIT and jcmd attaching mechanism does not work with signal chaining library
- Resolved
-
JDK-8296309 SIGQUIT and jcmd attaching mechanism does not work with signal chaining library
- Resolved
-
JDK-8296596 SIGQUIT and jcmd attaching mechanism does not work with signal chaining library
- Resolved
-
JDK-8296650 SIGQUIT and jcmd attaching mechanism does not work with signal chaining library
- Closed
- relates to
-
JDK-8293466 libjsig should ignore non-modifying sigaction calls
- Resolved
-
JDK-8279124 VM does not handle SIGQUIT during initialization
- Resolved
- links to
-
Commit openjdk/jdk17u-dev/ff14ed4a
-
Commit openjdk/jdk19u/41677c17
-
Commit openjdk/jdk/45ff10cc
-
Review openjdk/jdk17u-dev/834
-
Review openjdk/jdk19u/59
-
Review openjdk/jdk/9955