RFR: 8264605: vmTestbase/nsk/jvmti/SuspendThread/suspendthrd003/TestDescription.java failed with "agent_tools.cpp, 471: (foundThread = (jthread) jni_env->NewGlobalRef(foundThread)) != NULL"

Serguei Spitsyn sspitsyn at openjdk.java.net
Tue Nov 23 22:44:07 UTC 2021


On Tue, 23 Nov 2021 06:49:47 GMT, Leonid Mesnik <lmesnik at openjdk.org> wrote:

> The agentThread variable might have been set by the new agentThread iteration and then deleted in the wrapper from the previous iteration.
> 
> The deletion of agentThread variable should be synced with the termination of the agent thread.

Hi Leonid,
It looks good to me.
I see the initialization of agentThread is also protected with the data.monitor. This code is a little bit ugly, so it is not clear that startAgentThreadWrapper is executed under rawMonitor protection.
Thanks,
Serguei

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

Marked as reviewed by sspitsyn (Reviewer).

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


More information about the serviceability-dev mailing list