RFR: 8288129: Shenandoah: Skynet test crashed with iu + aggressive

Ashutosh Mehra duke at openjdk.org
Tue Aug 30 23:52:37 UTC 2022


On Tue, 30 Aug 2022 23:40:32 GMT, Ashutosh Mehra <duke at openjdk.org> wrote:

> Another attempt to fix the crash when running Loom with Shenandoah in iu+aggressive mode.
> 
> Explanation for the problem can be seen in https://github.com/openjdk/jdk/pull/9982#issue-1348107961 but instead of adding barriers for the oops in stack chunk header in `do_barriers()`, this fix uses Access API (`oopDesc::obj_field_put_access`) with `IS_DEST_UNINITIALIZED` decorator as suggested in https://github.com/openjdk/jdk/pull/9982#issuecomment-1231843259. The Access API invokes appropriate barriers based on the GC policy and the decorator. For SATB barriers it is a no-op. For IU mode it invokes the iu write barrier.
> 
> Testing with fastdebug build:
> 
> - [x] hotspot_loom
> - [x] jdk_loom
> - [x] hotspot_loom in Shenandoah IU mode
> - [x] jdk_loom in Shenandoah IU mode
> - [x] hotspot_loom in Shenandoah IU + aggressive
> - [x] jdk_loom in Shenandoah IU + aggressive
> 
> Signed-off-by: Ashutosh Mehra <asmehra at redhat.com>

I got couple of intermittent failures in jdk_loom with Shenandoah IU+aggressive mode, but I reproduced the same intermittent failure without the changes as well, so probably a latent bug.

Tests that failed are:
- java/lang/management/ThreadMXBean/LockedSynchronizers.java
- java/lang/management/ThreadMXBean/MyOwnSynchronizer.java

Frequency of failure is around 1/10.

Reason for the failure is the following assertion:


# To suppress the following error report, specify this argument
# after -XX: or in .hotspotrc:  SuppressErrorAt=/shenandoahBarrierSet.inline.hpp:246
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  Internal Error (/home/asmehra/data/ashu-mehra/jdk/src/hotspot/share/gc/shenandoah/shenandoahBarrierSet.inline.hpp:246), pid=1427500, tid=1427517
#  Error: Shenandoah assert_not_in_cset failed; Object should not be in collection set

Referenced from:
  interior location: 0x00007fc020003280
  outside of Java heap
  0x00007fc020003280 points into unknown readable memory: 0x0000000000000000 | 00 00 00 00 00 00 00 00

Object:
  0x00000000d01b6840 - klass 0x0000000800215ed8 java.util.concurrent.locks.ReentrantLock$NonfairSync
    not allocated after mark start
    not after update watermark
        marked strong
    not marked weak
        in collection set
  mark: mark(is_neutral no_hash age=0)
  region: |    6|CS |BTE     d0180000,     d01bff00,     d01c0000|TAMS     d01bff00|UWM     d01bff00|U   255K|T   255K|G     0B|S     0B|L 49040B|CP   0

Forwardee:
  (the object itself)

@fisk @rkennke if these changes look good, I will close the previous pr.

-------------

PR: https://git.openjdk.org/jdk/pull/10089


More information about the shenandoah-dev mailing list