On Mon, 1 Aug 2022 07:41:50 GMT, Serguei Spitsyn <sspit...@openjdk.org> wrote:

> This is a regression that has been introduced by the fix of:
> [8256811](https://bugs.openjdk.org/browse/JDK-8256811): Delayed/missed jdwp 
> class unloading events
> 
> This is the relevant comment from Zhengyu:
> 
> It is caused by https://bugs.openjdk.org/browse/JDK-8256811 as 
> JvmtiExport::post_object_free() call does not expect under any lock.
> 
> I think we can move following code outside of lock, as 
> flush_obect_free_events() races ServiceThread's 
> JvmtiTagMap::flush_all_object_free_events() call anyway.
> 
>   if (event_type == JVMTI_EVENT_OBJECT_FREE) {
>     flush_object_free_events(env);
>   }
> 
> The fix is as was suggested by Zhengyu above.
> I was not able to reproduce JCK and nsk.jvmti test failures mentioned in the 
> bug report.
> However, this fix should address the problem as it moves the call to 
> `flush_object_free_events(env)` out of a critical section with a lock.

Marked as reviewed by cjplummer (Reviewer).

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

PR: https://git.openjdk.org/jdk/pull/9699

Reply via email to