Integrated: 8319206: [REDO] Event NativeLibraryLoad breaks invariant by taking a stacktrace when thread is in state _thread_in_native
Markus Grönlund
mgronlun at openjdk.org
Thu Nov 2 12:21:17 UTC 2023
On Wed, 1 Nov 2023 11:12:41 GMT, Markus Grönlund <mgronlun at openjdk.org> wrote:
> Greetings,
>
> The original problem was introduced with:
>
> [JDK-8313251](https://bugs.openjdk.org/browse/JDK-8313251) - Add NativeLibraryLoad event
>
> The first attempt at resolution:
>
> [JDK-8315220](https://bugs.openjdk.org/browse/JDK-8315220) - Event NativeLibraryLoad breaks invariant by taking a stacktrace when thread is in state _thread_in_native
>
> was reverted:
>
> [JDK-8315930](https://bugs.openjdk.org/browse/JDK-8315930) - Revert "8315220: Event NativeLibraryLoad breaks invariant by taking a stacktrace when thread is in state _thread_in_native"
>
> because it ran into:
>
> [JDK-8315892](https://bugs.openjdk.org/browse/JDK-8315892) - NativeLibraryLoadEvent dtr fails with "assert(false) failed: Possible safepoint reached by thread that does not allow it"
>
> The reason for [JDK-8315892](https://bugs.openjdk.org/browse/JDK-8315892) was that the thread loading the zip library, in thread state native, was the owner of the Zip_lock mutex. This prevented it from transitioning to thread_in_vm.
>
> The Zip_lock mutex was removed as part of:
>
> [JDK-8317951](https://bugs.openjdk.org/browse/JDK-8317951) - Refactor loading of zip library to help resolve [JDK-8315220](https://bugs.openjdk.org/browse/JDK-8315220)
>
> Therefore, it is time to redo the original [JDK-8315220](https://bugs.openjdk.org/browse/JDK-8315220), now under this issue, [JDK-8319206](https://bugs.openjdk.org/browse/JDK-8319206).
>
> Testing: jdk_jfr, tiers1-6, stress testing
>
> Thanks
> Markus
This pull request has now been integrated.
Changeset: faa8bde2
Author: Markus Grönlund <mgronlun at openjdk.org>
URL: https://git.openjdk.org/jdk/commit/faa8bde27569b4db3a1a9dd62adee0b10e81a718
Stats: 395 lines in 10 files changed: 243 ins; 114 del; 38 mod
8319206: [REDO] Event NativeLibraryLoad breaks invariant by taking a stacktrace when thread is in state _thread_in_native
Reviewed-by: dholmes, egahlin
-------------
PR: https://git.openjdk.org/jdk/pull/16447
More information about the hotspot-jfr-dev
mailing list