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

Aleksey Shipilev shade at openjdk.org
Tue Oct 29 15:46:23 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

Marked as reviewed by shade (Reviewer).

I looked at GHA failures, and they do not look relevant to this PR.

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

PR Review: https://git.openjdk.org/jdk8u-dev/pull/568#pullrequestreview-2402363359
PR Comment: https://git.openjdk.org/jdk8u-dev/pull/568#issuecomment-2444658842


More information about the jdk8u-dev mailing list