JDK-8287090 : Shenandoah: after updaterefs verification reports confusing error message
  • Type: Bug
  • Component: hotspot
  • Sub-Component: gc
  • Affected Version: 19,21,22
  • Priority: P4
  • Status: New
  • Resolution: Unresolved
  • Submitted: 2022-05-20
  • Updated: 2024-12-17
Related Reports
Relates :  
Relates :  
Relates :  
Description
After updating references, verifier should run before cset is destroyed. Otherwise, verifier may output some confusing message, e.g.


# A fatal error has been detected by the Java Runtime Environment:
#
#  Internal Error (/home/zgu/ws/jdk/src/hotspot/share/gc/shenandoah/shenandoahVerifier.cpp:91), pid=3813852, tid=3813887
#  Error: After Updating References, Reachable; Object should be in active region

Referenced from:
  interior location: 0x00000000d0d64028
  0x00000000d0d63ea8 - klass 0x00000008000362f8 jdk.internal.vm.StackChunk
        allocated after mark start
        after update watermark
        marked strong
        marked weak
    not in collection set
  mark: mark(is_neutral no_hash age=0)
  region: |   53|R  |BTE     d0d40000,     d0d80000,     d0d80000|TAMS     d0d40000|UWM     d0d40000|U   256K|T   256K|G     0B|S     0B|L     0B|CP   0

Object:
  0x00000000e4ae56b0 - klass 0x0000000801001510 Skynet$Channel
    not allocated after mark start
    not after update watermark
        marked strong
    not marked weak
    not in collection set          <==== this is confusing, since the object has legit forwardee
   mark: marked(0x00000000ffd6b82b)
  region: | 1323|T  |BTE     e4ac0000,     e4b00000,     e4b00000|TAMS     e4b00000|UWM     e4b00000|U   256K|T   256K|G     0B|S     0B|L   162K|CP   0

Forwardee:
  0x00000000ffd6b828 - safe print, no details
  region: | 3061|R  |BTE     ffd40000,     ffd80000,     ffd80000|TAMS     ffd40000|UWM     ffd80000|U   256K|T     0B|G   256K|S     0B|L     0B|CP   0

It shows that object is not in cset and has legit forwardee - confusing.


Comments
Linked to a ticket where this has been observed as failing intermittently, and is currently problem-listed.
30-07-2024

Note: Occurs without generational option: ``` jvm_args: -Dtest.vm.opts=-Xmx768m -Djava.awt.headless=true -Djava.util.prefs.userRoot=/output_openjdk21_dev_optU_linuxx86_64/jtreg_hotspot_tier1_work/tmp -Djava.io.tmpdir=/output_openjdk21_dev_optU_linuxx86_64/jtreg_hotspot_tier1_work/tmp -Dtest.getfreeport.max.tries=40 -ea -esa -Dtest.tool.vm.opts=-J-Xmx768m -J-Djava.awt.headless=true -J-Djava.util.prefs.userRoot=/output_openjdk21_dev_optU_linuxx86_64/jtreg_hotspot_tier1_work/tmp -J-Djava.io.tmpdir=/output_openjdk21_dev_optU_linuxx86_64/jtreg_hotspot_tier1_work/tmp -J-Dtest.getfreeport.max.tries=40 -J-ea -J-esa -Dtest.compiler.opts= -Dtest.java.opts= -Dtest.jdk=/output_openjdk21_dev_optU_linuxx86_64/jdk_21 -Dcompile.jdk=/output_openjdk21_dev_optU_linuxx86_64/jdk_21 -Dtest.timeout.factor=6.0 -Dtest.nativepath=/output_openjdk21_dev_optU_linuxx86_64/grmpf/testdata/jtreg/jtreg_test_21/test/hotspot/jtreg/native -Dtest.root=/output_openjdk21_dev_optU_linuxx86_64/grmpf/testdata/jtreg/jtreg_test_21/test/hotspot/jtreg -Dtest.name=gc/TestAllocHumongousFragment.java#aggressive -Dtest.file=/output_openjdk21_dev_optU_linuxx86_64/grmpf/testdata/jtreg/jtreg_test_21/test/hotspot/jtreg/gc/TestAllocHumongousFragment.java -Dtest.src=/output_openjdk21_dev_optU_linuxx86_64/grmpf/testdata/jtreg/jtreg_test_21/test/hotspot/jtreg/gc -Dtest.src.path=/output_openjdk21_dev_optU_linuxx86_64/grmpf/testdata/jtreg/jtreg_test_21/test/hotspot/jtreg/gc:/output_openjdk21_dev_optU_linuxx86_64/grmpf/testdata/jtreg/jtreg_test_21/test/lib -Dtest.classes=/output_openjdk21_dev_optU_linuxx86_64/jtreg_hotspot_tier1_work/JTwork/classes/7/gc/TestAllocHumongousFragment_aggressive.d -Dtest.class.path=/output_openjdk21_dev_optU_linuxx86_64/jtreg_hotspot_tier1_work/JTwork/classes/7/gc/TestAllocHumongousFragment_aggressive.d:/output_openjdk21_dev_optU_linuxx86_64/jtreg_hotspot_tier1_work/JTwork/classes/7/test/lib -Dtest.class.path.prefix=/output_openjdk21_dev_optU_linuxx86_64/jtreg_hotspot_tier1_work/JTwork/classes/7/gc/TestAllocHumongousFragment_aggressive.d:/output_openjdk21_dev_optU_linuxx86_64/grmpf/testdata/jtreg/jtreg_test_21/test/hotspot/jtreg/gc:/output_openjdk21_dev_optU_linuxx86_64/jtreg_hotspot_tier1_work/JTwork/classes/7/test/lib -Xmx768m -Djava.awt.headless=true -Djava.util.prefs.userRoot=/output_openjdk21_dev_optU_linuxx86_64/jtreg_hotspot_tier1_work/tmp -Djava.io.tmpdir=/output_openjdk21_dev_optU_linuxx86_64/jtreg_hotspot_tier1_work/tmp -Dtest.getfreeport.max.tries=40 -ea -esa -Djava.library.path=/output_openjdk21_dev_optU_linuxx86_64/grmpf/testdata/jtreg/jtreg_test_21/test/hotspot/jtreg/native -Xmx1g -Xms1g -Xlog:gc -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions -XX:ShenandoahTargetNumRegions=2048 -XX:+UseShenandoahGC -XX:ShenandoahGCHeuristics=aggressive -XX:+ShenandoahOOMDuringEvacALot -XX:+ShenandoahVerify java_command: com.sun.javatest.regtest.agent.MainWrapper /output_openjdk21_dev_optU_linuxx86_64/jtreg_hotspot_tier1_work/JTwork/gc/TestAllocHumongousFragment_aggressive.d/main.0.jta java_class_path (initial): /output_openjdk21_dev_optU_linuxx86_64/jtreg_hotspot_tier1_work/JTwork/classes/7/gc/TestAllocHumongousFragment_aggressive.d:/output_openjdk21_dev_optU_linuxx86_64/grmpf/testdata/jtreg/jtreg_test_21/test/hotspot/jtreg/gc:/output_openjdk21_dev_optU_linuxx86_64/jtreg_hotspot_tier1_work/JTwork/classes/7/test/lib:/output_openjdk21_dev_optU_linuxx86_64/grmpf/testdata/jtreg/jtreg_test_21/test/lib:/artifacts/jtreg-7.2+1/lib/jtreg.jar ``` Should be retested. hs_err* log file is from x64/Linux.
30-07-2024

And in JDK 22: gc/TestHumongousReferenceObject.java#id2
03-10-2023

We have seen the issue with recent JDK21 when running: gc/TestAllocHumongousFragment.java#aggressive Attached hs_err file.
09-06-2023