JDK-8210523 : runtime/appcds/cacheObject/DifferentHeapSizes.java crash
  • Type: Bug
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: 12
  • Priority: P2
  • Status: Closed
  • Resolution: Fixed
  • Submitted: 2018-09-09
  • Updated: 2020-03-12
  • Resolved: 2018-09-13
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 11 JDK 12
11.0.7Fixed 12 b12Fixed
Related Reports
Relates :  
Description
Mach5 job:
runtime/appcds/cacheObject/DifferentHeapSizes.java

Test log:
----------System.err:(52/3473)----------
 stdout: [[0.024s][info][cds] CDS archive was created with max heap size = 128M, and the following configuration:
[0.024s][info][cds]     narrow_klass_base = 0x0000000800000000, narrow_klass_shift = 3
[0.024s][info][cds]     narrow_oop_mode = 1, narrow_oop_base = 0x0000000000000000, narrow_oop_shift = 3
[0.024s][info][cds] The current max heap size = 16376M, HeapRegion::GrainBytes = 4194304
[0.024s][info][cds]     narrow_klass_base = 0x0000000800000000, narrow_klass_shift = 3
[0.024s][info][cds]     narrow_oop_mode = 1, narrow_oop_base = 0x0000000000000000, narrow_oop_shift = 3
[0.024s][info][cds] CDS heap data need to be relocated because
[0.024s][info][cds] the desired range 0x0000000119200000 - 0x0000000119368000
[0.024s][info][cds] is outside of the heap 0x0000000400800000 - 0x0000000800000000
[0.024s][info][cds] CDS heap data relocation delta = 29639049216 bytes
# To suppress the following error report, specify this argument
# after -XX: or in .hotspotrc:  SuppressErrorAt=/filemap.cpp:982
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  Internal Error (/scratch/mesos/slaves/14a03e04-9f3c-408e-8ddf-efd6aa9b759f-S94137/frameworks/14a03e04-9f3c-408e-8ddf-efd6aa9b759f-0005/executors/a7f022f6-b379-41fd-92a3-584952738cb0/runs/f602375a-be7f-46a4-9a65-be48a7beb4e2/workspace/open/src/hotspot/share/memory/filemap.cpp:982), pid=69518, tid=4867
#  assert(is_aligned(relocated_strings_bottom + delta, HeapRegion::GrainBytes)) failed: must be
#
# JRE version:  (12.0) (fastdebug build )
# Java VM: Java HotSpot(TM) 64-Bit Server VM (fastdebug 12-internal+0-jdk12-jdk.372, mixed mode, aot, sharing, tiered, compressed oops, g1 gc, bsd-amd64)
# Core dump will be written. Default location: /cores/core.69518 (max size 18014398509481983 kB). To ensure a full core dump, try "ulimit -c unlimited" before starting Java again
#
# An error report file with more information is saved as:
# /scratch/mesos/slaves/14a03e04-9f3c-408e-8ddf-efd6aa9b759f-S85737/frameworks/14a03e04-9f3c-408e-8ddf-efd6aa9b759f-0005/executors/ea775a54-33c4-4947-af1d-96fb91f607e3/runs/3b4cffce-b582-4680-87c9-57d6e03d38ec/testoutput/jtreg/JTwork/scratch/0/hs_err_pid69518.log
#
# If you would like to submit a bug report, please visit:
#   http://bugreport.java.com/bugreport/crash.jsp
#
Current thread is 4867
Dumping core ...
];
 stderr: []
 exitValue = 134

java.lang.RuntimeException: 'Hello World' missing from stdout/stderr 

	at jdk.test.lib.process.OutputAnalyzer.shouldContain(OutputAnalyzer.java:151)
	at jdk.test.lib.cds.CDSTestUtils.checkMatches(CDSTestUtils.java:456)
	at jdk.test.lib.cds.CDSTestUtils$Result.assertNormalExit(CDSTestUtils.java:191)
	at DifferentHeapSizes.main(DifferentHeapSizes.java:77)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
	at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:127)
	at java.base/java.lang.Thread.run(Thread.java:834)

JavaTest Message: Test threw exception: java.lang.RuntimeException: 'Hello World' missing from stdout/stderr 

JavaTest Message: shutting down test

STATUS:Failed.`main' threw exception: java.lang.RuntimeException: 'Hello World' missing from stdout/stderr
Comments
jdk11u update backport request: This fixes the related crashes reported in testing. Patch applies cleanly. Backport is tested with all tier1, appcds and SharedArchiveFile tests.
06-02-2020

The test did not crash in CI for over 2 months. Verified.
05-01-2019

Fix: http://cr.openjdk.java.net/~iklam/jdk12/8210523-DifferentHeapSizes-crash.v01/
09-09-2018

This can be reproduced on Linux/x64 $ java -Xshare:dump -Xmx128m -XX:HeapBaseMinAddress=0x0000000119200000 ... mc space: 21664 [ 0.1% of total] out of 24576 bytes [ 88.2% used] at 0x0000000800000000 rw space: 4254656 [ 22.7% of total] out of 4255744 bytes [100.0% used] at 0x0000000800006000 ro space: 7299872 [ 38.9% of total] out of 7303168 bytes [100.0% used] at 0x0000000800415000 md space: 2752 [ 0.0% of total] out of 4096 bytes [ 67.2% used] at 0x0000000800b0c000 od space: 6428808 [ 34.3% of total] out of 6430720 bytes [100.0% used] at 0x0000000800b0d000 st0 space: 438272 [ 2.3% of total] out of 438272 bytes [100.0% used] at 0x0000000120e00000 oa0 space: 294912 [ 1.6% of total] out of 294912 bytes [100.0% used] at 0x0000000120d00000 total : 18740936 [100.0% of total] out of 18751488 bytes [ 99.9% used] $ java -Xshare:on -Xmx16376M -Xlog:cds -version [0.027s][info][cds] CDS archive was created with max heap size = 128M, and the following configuration: [0.027s][info][cds] narrow_klass_base = 0x0000000800000000, narrow_klass_shift = 3 [0.027s][info][cds] narrow_oop_mode = 1, narrow_oop_base = 0x0000000000000000, narrow_oop_shift = 3 [0.027s][info][cds] The current max heap size = 16376M, HeapRegion::GrainBytes = 4194304 [0.027s][info][cds] narrow_klass_base = 0x0000000800000000, narrow_klass_shift = 3 [0.027s][info][cds] narrow_oop_mode = 1, narrow_oop_base = 0x0000000000000000, narrow_oop_shift = 3 [0.027s][info][cds] CDS heap data need to be relocated because [0.027s][info][cds] the desired range 0x0000000120d00000 - 0x0000000120e6b000 [0.027s][info][cds] is outside of the heap 0x0000000400800000 - 0x0000000800000000 [0.027s][info][cds] CDS heap data relocation delta = 29509025792 bytes ... # Internal Error (/home/iklam/jdk/eva/open/src/hotspot/share/memory/filemap.cpp:982), pid=8192, tid=8193 # assert(is_aligned(relocated_strings_bottom + delta, HeapRegion::GrainBytes)) failed: must be
09-09-2018