[8u] RFR (XS) 8257999: Parallel GC crash in gc/parallel/TestDynShrinkHeap.java: new region is not in covered_region

Hohensee, Paul hohensee at amazon.com
Mon Mar 1 18:28:03 UTC 2021


Lgtm. I've created an openjdk8u backport issue https://bugs.openjdk.java.net/browse/JDK-8262792 (new'ish process), which you can tag.

Thanks,
Paul

-----Original Message-----
From: jdk8u-dev <jdk8u-dev-retn at openjdk.java.net> on behalf of Aleksey Shipilev <shade at redhat.com>
Date: Monday, March 1, 2021 at 10:07 AM
To: "jdk8u-dev at openjdk.java.net" <jdk8u-dev at openjdk.java.net>
Subject: [8u] RFR (XS) 8257999: Parallel GC crash in gc/parallel/TestDynShrinkHeap.java: new region is not in covered_region

This is first of three patches that dance around the same issue.

Original change:
   https://bugs.openjdk.java.net/browse/JDK-8257999
   https://github.com/openjdk/jdk16/commit/61390d8e

Patch does not apply cleanly to 8u, because #include list is a bit different in 8u.

8u variant:

diff -r a435c913c8ce src/share/vm/gc_implementation/parallelScavenge/psOldGen.cpp
--- a/src/share/vm/gc_implementation/parallelScavenge/psOldGen.cpp      Thu Jun 25 08:15:07 2015 +0200
+++ b/src/share/vm/gc_implementation/parallelScavenge/psOldGen.cpp      Mon Mar 01 19:00:24 2021 +0100
@@ -30,10 +30,11 @@
  #include "gc_implementation/shared/spaceDecorator.hpp"
  #include "memory/cardTableModRefBS.hpp"
  #include "memory/gcLocker.inline.hpp"
  #include "oops/oop.inline.hpp"
  #include "runtime/java.hpp"
+#include "runtime/orderAccess.hpp"

  PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC

  inline const char* PSOldGen::select_name() {
    return UseParallelOldGC ? "ParOldGen" : "PSOldGen";
@@ -399,11 +400,13 @@
    size_t new_word_size = new_memregion.word_size();

    start_array()->set_covered_region(new_memregion);
    Universe::heap()->barrier_set()->resize_covered_region(new_memregion);

-  // ALWAYS do this last!!
+  // Ensure the space bounds are updated and made visible to other
+  // threads after the other data structures have been resized.
+  OrderAccess::storestore();
    object_space()->initialize(new_memregion,
                               SpaceDecorator::DontClear,
                               SpaceDecorator::DontMangle);

    assert(new_word_size == heap_word_size(object_space()->capacity_in_bytes()),

Testing: tier1

--
Thanks,
-Aleksey




More information about the jdk8u-dev mailing list