JDK-8290465 : applications/jcstress/acqrel.java SIGSEGV in C2 frame
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 20
  • Priority: P4
  • Status: Closed
  • Resolution: Duplicate
  • OS: linux
  • CPU: x86_64
  • Submitted: 2022-07-18
  • Updated: 2022-07-18
  • Resolved: 2022-07-18
Related Reports
Duplicate :  
Description
The following test failed in the JDK20 CI:

applications/jcstress/acqrel.java

Here's a snippet from the log file:

Will throw any pending exceptions at this point.
Exception in thread "main" java.lang.AssertionError: TEST FAILURES: 
org.openjdk.jcstress.tests.acqrel.varHandles.byteArray.little.volatiles.FloatIntTest [-Djava.io.tmpdir=/opt/mach5/mesos/work_dir/slaves/0c72054a-24ab-4dbb-944f-97f9341a1b96-S31301/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/e24f311b-8277-490b-bb46-da1e7b253ed5/runs/a12517a3-bff2-46a6-96c0-faca8a402874/testoutput/test-support/jtreg_open_test_hotspot_jtreg_jcstress_part2/scratch/1, -Djava.io.tmpdir=/opt/mach5/mesos/work_dir/slaves/0c72054a-24ab-4dbb-944f-97f9341a1b96-S31301/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/e24f311b-8277-490b-bb46-da1e7b253ed5/runs/a12517a3-bff2-46a6-96c0-faca8a402874/testoutput/test-support/jtreg_open_test_hotspot_jtreg_jcstress_part2/scratch/1, -XX:MaxRAMPercentage=4.16667, -Djava.io.tmpdir=/opt/mach5/mesos/work_dir/slaves/0c72054a-24ab-4dbb-944f-97f9341a1b96-S31301/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/e24f311b-8277-490b-bb46-da1e7b253ed5/runs/a12517a3-bff2-46a6-96c0-faca8a402874/testoutput/test-support/jtreg_open_test_hotspot_jtreg_jcstress_part2/tmp] 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:104)
	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:1589)

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 the crashing thread's stack:

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

Current thread (0x00007ff87432a230):  JavaThread "jcstress-worker-2" daemon [_thread_in_Java, id=1386928, stack(0x00007ff8374f4000,0x00007ff8375f5000)]

Stack: [0x00007ff8374f4000,0x00007ff8375f5000],  sp=0x00007ff8375f37d0,  free space=1021k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
J 1055% c2 org.openjdk.jcstress.tests.acqrel.varHandles.arrays.volatiles.LongStringTest_jcstress.actor2()Lorg/openjdk/jcstress/util/Counter; (113 bytes) @ 0x00007ff86428b790 [0x00007ff86428b480+0x0000000000000310]
j  org.openjdk.jcstress.tests.acqrel.varHandles.arrays.volatiles.LongStringTest_jcstress$$Lambda$42+0x00000008010151f8.call()Ljava/lang/Object;+4
j  java.util.concurrent.FutureTask.run()V+39 java.base@20-ea
j  java.util.concurrent.ThreadPoolExecutor.runWorker(Ljava/util/concurrent/ThreadPoolExecutor$Worker;)V+92 java.base@20-ea
j  java.util.concurrent.ThreadPoolExecutor$Worker.run()V+5 java.base@20-ea
j  java.lang.Thread.run()V+13 java.base@20-ea
v  ~StubRoutines::call_stub 0x00007ff863c5fcc6
V  [libjvm.so+0x892445]  JavaCalls::call_helper(JavaValue*, methodHandle const&, JavaCallArguments*, JavaThread*)+0x315
V  [libjvm.so+0x893c72]  JavaCalls::call_virtual(JavaValue*, Handle, Klass*, Symbol*, Symbol*, JavaThread*)+0x1d2
V  [libjvm.so+0x969e3e]  thread_entry(JavaThread*, JavaThread*)+0x8e
V  [libjvm.so+0x8abe00]  JavaThread::thread_main_inner()+0x110
V  [libjvm.so+0xe36f90]  Thread::call_run()+0xc0
V  [libjvm.so+0xc8e4d8]  thread_native_entry(Thread*)+0xd8


siginfo: si_signo: 11 (SIGSEGV), si_code: 128 (SI_KERNEL), si_addr: 0x0000000000000000

I'm starting this bug off in hotspot/compiler since the frame that
ran into the SIGSEGV is a compiled frame:

# Problematic frame:
# J 1055% c2 org.openjdk.jcstress.tests.acqrel.varHandles.arrays.volatiles.LongStringTest_jcstress.actor2()Lorg/openjdk/jcstress/util/Counter; (113 bytes) @ 0x00007ff86428b790 [0x00007ff86428b480+0x0000000000000310]
Comments
According to the disassembly from the hs_err file, the instruction at 0x00007ff86428b790 is in the middle of another instruction, which is a spill to the stack.
18-07-2022

Crash is on a AMD_EPYC_7742_64-Core_Processor. Most likely a duplicate of JDK-8258825.
18-07-2022