RFR: 8284402: serviceability/jvmti/events/MonitorContendedEntered/mcontent…

Leonid Mesnik lmesnik at openjdk.java.net
Mon Apr 25 03:08:22 UTC 2022


On Mon, 25 Apr 2022 02:50:47 GMT, Serguei Spitsyn <sspitsyn at openjdk.org> wrote:

> The following tests fail in Loom:
>   serviceability/jvmti/events/MonitorContendedEnter/mcontenter01
>   serviceability/jvmti/events/MonitorContendedEntered/mcontentered01
>   serviceability/jvmti/events/MonitorWait/monitorwait01
>   serviceability/jvmti/events/MonitorWaited/monitorwaited01
> 
> with the error:
> 
> # Internal Error (/opt/mach5/mesos/work_dir/slaves/779adf21-f3e5-4e6a-a889-8cc0f9bc6fbb-S14747/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/4ceff4c0-ff1e-4329-9c88-90f77211fe28/runs/480df0be-42f1-45f1-add5-989e159fadb3/workspace/open/src/hotspot/share/runtime/jniHandles.inline.hpp:64), pid=15533, tid=15535
> # assert(external_guard || result != __null) failed: Invalid JNI handle 
> 
> 
> The problem is that the agent thread has this code without synchronization:
> -  jni->DeleteGlobalRef(expected_object);
> -  jni->DeleteGlobalRef(expected_thread);
> 
> So, the expected_object and expected_thread can be destroyed when an event callback is still executed.
> The simplest way to fix it to remove this fragment.
> Also, these Loom tests were originated/converted from the nsk.jvmti tests which do not have this fragment.

Marked as reviewed by lmesnik (Committer).

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

PR: https://git.openjdk.java.net/loom/pull/165


More information about the loom-dev mailing list