RFR: 8353117: Crash: assert(id >= ThreadIdentifier::initial() && id < ThreadIdentifier::current()) failed: must be reasonable)
Patricio Chilano Mateo
pchilanomate at openjdk.org
Wed Apr 2 14:35:06 UTC 2025
On Tue, 1 Apr 2025 07:29:38 GMT, David Holmes <dholmes at openjdk.org> wrote:
>> Please review the following fix. For the attaching thread case we are incorrectly setting the `_monitor_owner_id` after `Threads::add()` is called, i.e after the attaching thread becomes visible through a ThreadsListHandle. So if another thread calls `Threads::owning_thread_from_monitor()` in between these events and iterates through all JavaThreads looking for the owner of a given monitor, we might find this attaching thread still with a `_monitor_owner_id` of 0.
>> I corrected the ordering and improved verification checks. Tested in mach5 tiers1-5.
>>
>> Thanks,
>> Patricio
>
> That seems fine to me. Thanks for fixing.
Thanks for the reviews @dholmes-ora and @fbredber!
-------------
PR Comment: https://git.openjdk.org/jdk/pull/24336#issuecomment-2772754081
More information about the hotspot-dev
mailing list