In our systems we are getting a non-trivial number of JVM crashes caused by AsyncGetCallTrace.
Here is the excerpt from the crash log:
```
#
# A fatal error has been detected by the Java Runtime Environment:
#
# Internal Error (codeCache.cpp:639), pid=7, tid=194
# guarantee(result == NULL || !result->is_zombie() || result->is_locked_by_vm() || VMError::is_error_reported()) failed: unsafe access to zombie method
#
# JRE version: OpenJDK Runtime Environment Temurin-17.0.2+8 (17.0.2+8) (build 17.0.2+8)
# Java VM: OpenJDK 64-Bit Server VM Temurin-17.0.2+8 (17.0.2+8, mixed mode, sharing, tiered, compressed oops, compressed class ptrs, parallel gc, linux-amd64)
# Problematic frame:
# V [libjvm.so+0x5b0a58] CodeCache::find_blob(void*)+0xb8
#
# Core dump will be written. Default location: /usr/local/app/core
#
# JFR recording file will be written. Location: /usr/local/app/hs_err_pid7.jfr
#
# If you would like to submit a bug report, please visit:
# https://github.com/adoptium/adoptium-support/issues
```
The full log is attached.
The root cause is AsyncGetCallTrace calling `CodeCache::find_blob()` which contains a guarantee which will fail if we happen to hit a zombie method. This is particularly unpleasant as that guarantee will take down the JVM with crash.
This crash happens when the last frame is marked as zombie but the associated resources haven't been cleaned by the sweeper yet.