RFR: 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
Wed Nov 1 11:19:34 UTC 2023
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
-------------
Commit messages:
- 8319206
Changes: https://git.openjdk.org/jdk/pull/16447/files
Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=16447&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8319206
Stats: 395 lines in 10 files changed: 243 ins; 114 del; 38 mod
Patch: https://git.openjdk.org/jdk/pull/16447.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/16447/head:pull/16447
PR: https://git.openjdk.org/jdk/pull/16447
More information about the hotspot-dev
mailing list