RFR: 8259242: vmTestbase/vm/mlvm/mixed/stress/java/findDeadlock/TestDescription.java timed out
Coleen Phillimore
coleenp at openjdk.java.net
Wed Apr 7 12:05:35 UTC 2021
On Wed, 7 Apr 2021 04:55:35 GMT, David Holmes <dholmes at openjdk.org> wrote:
>> This change makes the DictionaryEntry pd_set lock free, because when I set a low SafepointTimeout on the findDeadlock test, these threads were waiting on the ProtectionDomainSet_lock. This lock is a singleton that's taken for every dictionary entry.
>>
>> I don't know if this change will make the test never timeout again, because removing this lock caused us to hit a low SafepointTimeout on another _no_safepoint_check lock that is not so easy to eradictate.
>>
>> Tested with tiers 1-3. There's a test that exercises this code in runtime/Dictionary/ProtectionDomainCacheTest.java.
>
> Hi Coleen,
>
> Can you explain the synchronization protocol you are using here please - I don't understand how the handshake fits into it ??
>
> Further comments below.
>
> Thanks,
> David
The lock-free algorithm is based on the one for object monitors, except that adding and deleting entries is done with the SystemDictionary_lock held, reading entries is done with a (now) Atomic load acquires etc with no safepoint polls, and deleting the entries is done by saving the entries off to the side, until a handshake is reached, meaning none of the readers are reading the old version of the list.
-------------
PR: https://git.openjdk.java.net/jdk/pull/3362
More information about the hotspot-dev
mailing list