RFR: 8298376: ZGC: thaws stackChunk with stale oops [v2]
Coleen Phillimore
coleenp at openjdk.org
Wed Dec 14 13:11:05 UTC 2022
On Wed, 14 Dec 2022 11:11:00 GMT, Stefan Karlsson <stefank at openjdk.org> wrote:
>> During the recent ZGC + Loom rewrites JDK-8296875 a bug was introduced, which causes Loom to thaw stackChunks with stale oops.
>>
>> Before that change we made sure that only the GC performed load barriers on the cont oop in stackChunk, so that we could use the oop state as an indication of the age of the stackChunk. That information was then used in ZCollectedHeap::requires_barriers.
>>
>> In Generational ZGC we changed the implementation of requires_barriers, so that the rest of the JVM didn't need to have special-handling of the cont oop. However, when upstreaming the changes in JDK-8296875 we purposefully didn't update requires_barriers, but we incorrectly brought over the removal of the special-handling of the cont oop.
>>
>> To limit the fix for this bug, I propose that we restore the special-handling of the cont oop.
>>
>> I've tested this with a reproducer running Fuzz.java + ZGC.
>
> Stefan Karlsson has updated the pull request incrementally with 104 additional commits since the last revision:
>
> - Merge remote-tracking branch 'upstream/master' into 8298376_zgc_loom_thaw_stale_oops
> - 8298371: monitors_on_stack extracts unprocessed oops
>
> Reviewed-by: pchilanomate, rehn
> - 8298513: vmTestbase/nsk/jdi/EventSet/suspendPolicy/suspendpolicy009/TestDescription.java fails with usage tracker
>
> Reviewed-by: cjplummer, sspitsyn, lmesnik
> - 8298514: vmTestbase/nsk/jdi/EventRequestManager/threadDeathRequests/thrdeathreq002/TestDescription.java fails with usage tracker
>
> Reviewed-by: cjplummer, sspitsyn
> - 8298524: Debug function to trace reachability of CDS archived heap objects
>
> Reviewed-by: ccheung
> - Merge
> - 8298084: Memory leak in Method::build_profiling_method_data
>
> Co-authored-by: Justin King <jcking at openjdk.org>
> Reviewed-by: kbarrett, eosterlund, dholmes, jcking, thartmann
> - 8296955: Kitchensink.java failed with "double free or corruption (!prev): <addr>"
>
> Reviewed-by: kbarrett, eosterlund, sspitsyn, dcubed
> - 8298488: [macos13] tools/jpackage tests failing with "Exit code: 137" on macOS
>
> Reviewed-by: asemenyuk
> - 8297288: Example code in Scanner class
>
> Reviewed-by: lancea, bpb, alanb
> - ... and 94 more: https://git.openjdk.org/jdk/compare/bb7183bf...da98a785
Should this be fixed for JDK 20?
-------------
PR: https://git.openjdk.org/jdk/pull/11585
More information about the hotspot-dev
mailing list