[jdk20] RFR: 8296955: Kitchensink.java failed with "double free or corruption (!prev): <addr>"
Coleen Phillimore
coleenp at openjdk.org
Fri Dec 9 12:35:38 UTC 2022
On Fri, 9 Dec 2022 12:27:42 GMT, Coleen Phillimore <coleenp 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.
The JmethodIdCreation_lock used to be a safepoint checking lock, and have higher rank. It's now a no-safepoint lock and has a relatively low ranking so this change is safer from rank checking than when it was first written.
-------------
PR: https://git.openjdk.org/jdk20/pull/10
More information about the hotspot-dev
mailing list