TravaOpenJDK / trava-jdk-11-dcevm

dcevm-11 built on Travis
Apache License 2.0
403 stars 57 forks source link

Crash during hotswap - Klass::java_mirror() #17

Closed ninja- closed 4 years ago

ninja- commented 5 years ago

:(

# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0x00007f2b33f50431, pid=27973, tid=27977
#
# JRE version: OpenJDK Runtime Environment (11.0.1.6+8) (build 11.0.1.6+8-201904021627)
# Java VM: Dynamic Code Evolution 64-Bit Server VM (11.0.1.6+8-201904021627, mixed mode, tiered, compressed oops, serial gc, linux-amd64)
# Problematic frame:
# V  [libjvm.so+0xa4c431]  Klass::java_mirror() const+0x1
#
# Core dump will be written. Default location: 
#
# An error report file with more information is saved as:
#
# If you would like to submit a bug report, please visit:
#   https://github.com/AdoptOpenJDK/openjdk-build/issues
#
V  [libjvm.so+0xa4c431]  Klass::java_mirror() const+0x1
V  [libjvm.so+0x9aaffd]  VM_EnhancedRedefineClasses::redefine_single_class(InstanceKlass*, Thread*)+0xc9d
V  [libjvm.so+0x9ab957]  VM_EnhancedRedefineClasses::doit()+0xa7
V  [libjvm.so+0xe27cf0]  VM_Operation::evaluate()+0xe0
V  [libjvm.so+0xe250fd]  VMThread::evaluate_operation(VM_Operation*) [clone .constprop.55]+0xcd
V  [libjvm.so+0xe254c8]  VMThread::loop()+0x218
V  [libjvm.so+0xe25b14]  VMThread::run()+0x84
V  [libjvm.so+0xc14580]  thread_native_entry(Thread*)+0xf0
skybber commented 5 years ago

What kind of code redefinition did you make?

ninja- commented 5 years ago

Basically hotswapping class with the same .class file and no changes(few times in a row)

ninja- commented 5 years ago

Looks like it crashes in logger code? https://github.com/HotswapProjects/openjdk-jdk11u-dcevm/blob/3d74656b8b8fb18e0e780c74fbf0684c9fd86cbf/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp#L1904

skybber commented 5 years ago

We did tests with thousands of redefinitions of single class but I did not see this problem... Could you prepare a test project?

ninja- commented 5 years ago

I think it stopped crashing when I limited my hotswaps to my project classes without libraries. If I hotswapped everything there was some class that trigerred it, some mongodb class maybe...

skybber commented 4 years ago

It is fixed in Dcevm-11.0.5+2