RFR: 8212107: VMThread issues and cleanup [v2]

Robbin Ehn rehn at openjdk.java.net
Mon Sep 21 07:33:33 UTC 2020


On Fri, 18 Sep 2020 09:08:26 GMT, Robbin Ehn <rehn at openjdk.org> wrote:

>> src/hotspot/share/runtime/vmThread.cpp line 355:
>> 
>>> 353:     }
>>> 354:     ml.notify_all();
>>> 355:     ml.wait();
>> 
>> It is really odd to see back-to-back `notify_all` and `wait`. Would that mean two threads sitting in this loop would
>> just wake one another continuously?
>
> This can theoretically be an issue if there is operation set and then two non-JavaThread trying set a operation.
> Or if there is a handshake operation set.
> 
> I did not consider this scenario proper.
> I think we need two separate Monitors.
> Fixing

Please go over the changes in fceebea and see if you agree that it is correct :)
Passes t1-t8.

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

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


More information about the hotspot-dev mailing list