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
Thu Nov 2 12:21:14 UTC 2023


On Thu, 2 Nov 2023 06:31:46 GMT, David Holmes <dholmes 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
>
> General runtime changes seem fine. I can't comment on all the JFR-specific aspects but in general that appears okay too.
> 
> Thanks

Thanks, @dholmes-ora and @egahlin, for the reviews.

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

PR Comment: https://git.openjdk.org/jdk/pull/16447#issuecomment-1790619632


More information about the hotspot-jfr-dev mailing list