I did some testing with SDE [1] and noticed the following crash:
sde64 -emit-illegal-insts 0 -future -- java -XX:+UnlockDiagnosticVMOptions -XX:HandshakeTimeout=1 Test.java
(also happens wit -rpl instead of -future)
[12.526s][error][handshake] Handshake timeout: Deoptimize(0x00007d9dc1495b90), pending threads: 9
[12.540s][error][handshake] JavaThread 0x00007d9db402d740 has not cleared handshake op: 0x00007d9dc1495b90
[12.541s][error][handshake] JavaThread 0x00007d9db41801e0 has not cleared handshake op: 0x00007d9dc1495b90
[12.541s][error][handshake] JavaThread 0x00007d9db4181520 has not cleared handshake op: 0x00007d9dc1495b90
[12.541s][error][handshake] JavaThread 0x00007d9db4182d90 has not cleared handshake op: 0x00007d9dc1495b90
[12.541s][error][handshake] JavaThread 0x00007d9db4184980 has not cleared handshake op: 0x00007d9dc1495b90
[12.541s][error][handshake] JavaThread 0x00007d9db4186480 has not cleared handshake op: 0x00007d9dc1495b90
[12.541s][error][handshake] JavaThread 0x00007d9db4188a30 has not cleared handshake op: 0x00007d9dc1495b90
[12.541s][error][handshake] JavaThread 0x00007d9db418a720 has not cleared handshake op: 0x00007d9dc1495b90
[12.541s][error][handshake] JavaThread 0x00007d9d40017fa0 has not cleared handshake op: 0x00007d9dc1495b90
#
# A fatal error has been detected by the Java Runtime Environment:
#
# SIGILL (0x4) at pc=0x00007d9dc5a98d71 (sent by kill), pid=329828, tid=329852
#
# JRE version: Java(TM) SE Runtime Environment (26.0+3) (fastdebug build 26-ea+3-153)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (fastdebug 26-ea+3-153, mixed mode, sharing, tiered, compressed oops, compressed class ptrs, g1 gc, linux-amd64)
# Problematic frame:
# C [libc.so.6+0x98d71]
#
Stack: [0x00007d9d346f1000,0x00007d9d347f1000], sp=0x00007d9d347ef9b0, free space=1018k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
C [libc.so.6+0x98d71]
C [libc.so.6+0x9bc8e] pthread_cond_timedwait+0x23e
V [libjvm.so+0x1799c6d] PlatformMonitor::wait(unsigned long)+0xbd
V [libjvm.so+0x16db26a] Monitor::wait(unsigned long)+0xca
V [libjvm.so+0xb509cb] CompileQueue::get(CompilerThread*)+0x8b
V [libjvm.so+0xb5653b] CompileBroker::compiler_thread_loop()+0x3ab
V [libjvm.so+0x10a8e0b] JavaThread::thread_main_inner()+0x13b
V [libjvm.so+0x1b0ca06] Thread::call_run()+0xb6
V [libjvm.so+0x1787f38] thread_native_entry(Thread*)+0x128
C [libc.so.6+0x9caa4]
It reproduces since JDK 17u for me.
[1] https://www.intel.com/content/www/us/en/developer/articles/tool/software-development-emulator.html
sde64 -emit-illegal-insts 0 -future -- java -XX:+UnlockDiagnosticVMOptions -XX:HandshakeTimeout=1 Test.java
(also happens wit -rpl instead of -future)
[12.526s][error][handshake] Handshake timeout: Deoptimize(0x00007d9dc1495b90), pending threads: 9
[12.540s][error][handshake] JavaThread 0x00007d9db402d740 has not cleared handshake op: 0x00007d9dc1495b90
[12.541s][error][handshake] JavaThread 0x00007d9db41801e0 has not cleared handshake op: 0x00007d9dc1495b90
[12.541s][error][handshake] JavaThread 0x00007d9db4181520 has not cleared handshake op: 0x00007d9dc1495b90
[12.541s][error][handshake] JavaThread 0x00007d9db4182d90 has not cleared handshake op: 0x00007d9dc1495b90
[12.541s][error][handshake] JavaThread 0x00007d9db4184980 has not cleared handshake op: 0x00007d9dc1495b90
[12.541s][error][handshake] JavaThread 0x00007d9db4186480 has not cleared handshake op: 0x00007d9dc1495b90
[12.541s][error][handshake] JavaThread 0x00007d9db4188a30 has not cleared handshake op: 0x00007d9dc1495b90
[12.541s][error][handshake] JavaThread 0x00007d9db418a720 has not cleared handshake op: 0x00007d9dc1495b90
[12.541s][error][handshake] JavaThread 0x00007d9d40017fa0 has not cleared handshake op: 0x00007d9dc1495b90
#
# A fatal error has been detected by the Java Runtime Environment:
#
# SIGILL (0x4) at pc=0x00007d9dc5a98d71 (sent by kill), pid=329828, tid=329852
#
# JRE version: Java(TM) SE Runtime Environment (26.0+3) (fastdebug build 26-ea+3-153)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (fastdebug 26-ea+3-153, mixed mode, sharing, tiered, compressed oops, compressed class ptrs, g1 gc, linux-amd64)
# Problematic frame:
# C [libc.so.6+0x98d71]
#
Stack: [0x00007d9d346f1000,0x00007d9d347f1000], sp=0x00007d9d347ef9b0, free space=1018k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
C [libc.so.6+0x98d71]
C [libc.so.6+0x9bc8e] pthread_cond_timedwait+0x23e
V [libjvm.so+0x1799c6d] PlatformMonitor::wait(unsigned long)+0xbd
V [libjvm.so+0x16db26a] Monitor::wait(unsigned long)+0xca
V [libjvm.so+0xb509cb] CompileQueue::get(CompilerThread*)+0x8b
V [libjvm.so+0xb5653b] CompileBroker::compiler_thread_loop()+0x3ab
V [libjvm.so+0x10a8e0b] JavaThread::thread_main_inner()+0x13b
V [libjvm.so+0x1b0ca06] Thread::call_run()+0xb6
V [libjvm.so+0x1787f38] thread_native_entry(Thread*)+0x128
C [libc.so.6+0x9caa4]
It reproduces since JDK 17u for me.
[1] https://www.intel.com/content/www/us/en/developer/articles/tool/software-development-emulator.html
- relates to
-
JDK-8189941 Implementation JEP 312: Thread-local handshake
-
- Resolved
-