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

Andrei Pangin apangin at openjdk.org
Wed Aug 28 10:42:37 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

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

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

Changes:
  - all: https://git.openjdk.org/jdk8u-dev/pull/568/files
  - new: https://git.openjdk.org/jdk8u-dev/pull/568/files/03002200..39d64536

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk8u-dev&pr=568&range=01
 - incr: https://webrevs.openjdk.org/?repo=jdk8u-dev&pr=568&range=00-01

  Stats: 0 lines in 0 files changed: 0 ins; 0 del; 0 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