RFR: 8281615: Deadlock caused by jdwp agent [v2]
Chris Plummer
cjplummer at openjdk.java.net
Tue Feb 15 20:22:12 UTC 2022
On Tue, 15 Feb 2022 17:50:19 GMT, Zhengyu Gu <zgu at openjdk.org> wrote:
>> src/jdk.jdwp.agent/share/native/libjdwp/classTrack.c line 215:
>>
>>> 213: classTrack_activate(JNIEnv *env)
>>> 214: {
>>> 215: struct bag* new_bag = bagCreateBag(sizeof(char*), 1000);
>>
>> I don't think there can be any race during activation but this change is harmless.
>
> I am not sure classTrack_activate() has the problem, but it is called outside of initialization, inside debug loop ... so I assume that event callback might happen.
I agree. This code is called when the debug agent receives a CLASS_UNLOAD EventRequest (which the debug agent handles by requesting JVMTI GC_FINISH events). So there is nothing that prevents `classTrack_processUnloads()` from being called at the same time.
-------------
PR: https://git.openjdk.java.net/jdk/pull/7461
More information about the serviceability-dev
mailing list