-
Bug
-
Resolution: Fixed
-
P4
-
21, 22
-
b26
-
ppc
-
aix
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8333132 | 21.0.5-oracle | PAWAN CHAWDHARY | P4 | Resolved | Fixed | b01 |
JDK-8322277 | 21.0.3 | Joachim Kern | P4 | Resolved | Fixed | b01 |
Every 1-2 weeks we run into timeouts when running jtreg test runtime/posixSig/TestPosixSig.java on UNIX.
The thread stack shows that we are in line 54 of TestPosixSig.java (callstack see below).
The reason is the following: The test registers a new dummy signal handler for SIGILL, without delegating the task to the previous handler in the chain. In case the VM then calls a Java method marked as not-entrant at least on PPC64 a SIGILL is raised. Because this is not handled by the registered handler the SIGILL will happen again and again in an endless recursion.
One solution would be to add a delegation to the hotspot signal handler, which is the previous handler in the chain.
"AgentVMThread" #204 [4573] prio=5 os_prio=57 cpu=2.41ms elapsed=720.30s tid=0x0000000115c1ac00 nid=4573 waiting on condition [0x00000001169dc000]
java.lang.Thread.State: WAITING (parking)
at jdk.internal.misc.Unsafe.park(java.base@22-internal/Native Method)
- parking to wait for <0x000000044b8004a0> (a java.util.concurrent.FutureTask)
at java.util.concurrent.locks.LockSupport.park(java.base@22-internal/LockSupport.java:221)
at java.util.concurrent.FutureTask.awaitDone(java.base@22-internal/FutureTask.java:500)
at java.util.concurrent.FutureTask.get(java.base@22-internal/FutureTask.java:190)
at jdk.test.lib.process.OutputBuffer$LazyOutputBuffer$StreamTask.get(OutputBuffer.java:109)
at jdk.test.lib.process.OutputBuffer$LazyOutputBuffer.getStdout(OutputBuffer.java:139)
at jdk.test.lib.process.OutputAnalyzer.getStdout(OutputAnalyzer.java:584)
at jdk.test.lib.process.OutputAnalyzer.getOutput(OutputAnalyzer.java:575)
at TestPosixSig.main(TestPosixSig.java:54)
at java.lang.invoke.LambdaForm$DMH/0x0000028800081800.invokeStatic(java.base@22-internal/LambdaForm$DMH)
at java.lang.invoke.LambdaForm$MH/0x0000028800106400.invoke(java.base@22-internal/LambdaForm$MH)
at java.lang.invoke.LambdaForm$MH/0x0000028800106800.invokeExact_MT(java.base@22-internal/LambdaForm$MH)
at jdk.internal.reflect.DirectMethodHandleAccessor.invokeImpl(java.base@22-internal/DirectMethodHandleAccessor.java:154)
at jdk.internal.reflect.DirectMethodHandleAccessor.invoke(java.base@22-internal/DirectMethodHandleAccessor.java:103)
at java.lang.reflect.Method.invoke(java.base@22-internal/Method.java:580)
at com.sun.javatest.regtest.agent.MainActionHelper$AgentVMRunnable.run(MainActionHelper.java:333)
at java.lang.Thread.runWith(java.base@22-internal/Thread.java:1583)
at java.lang.Thread.run(java.base@22-internal/Thread.java:1570)
The thread stack shows that we are in line 54 of TestPosixSig.java (callstack see below).
The reason is the following: The test registers a new dummy signal handler for SIGILL, without delegating the task to the previous handler in the chain. In case the VM then calls a Java method marked as not-entrant at least on PPC64 a SIGILL is raised. Because this is not handled by the registered handler the SIGILL will happen again and again in an endless recursion.
One solution would be to add a delegation to the hotspot signal handler, which is the previous handler in the chain.
"AgentVMThread" #204 [4573] prio=5 os_prio=57 cpu=2.41ms elapsed=720.30s tid=0x0000000115c1ac00 nid=4573 waiting on condition [0x00000001169dc000]
java.lang.Thread.State: WAITING (parking)
at jdk.internal.misc.Unsafe.park(java.base@22-internal/Native Method)
- parking to wait for <0x000000044b8004a0> (a java.util.concurrent.FutureTask)
at java.util.concurrent.locks.LockSupport.park(java.base@22-internal/LockSupport.java:221)
at java.util.concurrent.FutureTask.awaitDone(java.base@22-internal/FutureTask.java:500)
at java.util.concurrent.FutureTask.get(java.base@22-internal/FutureTask.java:190)
at jdk.test.lib.process.OutputBuffer$LazyOutputBuffer$StreamTask.get(OutputBuffer.java:109)
at jdk.test.lib.process.OutputBuffer$LazyOutputBuffer.getStdout(OutputBuffer.java:139)
at jdk.test.lib.process.OutputAnalyzer.getStdout(OutputAnalyzer.java:584)
at jdk.test.lib.process.OutputAnalyzer.getOutput(OutputAnalyzer.java:575)
at TestPosixSig.main(TestPosixSig.java:54)
at java.lang.invoke.LambdaForm$DMH/0x0000028800081800.invokeStatic(java.base@22-internal/LambdaForm$DMH)
at java.lang.invoke.LambdaForm$MH/0x0000028800106400.invoke(java.base@22-internal/LambdaForm$MH)
at java.lang.invoke.LambdaForm$MH/0x0000028800106800.invokeExact_MT(java.base@22-internal/LambdaForm$MH)
at jdk.internal.reflect.DirectMethodHandleAccessor.invokeImpl(java.base@22-internal/DirectMethodHandleAccessor.java:154)
at jdk.internal.reflect.DirectMethodHandleAccessor.invoke(java.base@22-internal/DirectMethodHandleAccessor.java:103)
at java.lang.reflect.Method.invoke(java.base@22-internal/Method.java:580)
at com.sun.javatest.regtest.agent.MainActionHelper$AgentVMRunnable.run(MainActionHelper.java:333)
at java.lang.Thread.runWith(java.base@22-internal/Thread.java:1583)
at java.lang.Thread.run(java.base@22-internal/Thread.java:1570)
- backported by
-
JDK-8322277 runtime/posixSig/TestPosixSig.java intermittent timeouts on UNIX
- Resolved
-
JDK-8333132 runtime/posixSig/TestPosixSig.java intermittent timeouts on UNIX
- Resolved
- relates to
-
JDK-8292054 Test runtime/posixSig/TestPosixSig.java fails with 'Test failed, bad output.'
- Resolved
- links to
-
Commit openjdk/jdk21u-dev/dcf6eea1
-
Commit openjdk/jdk/464dc3da
-
Review openjdk/jdk21u-dev/30
-
Review openjdk/jdk21u/407
-
Review openjdk/jdk/16797
(3 links to)