[8u] RFR (XS) 8257999: Parallel GC crash in gc/parallel/TestDynShrinkHeap.java: new region is not in covered_region
Andrew Hughes
gnu.andrew at redhat.com
Tue Mar 2 13:23:34 UTC 2021
On 19:06 Mon 01 Mar , Aleksey Shipilev wrote:
> 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
>
Please post patches as a link to a generated webrev.
Thanks,
--
Andrew :)
Senior Free Java Software Engineer
OpenJDK Package Owner
Red Hat, Inc. (http://www.redhat.com)
PGP Key: ed25519/0xCFDA0F9B35964222 (hkp://keys.gnupg.net)
Fingerprint = 5132 579D D154 0ED2 3E04 C5A0 CFDA 0F9B 3596 4222
More information about the jdk8u-dev
mailing list