Hi David, I've added callstack when JVM crashed: https://bugs.openjdk.java.net/browse/JDK-8145788?focusedCommentId=13880225&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-13880225
This crash occurrs in Arguments::apply_ergo() in Threads::create_vm(). apply_ergo() calls before JavaThread initialization. I think that TraceEvent can avoid crash with two approach: 1. Initialize JavaThread before calling apply_ergo() in create_vm(). 2. Avoid crash at TraceEvent when it is called before JavaThread initialization. Thanks, Yasumasa On 2015/12/22 21:19, David Holmes wrote: > On 19/12/2015 1:50 AM, Yasumasa Suenaga wrote: >> Hi all, >> >> 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.) > > This seems like a logic error to me - something is trying to happen too > early during VM initialization. We need to look at exactly what we are > trying to do here, not just work around the crash. > > David > ----- > >> writeEvent() uses ResourceMark. Default constructor of ResourceMark uses >> ResourceArea in current thread. So ResourceMark in writeEvent() should >> pass valid ResourceArea. >> >> I think this issue is in traceEventClasses.xsl . >> However, my environment (GCC 5.3.1 on Fedora23) cannot build it because >> -Werror=maybe-uninitialized was occurred. >> So I also fixed them together. >> >> I've uploaded webrev. Could you review it? >> http://cr.openjdk.java.net/~ysuenaga/JDK-8145788/webrev.00/ >> >> I'm jdk9 committer, however I cannot access JPRT. >> So I need a sponsor. >> >> >> Thanks, >> >> Yasumasa >>