RFR: 8268638: semaphores of AsyncLogWriter may be broken when JVM is exiting. [v3]
Xin Liu
xliu at openjdk.java.net
Mon Jun 14 23:33:25 UTC 2021
> 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:
Change AsyncLogLocker to SemaphoreLock.
Per reviewer's feedback, Semaphore declares SemaphoreLocker as a friend.
now SemaphoreLocker is a general RAII class.
-------------
Changes:
- all: https://git.openjdk.java.net/jdk/pull/4479/files
- new: https://git.openjdk.java.net/jdk/pull/4479/files/b7f853de..63e1fddf
Webrevs:
- full: https://webrevs.openjdk.java.net/?repo=jdk&pr=4479&range=02
- incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=4479&range=01-02
Stats: 29 lines in 2 files changed: 18 ins; 4 del; 7 mod
Patch: https://git.openjdk.java.net/jdk/pull/4479.diff
Fetch: git fetch https://git.openjdk.java.net/jdk pull/4479/head:pull/4479
PR: https://git.openjdk.java.net/jdk/pull/4479
More information about the hotspot-runtime-dev
mailing list