[jdk17u-dev] RFR: 8352649: [17u] guarantee(is_result_safe || is_in_asgct()) failed inside AsyncGetCallTrace
Jaroslav Bachorik
jbachorik at openjdk.org
Mon Mar 24 04:22:16 UTC 2025
On Sun, 23 Mar 2025 22:39:10 GMT, Andrei Pangin <apangin at openjdk.org> wrote:
> This PR fixes intermittent JVM crash at `guarantee(is_result_safe || is_in_asgct()) failed: unsafe access to zombie method` when running profiler.
>
> This guarantee was changed in [JDK-8283849](https://bugs.openjdk.org/browse/JDK-8283849) to avoid failing in AsyncGetCallTrace context. However, after [JDK-8304725](https://bugs.openjdk.org/browse/JDK-8304725) and [JDK-8325585](https://bugs.openjdk.org/browse/JDK-8325585) it started failing again. This is because JDK-8304725 introduced another copy of `_in_asgct` field in Thread class, whereas JDK-8325585 removed setting of `_in_asgct` in JavaThread class. In this way, `AsyncGetCallTrace` sets `Thread::_in_asgct` field, but the above guarantee checks a different `JavaThread::_in_asgct` field.
>
> This PR resolves confusion by removing redundant `_in_asgct` field declared in `JavaThread`. Now, all code consistently sets and reads the only `_in_asgct` field declared in `Thread` class. This matches existing logic in jdk tip and jdk21u.
>
> **Low risk:** straightforward removal of redundant code related to AsyncGetCallTrace.
>
> **Testing:** tier1, runnining Renaissance and DaCapo with async-profiler enabled.
Marked as reviewed by jbachorik (Reviewer).
-------------
PR Review: https://git.openjdk.org/jdk17u-dev/pull/3400#pullrequestreview-2709070461
More information about the jdk-updates-dev
mailing list