review request for 7130319: C2: running with -XX:+PrintOptoAssembly crashes the VM with assert(false) failed: bad tag in log

Dean Long dean.long at
Mon Jan 23 11:25:54 PST 2012

The problem is that the VM thread is trying to exit while another
thread is writing to the XML log. The VM thread also wants to write
to the log, but notices the tag stack doesn't match up. A similar
problem came up before (6295565) and the solution was to relax the
assertion if we were shutting down through JNI DestroyJavaVM. The
above change follows that pattern and also allows shutdown
through JVM_Halt.

More details thanks to David Holmes:

"To be clear the VMThread is writing to the log (actually closing it) as 
part of exit_globals() while executing VM_Exit::doit. This happens after 
it calls set_vm_exited() so we add that as a guard against doing the 
assertion. The problem arises because the CompilerThread was in the 
middle of some writing (as part of PrintOptoAssembly) when it entered 
the safepoint that allows the VM to exit."


More information about the hotspot-runtime-dev mailing list