[jdk20] RFR: 8296955: Kitchensink.java failed with "double free or corruption (!prev): <addr>"
Coleen Phillimore
coleenp at openjdk.org
Tue Dec 13 00:51:30 UTC 2022
On Mon, 12 Dec 2022 21:42:22 GMT, Daniel D. Daugherty <dcubed at openjdk.org> wrote:
>> Thanks to Kim for the diagnosis of this problem. G1 cleans up nmethods in parallel threads during a safepoint and may post or queue unload events to be posted. The event posting creates jmethodIDs. The jmethodID code assumes that it's thread safe in a safepoint, which it is not.
>> I removed this optimization, which isn't much of an optimization (did run some sanity performance tests) and is unsafe in the modern code.
>> Tested with tier1-7, where tier5 found the original bug.
>
> src/hotspot/share/oops/method.cpp line 2185:
>
>> 2183: // Also have to add the method to the list safely, which the lock
>> 2184: // protects as well.
>> 2185: assert(JmethodIdCreation_lock->owned_by_self(), "sanity check");
>
> I keep going back and forth about changing this from `assert` to
> `guarantee` for at least a few complete test cycles. However, we
> are post code fork so it would be difficult to justify switching it
> back in 3 or so builds. Switching to a `guarantee` would also
> mean another round of perf testing and I don't want you to have
> to do that either.
>
> I'll keep my eyes open on the two CIs...
Yes, thanks I don't usually use guarantees and as you said, it's late in the testing cycle. Thanks for keeping an eye on it.
-------------
PR: https://git.openjdk.org/jdk20/pull/10
More information about the hotspot-dev
mailing list