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

David Holmes david.holmes at oracle.com
Mon Jan 25 02:04:50 UTC 2016

On 21/01/2016 10:30 PM, Marcus Larsson wrote:
> Updated webrev:
> http://cr.openjdk.java.net/~mlarsson/8146009/webrev.01/
> Incremental:
> http://cr.openjdk.java.net/~mlarsson/8146009/webrev.01/
> Only LogConfiguration::initialize() and LogTagSet constructor now calls
> the stdout_output()/stderr_output() functions. Made the functions

When can the LogTagSet constructor be called before 
LogConfiguration::initialize()? And what impact does that have on the 
dependencies that the stdout_output()/stderr_output() functions have?

I still object to defining objects that never get cleaned up. It 
indicates we really don't know when the last logging can happen during 
VM shutdown, and so we don't know if it will work or fail, depending on 
other VM facilities used that may have already been shutdown.


> private to prevent usages from other places. Also removed the previous
> output instances from LogFileStream.{c,h}pp which I forgot to do in the
> first patch.
> Thanks,
> Marcus
> On 01/19/2016 02:58 PM, Marcus Larsson wrote:
>> 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