RFR: 8268165: AsyncLogging will crash if rotate() fails [v2]
Yasumasa Suenaga
ysuenaga at openjdk.java.net
Mon Jun 7 00:51:04 UTC 2021
On Mon, 7 Jun 2021 00:41:53 GMT, Xin Liu <xliu at openjdk.org> wrote:
> I can try to answer this. Synchronous logging writing may happen anywhere and anytime.
> hotspot's mutex requires Thread::current(). We can't assume that in very early stage or very late stage, or it will fail this assertion.
>
> ```
> assert(current != NULL, "Thread::current() called on detached thread");
> ```
>
> eg. this logsite is invoked after `delete thread;`.
> https://github.com/openjdk/jdk/blob/master/src/hotspot/share/runtime/threadSMR.cpp#L1027
>
> Semaphore doesn't have this constraint.
Ah, I see. Thanks!
-------------
PR: https://git.openjdk.java.net/jdk/pull/4332
More information about the hotspot-runtime-dev
mailing list