JDK-8145788 : JVM crashes with -XX:+EnableTracing
  • Type: Bug
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: 9
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2015-12-18
  • Updated: 2019-03-19
  • Resolved: 2016-01-12
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.
JDK 8 JDK 9
8u202Fixed 9 b105Fixed
Related Reports
Duplicate :  
Description
I encountered JVM crash when I passed -XX:+EnableTracing.

I checked core image, it crashed in EventBooleanFlagChanged::writeEvent()
which is called by Arguments::apply_ergo() because thread had not been
initialized. (JVM seems to log changing GC algorithm to G1.)

writeEvent() uses ResourceMark. Default constructor of ResourceMark uses
ResourceArea in current thread. So ResourceMark in writeEvent() should
pass valid ResourceArea.
Comments
JDK 8 Updates Project doesn't use label for push requests. Removing. See http://openjdk.java.net/projects/jdk8u/
24-08-2018

Fix ready
12-01-2016

ILW = H (JVM crash) L (need -XX:+EnableTracing + special timing) H (no workaoround) = P3
04-01-2016

Reproduce and call stack: using configure arguments '--with-native-debug-symbols=internal --with-boot-jdk=/usr/local/jdk1.8.0_66'. $ cat /etc/fedora-release Fedora release 23 (Twenty Three) $ uname -r 4.2.7-300.fc23.x86_64 $ rpm -q glibc gcc glibc-2.22-6.fc23.x86_64 gcc-5.3.1-2.fc23.x86_64 $ ./OpenJDK/hs-rt/build/linux-x86_64-normal-server-release/images/jdk/bin/java -XX:+EnableTracing -version Segmentation fault (core dumped) $ gdb ./OpenJDK/hs-rt/build/linux-x86_64-normal-server-release/images/jdk/bin/java core.11293 GNU gdb (GDB) Fedora 7.10.1-30.fc23 : Core was generated by `./OpenJDK/hs-rt/build/linux-x86_64-normal-server-release/images/jdk/bin/java -X'. Program terminated with signal SIGSEGV, Segmentation fault. #0 0x00007f28b6e3da97 in Thread::resource_area (this=<optimized out>) at /home/ysuenaga/OpenJDK/hs-rt/hotspot/src/share/vm/runtime/thread.hpp:418 418 ResourceArea* resource_area() const { return _resource_area; } [Current thread is 1 (Thread 0x7f28b8485700 (LWP 11294))] Missing separate debuginfos, use: dnf debuginfo-install libgcc-5.3.1-2.fc23.x86_64 libstdc++-5.3.1-2.fc23.x86_64 (gdb) bt #0 0x00007f28b6e3da97 in Thread::resource_area (this=<optimized out>) at /home/ysuenaga/OpenJDK/hs-rt/hotspot/src/share/vm/runtime/thread.hpp:418 #1 ResourceMark::initialize (thread=<optimized out>, this=<synthetic pointer>) at /home/ysuenaga/OpenJDK/hs-rt/hotspot/src/share/vm/memory/resourceArea.hpp:92 #2 ResourceMark::ResourceMark (this=<synthetic pointer>) at /home/ysuenaga/OpenJDK/hs-rt/hotspot/src/share/vm/memory/resourceArea.hpp:116 #3 EventBooleanFlagChanged::writeEvent (this=<synthetic pointer>) at ../generated/tracefiles/traceEventClasses.hpp:895 #4 TraceEvent<EventBooleanFlagChanged>::commit (this=<synthetic pointer>) at /home/ysuenaga/OpenJDK/hs-rt/hotspot/src/share/vm/trace/traceEvent.hpp:106 #5 trace_flag_changed<EventBooleanFlagChanged, bool> (origin=Flag::ERGONOMIC, new_value=true, old_value=false, name=0x7f28b7384812 "UseG1GC") at /home/ysuenaga/OpenJDK/hs-rt/hotspot/src/share/vm/runtime/globals.cpp:785 #6 CommandLineFlags::boolAtPut ( flag=flag@entry=0x7f28b7816540 <flagTable+8448>, value=value@entry=0x7f28b8484c2c, origin=origin@entry=Flag::ERGONOMIC) at /home/ysuenaga/OpenJDK/hs-rt/hotspot/src/share/vm/runtime/globals.cpp:813 #7 0x00007f28b6e4084f in CommandLineFlags::boolAtPut (origin=Flag::ERGONOMIC, value=0x7f28b8484c2c, flag=<optimized out>) at /home/ysuenaga/OpenJDK/hs-rt/hotspot/src/share/vm/runtime/globals.cpp:829 #8 CommandLineFlagsEx::boolAtPut (flag=flag@entry=Flag_UseG1GC_bool, value=value@entry=true, origin=origin@entry=Flag::ERGONOMIC) at /home/ysuenaga/OpenJDK/hs-rt/hotspot/src/share/vm/runtime/globals.cpp:828 #9 0x00007f28b6ae69a5 in Arguments::select_gc_ergonomically () at /home/ysuenaga/OpenJDK/hs-rt/hotspot/src/share/vm/runtime/arguments.cpp:1826 #10 Arguments::select_gc () at /home/ysuenaga/OpenJDK/hs-rt/hotspot/src/share/vm/runtime/arguments.cpp:1836 #11 0x00007f28b6ae6ab2 in Arguments::set_ergonomics_flags () at /home/ysuenaga/OpenJDK/hs-rt/hotspot/src/share/vm/runtime/arguments.cpp:1842 #12 0x00007f28b6ae771e in Arguments::apply_ergo () at /home/ysuenaga/OpenJDK/hs-rt/hotspot/src/share/vm/runtime/arguments.cpp:4127 #13 0x00007f28b72c0d71 in Threads::create_vm (args=0x7f28b8484f00, canTryAgain=canTryAgain@entry=0x7f28b8484e3f) at /home/ysuenaga/OpenJDK/hs-rt/hotspot/src/share/vm/runtime/thread.cpp:3420 #14 0x00007f28b6ee3082 in JNI_CreateJavaVM_inner (args=<optimized out>, penv=0x7f28b8484ef8, vm=0x7f28b8484ef0) at /home/ysuenaga/OpenJDK/hs-rt/hotspot/src/share/vm/prims/jni.cpp:4016 #15 JNI_CreateJavaVM (vm=0x7f28b8484ef0, penv=0x7f28b8484ef8, args=<optimized out>) at /home/ysuenaga/OpenJDK/hs-rt/hotspot/src/share/vm/prims/jni.cpp:4105 #16 0x00007f28b7e4afc3 in InitializeJVM (ifn=<synthetic pointer>, penv=0x7f28b8484ef8, pvm=0x7f28b8484ef0) at /home/ysuenaga/OpenJDK/hs-rt/jdk/src/java.base/share/native/libjli/java.c:1156 #17 JavaMain (_args=<optimized out>) at /home/ysuenaga/OpenJDK/hs-rt/jdk/src/java.base/share/native/libjli/java.c:375 #18 0x00007f28b806160a in start_thread (arg=0x7f28b8485700) at pthread_create.c:334 #19 0x00007f28b797fa9d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109 (gdb) disas Dump of assembler code for function CommandLineFlags::boolAtPut(Flag*, bool*, Flag::Flags): 0x00007f28b6e3d9d0 <+0>: push %rbp : => 0x00007f28b6e3da97 <+199>: mov 0x110(%rax),%r9 : (gdb) p/x $rax $2 = 0x0
19-12-2015