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

Andrei Pangin apangin at openjdk.org
Tue Oct 29 15:46:24 UTC 2024


On Wed, 28 Aug 2024 02:13:23 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

This pull request has now been integrated.

Changeset: 7e1ea515
Author:    Andrei Pangin <apangin at openjdk.org>
Committer: Aleksey Shipilev <shade at openjdk.org>
URL:       https://git.openjdk.org/jdk8u-dev/commit/7e1ea515911827915c27c6568585c6c7906a74d9
Stats:     3 lines in 1 file changed: 1 ins; 0 del; 2 mod

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

Reviewed-by: stuefe, shade

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

PR: https://git.openjdk.org/jdk8u-dev/pull/568


More information about the jdk8u-dev mailing list