RFR: 8264760: JVM crashes when two threads encounter the same resolution error [v3]
David Holmes
david.holmes at oracle.com
Sat Apr 17 12:45:34 UTC 2021
On 17/04/2021 5:42 pm, Wang Huang wrote:
> On Thu, 8 Apr 2021 05:02:27 GMT, David Holmes <dholmes at openjdk.org> wrote:
>
>>> Wang Huang has updated the pull request incrementally with one additional commit since the last revision:
>>>
>>> add throw exception
>>
>> test/hotspot/jtreg/runtime/Nestmates/membership/TestNestHostErrorWithMultiThread.java line 58:
>>
>>> 56: public void test() throws Throwable {
>>> 57:
>>> 58: CountDownLatch latch = new CountDownLatch(1);
>>
>> The use of CDL doesn't guarantee that both threads have reached the await() before the main thread does the countDown(). If you use a CyclicBarrier instead it will trip when the second thread arrives.
>
> @dholmes-ora
Not sure what commentary you are looking for. CyclicBarrier should work
better for ensuring concurrent attempts in theory.
David
> -------------
>
> PR: https://git.openjdk.java.net/jdk/pull/3392
>
More information about the hotspot-runtime-dev
mailing list