RFR: 8283849: AsyncGetCallTrace may crash JVM on guarantee [v6]
David Holmes
dholmes at openjdk.java.net
Fri May 6 23:22:52 UTC 2022
On Fri, 6 May 2022 09:40:37 GMT, Jaroslav Bachorik <jbachorik at openjdk.org> wrote:
>> A gist of the fix is to allow relaxed special handling of code blob lookup when done for ASGCT.
>>
>> Currently, a guarantee will fail 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 ASGCT being in progress when 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.
>>
>> <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.
>>
>> <br><br>
>>
>> _Note: This is a followup PR for #8061_
>
> Jaroslav Bachorik 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:
>
> Move 'in_asgct' flag to JavaThread
Looking more closely this even be put in a new final clause in the guarantee:
guarantee(result == NULL ||
!result->is_zombie() ||
result->is_locked_by_vm() ||
VMError::is_error_reported() ||
result->is_zombie() && current_thread_in_asgct()
, "unsafe access to zombie method");
where `current_thread_in_asgct()` is a static helper. That addresses all overhead concerns.
-------------
PR: https://git.openjdk.java.net/jdk/pull/8549
More information about the serviceability-dev
mailing list