-
Bug
-
Resolution: Unresolved
-
P4
-
None
-
17.0.14
-
In Review
-
generic
-
linux
There are multiple bug reports against async-profiler and Datadog profiler referring to
guarantee(is_result_safe || is_in_asgct()) failed: unsafe access to zombie method
Examples:
https://github.com/async-profiler/async-profiler/issues/1168
https://github.com/DataDog/dd-trace-java/issues/7144
is_in_asgct() returns false despite AsyncGetCallTrace being clearly visible on the stack trace:
Current thread (0x00007ff7d4092870): JavaThread "I/O dispatcher 103" [_thread_in_Java, id=560, stack(0x00007ff7a14d5000,0x00007ff7a15d6000)]
Stack: [0x00007ff7a14d5000,0x00007ff7a15d6000], sp=0x00007ff7a15d3830, free space=1018k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
V [libjvm.so+0x5a6c04] CodeCache::find_blob(void*)+0xf4
V [libjvm.so+0xe7928b] JavaThread::pd_get_top_frame(frame*, void*, bool)+0x16b
V [libjvm.so+0x6c8526] AsyncGetCallTrace+0x176
The bug appeared as a result of two conflicting backports:
https://github.com/openjdk/jdk17u/commit/19639855311a and https://github.com/openjdk/jdk17u/commit/c2e274e8578427144294735dc06a2f92ffc7cbde
Now, JavaThread has two `_in_asgct` fields: one is declared in Thread class, and another in JavaThread class. AsyncGetCallTrace sets the former field while the above guarantee checks the latter field.
guarantee(is_result_safe || is_in_asgct()) failed: unsafe access to zombie method
Examples:
https://github.com/async-profiler/async-profiler/issues/1168
https://github.com/DataDog/dd-trace-java/issues/7144
is_in_asgct() returns false despite AsyncGetCallTrace being clearly visible on the stack trace:
Current thread (0x00007ff7d4092870): JavaThread "I/O dispatcher 103" [_thread_in_Java, id=560, stack(0x00007ff7a14d5000,0x00007ff7a15d6000)]
Stack: [0x00007ff7a14d5000,0x00007ff7a15d6000], sp=0x00007ff7a15d3830, free space=1018k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
V [libjvm.so+0x5a6c04] CodeCache::find_blob(void*)+0xf4
V [libjvm.so+0xe7928b] JavaThread::pd_get_top_frame(frame*, void*, bool)+0x16b
V [libjvm.so+0x6c8526] AsyncGetCallTrace+0x176
The bug appeared as a result of two conflicting backports:
https://github.com/openjdk/jdk17u/commit/19639855311a and https://github.com/openjdk/jdk17u/commit/c2e274e8578427144294735dc06a2f92ffc7cbde
Now, JavaThread has two `_in_asgct` fields: one is declared in Thread class, and another in JavaThread class. AsyncGetCallTrace sets the former field while the above guarantee checks the latter field.
- relates to
-
JDK-8325585 Remove no longer necessary calls to set/unset-in-asgct flag in JDK 17
-
- Resolved
-
-
JDK-8283849 AsyncGetCallTrace may crash JVM on guarantee
-
- Resolved
-
-
JDK-8304725 AsyncGetCallTrace can cause SIGBUS on M1
-
- Resolved
-
- links to
-
Review(master) openjdk/jdk17u-dev/3400