JDK-8319633 : runtime/posixSig/TestPosixSig.java intermittent timeouts on UNIX
  • Type: Bug
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: 21,22
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • OS: aix
  • CPU: ppc
  • Submitted: 2023-11-07
  • Updated: 2024-05-29
  • Resolved: 2023-11-28
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 21 JDK 22
21.0.3Fixed 22 b26Fixed
Related Reports
Relates :  
Description
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)
Comments
A pull request was submitted for review. URL: https://git.openjdk.org/jdk21u-dev/pull/30 Date: 2023-12-14 15:56:52 +0000
14-12-2023

This needs a PR against jdk21u-dev.
14-12-2023

[jdk21u-fix-request] Approval Request from JoKern65 Backport of test fix for AIX. No risk, clean backport.
28-11-2023

A pull request was submitted for review. URL: https://git.openjdk.org/jdk21u/pull/407 Date: 2023-11-28 13:22:25 +0000
28-11-2023

Changeset: 464dc3da Author: Joachim Kern <jkern@openjdk.org> Committer: Martin Doerr <mdoerr@openjdk.org> Date: 2023-11-28 09:57:48 +0000 URL: https://git.openjdk.org/jdk/commit/464dc3dab540a36aeea76dbeea548c600df58763
28-11-2023

A pull request was submitted for review. URL: https://git.openjdk.org/jdk/pull/16797 Date: 2023-11-23 14:35:11 +0000
23-11-2023