RFR: 8348960: [leyden] compiler/c1/TestConcurrentPatching.java is stuck [v3]

Aleksey Shipilev shade at openjdk.org
Tue Feb 4 13:46:38 UTC 2025


On Mon, 3 Feb 2025 17:43:26 GMT, Vladimir Ivanov <vlivanov at openjdk.org> wrote:

>> Aleksey Shipilev has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Move the fix to CompileTask.get
>
> src/hotspot/share/compiler/compileBroker.cpp line 421:
> 
>> 419:   assert(_lock->owned_by_self(), "must own lock");
>> 420: 
>> 421:   CompileTask* task;
> 
> I assume these changes aren't strictly needed (`_queue` is always drained under the lock).

While `_queue` is drained under the lock, it is being _added to_ without a lock, which means we are using `empty` under concurrent queue modification, which is, per NBQ docs, not guaranteed to work well. (ABA problems.)

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

PR Review Comment: https://git.openjdk.org/leyden/pull/30#discussion_r1941198326


More information about the leyden-dev mailing list