[jdk8u-dev] RFR: 8339133: [8u] Profiler crashes at guarantee(is_result_safe || is_in_asgct()): unsafe access to zombie method
Andrei Pangin
apangin at openjdk.org
Wed Aug 28 02:22:07 UTC 2024
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
-------------
Commit messages:
- 8339133: [8u] Profiler crashes at guarantee(is_result_safe || is_in_asgct()): unsafe access to zombie method
Changes: https://git.openjdk.org/jdk8u-dev/pull/568/files
Webrev: https://webrevs.openjdk.org/?repo=jdk8u-dev&pr=568&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8339133
Stats: 3 lines in 1 file changed: 1 ins; 0 del; 2 mod
Patch: https://git.openjdk.org/jdk8u-dev/pull/568.diff
Fetch: git fetch https://git.openjdk.org/jdk8u-dev.git pull/568/head:pull/568
PR: https://git.openjdk.org/jdk8u-dev/pull/568
More information about the jdk8u-dev
mailing list