RFR: 8268638: semaphores of AsyncLogWriter may be broken when JVM is exiting. [v5]

Paul Hohensee phh at openjdk.java.net
Wed Jun 16 15:08:38 UTC 2021


On Tue, 15 Jun 2021 07:24:10 GMT, Xin Liu <xliu at openjdk.org> wrote:

>> All 3 semaphores used by AsyncLogWriter are static member data. CRT(`libsystem_c.dylib __cxa_finalize_ranges`) deletes them on MacOS. Currently, AsyncLog Thread doesn't exit at all. As a result, semaphore_wait/signal
>> returns with KERN_INVALID_NAME(15) After those semaphore are destroyed. 
>> 
>> This patch change those to regular data members. This prevents from deleting.
>> This patch also provides a general RAII class AsyncLogLocker which is analogous MutexLocker.
>
> Xin Liu has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Use AsyncLogWriter::_instance->_lock directly.

Looks good.

-------------

Marked as reviewed by phh (Reviewer).

PR: https://git.openjdk.java.net/jdk/pull/4479


More information about the hotspot-runtime-dev mailing list