JDK-8274452 : G1: Only evac-failed objects must be in the collection set here
  • Type: Bug
  • Component: hotspot
  • Sub-Component: gc
  • Affected Version: 18
  • Priority: P4
  • Status: Closed
  • Resolution: Duplicate
  • Submitted: 2021-09-28
  • Updated: 2021-10-14
  • Resolved: 2021-09-29
Related Reports
Duplicate :  
Relates :  
Relates :  
Relates :  
Description
Our regular CI runs detected a G1 crash running vmTestbase/gc/ArrayJuggle/Juggle28/TestDescription.java. I have not tried to reproduce it yet. Seems to crash after 2 hours of runtime. hs_err is attached.

ACTION: main -- Failed. Unexpected exit from test [exit code: 134]
REASON: User specified action: run main/othervm -Xlog:gc=debug:gc.log gc.ArrayJuggle.Juggle01.Juggle01 -gp hashed(doubleArr) -ms low 
TIME:   6337.599 seconds
messages:
command: main -Xlog:gc=debug:gc.log gc.ArrayJuggle.Juggle01.Juggle01 -gp hashed(doubleArr) -ms low
reason: User specified action: run main/othervm -Xlog:gc=debug:gc.log gc.ArrayJuggle.Juggle01.Juggle01 -gp hashed(doubleArr) -ms low 
Mode: othervm [/othervm specified]
elapsed time (seconds): 6337.599
configuration:
STDOUT:
Stress time: 240 seconds
Stress iterations factor: 1
Stress threads factor: 1
Stress runs factor: 1
Max memory: 1054867456
Sleep time: 500
Iterations: 0
Number of threads: 32
Run GC thread: false
Run mem diag thread: false
Run forever: false
Garbage producer: nsk.share.gc.gp.misc.HashedGarbageProducer@4737ca1f
Memory strategy: low
Object count: 6329204
Object size: 100
Starting Thread[gc.ArrayJuggle.Juggle01.Juggle01$Juggler@3e154ed6,5,MainThreadGroup]
Starting Thread[gc.ArrayJuggle.Juggle01.Juggle01$Juggler@5901b24e,5,MainThreadGroup]
Starting Thread[gc.ArrayJuggle.Juggle01.Juggle01$Juggler@4df62446,5,MainThreadGroup]
Starting Thread[gc.ArrayJuggle.Juggle01.Juggle01$Juggler@7ba45f45,5,MainThreadGroup]
Starting Thread[gc.ArrayJuggle.Juggle01.Juggle01$Juggler@5652c13d,5,MainThreadGroup]
Starting Thread[gc.ArrayJuggle.Juggle01.Juggle01$Juggler@2959a7b,5,MainThreadGroup]
Starting Thread[gc.ArrayJuggle.Juggle01.Juggle01$Juggler@7e3d5a7b,5,MainThreadGroup]
Starting Thread[gc.ArrayJuggle.Juggle01.Juggle01$Juggler@27ba7c8e,5,MainThreadGroup]
Starting Thread[gc.ArrayJuggle.Juggle01.Juggle01$Juggler@67211a6d,5,MainThreadGroup]
Starting Thread[gc.ArrayJuggle.Juggle01.Juggle01$Juggler@49c912b0,5,MainThreadGroup]
Starting Thread[gc.ArrayJuggle.Juggle01.Juggle01$Juggler@5db36770,5,MainThreadGroup]
Starting Thread[gc.ArrayJuggle.Juggle01.Juggle01$Juggler@29993e44,5,MainThreadGroup]
Starting Thread[gc.ArrayJuggle.Juggle01.Juggle01$Juggler@4604bb68,5,MainThreadGroup]
Starting Thread[gc.ArrayJuggle.Juggle01.Juggle01$Juggler@47d97d8a,5,MainThreadGroup]
Starting Thread[gc.ArrayJuggle.Juggle01.Juggle01$Juggler@1970ae6,5,MainThreadGroup]
Starting Thread[gc.ArrayJuggle.Juggle01.Juggle01$Juggler@611c7f8e,5,MainThreadGroup]
Starting Thread[gc.ArrayJuggle.Juggle01.Juggle01$Juggler@2a0473e,5,MainThreadGroup]
Starting Thread[gc.ArrayJuggle.Juggle01.Juggle01$Juggler@e994fcd,5,MainThreadGroup]
Starting Thread[gc.ArrayJuggle.Juggle01.Juggle01$Juggler@37e0a4c2,5,MainThreadGroup]
Starting Thread[gc.ArrayJuggle.Juggle01.Juggle01$Juggler@35024dbf,5,MainThreadGroup]
Starting Thread[gc.ArrayJuggle.Juggle01.Juggle01$Juggler@351b6596,5,MainThreadGroup]
Starting Thread[gc.ArrayJuggle.Juggle01.Juggle01$Juggler@71b8b3df,5,MainThreadGroup]
Starting Thread[gc.ArrayJuggle.Juggle01.Juggle01$Juggler@434cdf9e,5,MainThreadGroup]
Starting Thread[gc.ArrayJuggle.Juggle01.Juggle01$Juggler@64041dfd,5,MainThreadGroup]
Starting Thread[gc.ArrayJuggle.Juggle01.Juggle01$Juggler@a5de33e,5,MainThreadGroup]
Starting Thread[gc.ArrayJuggle.Juggle01.Juggle01$Juggler@3e4f9fe1,5,MainThreadGroup]
Starting Thread[gc.ArrayJuggle.Juggle01.Juggle01$Juggler@1b5a1799,5,MainThreadGroup]
Starting Thread[gc.ArrayJuggle.Juggle01.Juggle01$Juggler@5f750afa,5,MainThreadGroup]
Starting Thread[gc.ArrayJuggle.Juggle01.Juggle01$Juggler@3a544639,5,MainThreadGroup]
Starting Thread[gc.ArrayJuggle.Juggle01.Juggle01$Juggler@78267605,5,MainThreadGroup]
Starting Thread[gc.ArrayJuggle.Juggle01.Juggle01$Juggler@330b4047,5,MainThreadGroup]
Starting Thread[gc.ArrayJuggle.Juggle01.Juggle01$Juggler@445eae06,5,MainThreadGroup]
For random generator using seed: 7596187376478461187
To re-run test with same seed value please add "-Djdk.test.lib.random.seed=7596187376478461187" to command line.
# To suppress the following error report, specify this argument
# after -XX: or in .hotspotrc:  SuppressErrorAt=/g1ParScanThreadState.inline.hpp:114
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  Internal Error (/home/buildbot/worker/test-jdkX-linux/build/src/hotspot/share/gc/g1/g1ParScanThreadState.inline.hpp:114), pid=3328076, tid=3328201
#  assert(dest_attr.is_in_cset() == (obj->forwardee() == obj)) failed: Only evac-failed objects must be in the collection set here but 0x00000000e2dc4c00 is not
#
# JRE version: OpenJDK Runtime Environment (18.0) (fastdebug build 18-testing+0-builds.shipilev.net-openjdk-jdk-b9-20210927)
# Java VM: OpenJDK 64-Bit Server VM (fastdebug 18-testing+0-builds.shipilev.net-openjdk-jdk-b9-20210927, mixed mode, sharing, tiered, compressed oops, compressed class ptrs, g1 gc, linux-amd64)
# Problematic frame:
# V  [libjvm.so+0xcb4d83]  void G1ParScanThreadState::write_ref_field_post<narrowOop>(narrowOop*, oop)+0x1b3
#
# Core dump will be written. Default location: Core dumps may be processed with "/usr/share/apport/apport %p %s %c %d %P %E" (or dumping to /home/buildbot/worker/test-jdkX-linux/build/build/linux-x86_64-server-fastdebug/test-support/jtreg_test_hotspot_jtreg_tier4/scratch/6/core.3328076)
#
# An error report file with more information is saved as:
# /home/buildbot/worker/test-jdkX-linux/build/build/linux-x86_64-server-fastdebug/test-support/jtreg_test_hotspot_jtreg_tier4/scratch/6/hs_err_pid3328076.log
#
# If you would like to submit a bug report, please visit:
#   https://bugreport.java.com/bugreport/crash.jsp

Comments
OK, good. The next iteration of CI testing would be next week, we'll see then.
30-09-2021

Closing as duplicate for JDK-8274340 for now; when redoing this change we'll check this issue too. ArrayJuggle does cause lots of evacuation failures where the missing barriers (as known as of now) could result in anything although the stack trace does not match to what I would expect. Thanks for reporting!
29-09-2021

JDK-8271880 introduced that assert, and has been found to be somewhat buggy (or incomplete, see JDK-8274340 for another problem).
29-09-2021