SIGSEGV in Method::set_on_stack while running JMH benchmark

Eirik Bjørsnøs eirbjo at gmail.com
Thu Jan 21 15:22:50 UTC 2021


Hi,

I got a SIGSEGV while running a JMH benchmark. ( I believe it had -prof jfr
and -prof gc enabled).

Debugging this is above my pay grade, but I found this in
Method::set_on_stack:

2301: constants()->set_on_stack(value);

Could it be that constants() returns something unexpected?

Another observation is that class redefinition seems to be involved,.

This is no showstopper for me (In benchmark, only happened once), but
perhaps a Hotspot wiz wants to take a look. I can send the entire hs_err
file on request.

Cheers,
Eirik.


---------------  S U M M A R Y ------------

Command Line: -Dfile.encoding=UTF-8 -XX:+UnlockDiagnosticVMOptions
-XX:+DebugNonSafepoints
-XX:CompileCommandFile=/var/folders/1n/jtwrr03x6_x8sw39jpl8qr_r0000gn/T/jmh7169653786094403218compilecommand
org.openjdk.jmh.runner.ForkedMain 127.0.0.1 56682

Host: MacBookPro13,3 x86_64 2600 MHz, 8 cores, 16G, Darwin 20.2.0, macOS
10.16 (20C69)
Time: Wed Jan 20 00:15:32 2021 CET elapsed time: 55.183476 seconds (0d 0h
0m 55s)

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

Current thread (0x00007ffc90e0a4e0):  VMThread "VM Thread" [stack:
0x000070000e50f000,0x000070000e60f000] [id=14339]

Stack: [0x000070000e50f000,0x000070000e60f000],  sp=0x000070000e60ea60,
 free space=1022k
Native frames: (J=compiled Java code, A=aot compiled Java code,
j=interpreted, Vv=VM code, C=native code)
V  [libjvm.dylib+0x853fe8]  Method::set_on_stack(bool)+0x18
V  [libjvm.dylib+0xa9bceb]  ThreadHandlesClosure::do_thread(Thread*)+0x3b
V  [libjvm.dylib+0xa9a63e]  Threads::metadata_handles_do(void
(*)(Metadata*))+0x7e
V  [libjvm.dylib+0x840fbc]  MetadataOnStackMark::MetadataOnStackMark(bool,
bool)+0x1c
V  [libjvm.dylib+0x6f78fc]  VM_RedefineClasses::doit()+0x4c
V  [libjvm.dylib+0xb12756]  VM_Operation::evaluate()+0xd6
V  [libjvm.dylib+0xb17b27]
 VMThread::evaluate_operation(VM_Operation*)+0x157
V  [libjvm.dylib+0xb183e4]  VMThread::inner_execute(VM_Operation*)+0x194
V  [libjvm.dylib+0xb1776c]  VMThread::run()+0xbc
V  [libjvm.dylib+0xa91cf1]  Thread::call_run()+0x71
V  [libjvm.dylib+0x8ae387]  thread_native_entry(Thread*)+0x157
C  [libsystem_pthread.dylib+0x6950]  _pthread_start+0xe0
C  [libsystem_pthread.dylib+0x247b]  thread_start+0xf


siginfo: si_signo: 11 (SIGSEGV), si_code: 1 (SEGV_MAPERR), si_addr:
0x0000000000000000


More information about the hotspot-compiler-dev mailing list