RFR: 8146009: "pure virtual method called" with using new GC logging mechanism

Marcus Larsson marcus.larsson at oracle.com
Tue Jan 19 13:58:23 UTC 2016


Hi,

Please review the following patch to fix an issue in UL causing the VM 
to crash during shutdown.

The problem is that the static LogStdoutOutput is deinitialized before 
the last use of it (G1 concurrent thread tries to log very late during 
VM shutdown). The solution is to make sure neither LogStdoutOutput nor 
LogStderrOutput are deinitialized during the full lifetime of the VM. To 
accomplish this I've changed the storage from static objects to static 
pointers to heap instances that are allocated & initialized on first use 
[0]. These instances are never deleted and can always be used. Also 
updated LogConfiguration::finalize to disable all file outputs before 
deleting & freeing them.

Webrev:
http://cr.openjdk.java.net/~mlarsson/8146009/webrev.00/

Issue:
https://bugs.openjdk.java.net/browse/JDK-8146009

Testing:
- local runs of the reproducer (500+ iterations without crashing)
- JPRT

Thanks,
Marcus

[0]: https://isocpp.org/wiki/faq/ctors#static-init-order-on-first-use


More information about the hotspot-runtime-dev mailing list