RFR: 8265984: Concurrent GC: Some tests fail "assert(is_frame_safe(f)) failed: Frame must be safe"

Per Liden pliden at openjdk.java.net
Mon May 3 07:27:51 UTC 2021


On Fri, 30 Apr 2021 14:01:14 GMT, Zhengyu Gu <zgu at openjdk.org> wrote:

>> JDK-8265702 introduced a change in `OptoRuntime::handle_exception_C()` where it no longer processed frames when asking for the caller. This change turned out to cause intermittent test failures. We shouldn't have to process frames here, since we're not touching any oops, but it seems that processing frames here avoids some other issue. To avoid noise in out testing I suggest we revert to processing frames here for now (and add the required ThreadWXEnable for macos/aarch64), while we continue to investigate why this is needed.
>> 
>> Testing: Passed tier1-7 on linux/x86 and macos/aarch64
>
> src/hotspot/share/opto/runtime.cpp line 1380:
> 
>> 1378: 
>> 1379:   if (nm != NULL) {
>> 1380:     RegisterMap map(current, false);
> 
> Should you add `MACOS_AARCH64_ONLY(ThreadWXEnable wx(WXWrite, current));` here, as you suggested in CR?
> Seems the code change is inconsistent with the comments above.

I reverted back to exactly what we used to do here prior to JDK-8265702, to avoid affecting anything but ZGC. I'm placing the ThreadWXEnable in the ZGC nmethod barrier since we want these as close to the patching code as possible, and we can end up in there through multiple paths.

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

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



More information about the hotspot-gc-dev mailing list