RFR: 8351484: Race condition in max stats in MonitorList::add [v2]

Aleksey Shipilev shade at openjdk.org
Tue Mar 11 18:42:52 UTC 2025


On Mon, 10 Mar 2025 19:37:21 GMT, Aleksey Shipilev <shade at openjdk.org> wrote:

>> See bug for the description of the race. New gtest test case reliably catches fire on my 5950X desktop without this fix.
>> 
>> I needed to add the proper constructor for `MonitorList` to make it testable. In our regular code, it is statically allocated, so its fields are implicitly initialized.
>> 
>> I also made counter updates `_relaxed` for completeness.
>> 
>> Additional testing:
>>  - [x] Linux x86_64 server fastdebug, new test now passes
>>  - [x] Linux x86_64 server fastdebug, `all`
>>  - [x] GHA
>
> Aleksey Shipilev has updated the pull request incrementally with two additional commits since the last revision:
> 
>  - Can check <=
>  - Object handle

Thanks! If there are no other comments, I'll integrate soon.

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

PR Comment: https://git.openjdk.org/jdk/pull/23961#issuecomment-2715374750


More information about the hotspot-runtime-dev mailing list