Integrated: 8355608: Async UL should take the file lock of stream when outputting

Johan Sjölen jsjolen at openjdk.org
Mon May 19 10:55:03 UTC 2025


On Fri, 25 Apr 2025 13:01:44 GMT, Johan Sjölen <jsjolen at openjdk.org> wrote:

> With the introduction of [JDK-8349755](https://bugs.openjdk.org/browse/JDK-8349755), it is not entirely clear any longer that the Async UL has exclusive access to the files which are being logged to in the JVM. We should take the file lock for the stream being logged to for safety's sake.
> 
> If, for example, an unattached thread logs, then it will do so without the help of the Async UL thread.
> 
> This is expected to very rarely, if ever, happen. Since taking an uncontested mutex is very cheap, I expect this to have a negligible performance impact.
> 
> Testing: GHA, tier1
> 
> Cheers,
> Johan

This pull request has now been integrated.

Changeset: 7f7add1e
Author:    Johan Sjölen <jsjolen at openjdk.org>
URL:       https://git.openjdk.org/jdk/commit/7f7add1e56c4da18ce8fbbbf6e34e985c3054604
Stats:     5 lines in 1 file changed: 1 ins; 3 del; 1 mod

8355608: Async UL should take the file lock of stream when outputting

Reviewed-by: aboldtch, iklam

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

PR: https://git.openjdk.org/jdk/pull/24874


More information about the hotspot-runtime-dev mailing list