RFR: 8283849: AsyncGetCallTrace may crash JVM on guarantee

Jaroslav Bachorik jbachorik at openjdk.java.net
Thu Apr 14 11:50:35 UTC 2022


A gist of the fix is to allow relaxed instantiation of a frame when done from a signal handler - eg. for profiling purposes. 

Currently, a frame instantiation will fail on guarantee when we happen to hit a zombie method which is still on stack. While this would indicate a serious error for the normal execution flow, in case of profiling where the executing thread can be expected at any possible method this is something which may happen and we really should not take the profiled JVM down due to it.

The behaviour defaults to checking the code blob status in the guarantee so nothing will change for the rest of the callers - just ASGCT will be affected.

<hr>
Unfortunately, I am not able to create a simple reproducer for the crash other that testing in our production where the crash is happening sporadically.
However, thanks to @parttimenerd and his [ASGCT stress test](https://github.com/parttimenerd/asgct2-tester.git) the problem can be reproduced quite reliably.

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

Commit messages:
 - Add missing change for linux_arm
 - Remove unnecessary pc_from_sp()
 - Merge branch 'master' into jb/agct_crash_fix
 - Missing s390/linux fix part
 - Fix linux/s390
 - One more rename
 - Rename parameter
 - Fix whitespace errors
 - 8283849: AsyncGetCallTrace may crash JVM

Changes: https://git.openjdk.java.net/jdk/pull/8061/files
 Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=8061&range=00
  Issue: https://bugs.openjdk.java.net/browse/JDK-8283849
  Stats: 214 lines in 35 files changed: 73 ins; 4 del; 137 mod
  Patch: https://git.openjdk.java.net/jdk/pull/8061.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/8061/head:pull/8061

PR: https://git.openjdk.java.net/jdk/pull/8061


More information about the hotspot-dev mailing list