[jdk8u-dev] RFR: 8339133: [8u] Profiler crashes at guarantee(is_result_safe || is_in_asgct()): unsafe access to zombie method [v2]

duke duke at openjdk.org
Tue Oct 29 15:23:20 UTC 2024


On Wed, 28 Aug 2024 10:42:37 GMT, Andrei Pangin <apangin at openjdk.org> wrote:

>> When running AsyncGetCallTrace based profiler, JVM occasionally crashes on the guarantee at codeCache.cpp:287:
>> 
>> guarantee(is_result_safe || is_in_asgct(), "unsafe access to zombie method");
>> 
>> According to the stack trace, a thread is inside `AsyncGetCallTrace` at the moment of crash, but `is_in_asgct() == false`.
>> 
>> Current implementation of `AsyncGetCallTrace` is not reentrant, since it incorrectly resets `in_asgct` flag of the current thread. The fix is similar to [JDK-8329103](https://bugs.openjdk.org/browse/JDK-8329103): `in_asgct` should be reset to previous value instead of `false`.
>> 
>> The fix is trivial and safe: it affects only `AsyncGetCallTrace`.
>> 
>> Testing: tier1, renaissance suite with async-profiler enabled
>
> Andrei Pangin has refreshed the contents of this pull request, and previous commits have been removed. The incremental views will show differences compared to the previous content of the PR. The pull request contains one new commit since the last revision:
> 
>   8339133: [8u] Profiler crashes at guarantee(is_result_safe || is_in_asgct()): unsafe access to zombie method

@apangin 
Your change (at version 39d645367e089d3e5d2e0851395c5a38812ed647) is now ready to be sponsored by a Committer.

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

PR Comment: https://git.openjdk.org/jdk8u-dev/pull/568#issuecomment-2444580180


More information about the jdk8u-dev mailing list