JDK-8304813 : applications/jcstress/atomicity.java failed with SIGILL in C1 compiled frame
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 21
  • Priority: P4
  • Status: Closed
  • Resolution: Duplicate
  • OS: linux
  • CPU: x86_64
  • Submitted: 2023-03-23
  • Updated: 2023-03-24
  • Resolved: 2023-03-23
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.
Other
tbdResolved
Related Reports
Duplicate :  
Description
The following test failed in the JDK21 CI:

applications/jcstress/atomicity.java

Here's a snippet from the log file:

HTML report was generated. Look at results/index.html for the complete run results.

Will throw any pending exceptions at this point.
Exception in thread "main" java.lang.AssertionError: TEST FAILURES: 
org.openjdk.jcstress.tests.atomicity.varHandles.byteBuffer.heap.little.WeakCASContendStrongTest.WeakCompareAndSetPlainLong [-Djava.io.tmpdir=/opt/mach5/mesos/work_dir/slaves/741e9afd-8c02-45c3-b2e2-9db1450d0832-S16998/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/d49d4a7c-bb6c-4de9-bfd3-488439a76e2d/runs/27de9376-1b40-42cc-9a4c-beca111c72a9/testoutput/test-support/jtreg_open_test_hotspot_jtreg_jcstress_part3/scratch/2, -Djava.io.tmpdir=/opt/mach5/mesos/work_dir/slaves/741e9afd-8c02-45c3-b2e2-9db1450d0832-S16998/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/d49d4a7c-bb6c-4de9-bfd3-488439a76e2d/runs/27de9376-1b40-42cc-9a4c-beca111c72a9/testoutput/test-support/jtreg_open_test_hotspot_jtreg_jcstress_part3/scratch/2, -XX:MaxRAMPercentage=4.16667, -Dtest.boot.jdk=/opt/mach5/mesos/work_dir/jib-master/install/jdk/19/36/bundles/linux-x64/jdk-19_linux-x64_bin.tar.gz/jdk-19, -Djava.io.tmpdir=/opt/mach5/mesos/work_dir/slaves/741e9afd-8c02-45c3-b2e2-9db1450d0832-S16998/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/d49d4a7c-bb6c-4de9-bfd3-488439a76e2d/runs/27de9376-1b40-42cc-9a4c-beca111c72a9/testoutput/test-support/jtreg_open_test_hotspot_jtreg_jcstress_part3/tmp, -XX:+CreateCoredumpOnCrash, -XX:+UseZGC] had failed with the VM error.

	at org.openjdk.jcstress.infra.grading.ExceptionReportPrinter.work(ExceptionReportPrinter.java:63)
	at org.openjdk.jcstress.JCStress.parseResults(JCStress.java:101)
	at org.openjdk.jcstress.JCStress.run(JCStress.java:86)
	at org.openjdk.jcstress.Main.main(Main.java:60)
]cout/cerr
java.lang.Error: jctress test finished with nonzero exitcode 1
	at applications.jcstress.JcstressRunner.main(JcstressRunner.java:85)
	at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
	at java.base/java.lang.reflect.Method.invoke(Method.java:578)
	at com.sun.javatest.regtest.agent.MainActionHelper$AgentVMRunnable.run(MainActionHelper.java:312)
	at java.base/java.lang.Thread.run(Thread.java:1623)

JavaTest Message: Test threw exception: java.lang.Error
JavaTest Message: shutting down test

result: Failed. Execution failed: `main' threw exception: java.lang.Error: jctress test finished with nonzero exitcode 1

Here's snippet from the hs_err_pid file:

#  SIGILL (0x4) at pc=0x00007f5c90de4fce, pid=1463239, tid=1463274
#
# JRE version: Java(TM) SE Runtime Environment (21.0+15) (fastdebug build 21-ea+15-LTS-1224)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (fastdebug 21-ea+15-LTS-1224, mixed mode, sharing, tiered, compressed class ptrs, z gc, linux-amd64)
# Problematic frame:
# J 963 c1 org.openjdk.jcstress.tests.atomicity.varHandles.arrays.WeakCASContendStrongTest.WeakCompareAndSetChar_jcstress.actor1()Lorg/openjdk/jcstress/util/Counter; (113 bytes) @ 0x00007f5c90de4fce [0x00007f5c90de4a00+0x00000000000005ce]

<snip>

---------------  T H R E A D  ---------------

Current thread (0x00007f5ca8379e60):  JavaThread "jcstress-worker-2" daemon [_thread_in_Java, id=1463274, stack(0x00007f5c90091000,0x00007f5c90192000)]

Stack: [0x00007f5c90091000,0x00007f5c90192000],  sp=0x00007f5c901906d0,  free space=1021k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
J 963 c1 org.openjdk.jcstress.tests.atomicity.varHandles.arrays.WeakCASContendStrongTest.WeakCompareAndSetChar_jcstress.actor1()Lorg/openjdk/jcstress/util/Counter; (113 bytes) @ 0x00007f5c90de4fce [0x00007f5c90de4a00+0x00000000000005ce]
j  org.openjdk.jcstress.tests.atomicity.varHandles.arrays.WeakCASContendStrongTest.WeakCompareAndSetChar_jcstress$$Lambda+0x0000000801015920.call()Ljava/lang/Object;+4
j  java.util.concurrent.FutureTask.run()V+39 java.base@21-ea
j  java.util.concurrent.ThreadPoolExecutor.runWorker(Ljava/util/concurrent/ThreadPoolExecutor$Worker;)V+92 java.base@21-ea
j  java.util.concurrent.ThreadPoolExecutor$Worker.run()V+5 java.base@21-ea
j  java.lang.Thread.runWith(Ljava/lang/Object;Ljava/lang/Runnable;)V+5 java.base@21-ea
j  java.lang.Thread.run()V+19 java.base@21-ea
v  ~StubRoutines::call_stub 0x00007f5c981d5d1a
V  [libjvm.so+0x106af00]  JavaCalls::call_helper(JavaValue*, methodHandle const&, JavaCallArguments*, JavaThread*)+0x500  (javaCalls.cpp:415)
V  [libjvm.so+0x106b730]  JavaCalls::call_virtual(JavaValue*, Klass*, Symbol*, Symbol*, JavaCallArguments*, JavaThread*)+0x450  (javaCalls.cpp:329)
V  [libjvm.so+0x106be01]  JavaCalls::call_virtual(JavaValue*, Handle, Klass*, Symbol*, Symbol*, JavaThread*)+0x71  (javaCalls.cpp:191)
V  [libjvm.so+0x11edddb]  thread_entry(JavaThread*, JavaThread*)+0x12b  (jvm.cpp:2924)
V  [libjvm.so+0x109f236]  JavaThread::thread_main_inner()+0x206  (javaThread.cpp:710)
V  [libjvm.so+0x1aab090]  Thread::call_run()+0x100  (thread.cpp:224)
V  [libjvm.so+0x1748373]  thread_native_entry(Thread*)+0x103  (os_linux.cpp:740)

siginfo: si_signo: 4 (SIGILL), si_code: 2 (ILL_ILLOPN), si_addr: 0x00007f5c90de4fce
Comments
Thanks [~dcubed]. I'm closing this as a duplicate of JDK-8258825.
23-03-2023