[jdk8u-dev] RFR: 8146523: VirtualMemoryTracker::remove_released_region double count unmapped CDS shared memory
wxiang
duke at openjdk.java.net
Wed Mar 30 11:30:07 UTC 2022
8146523: VirtualMemoryTracker::remove_released_region double count unmapped CDS shared memory
Skip tracking release for unmapped CDS shared space.
JDK8u can reproduce this prolbem in some special case, for example the timestamp of jar file in jdk build is changed.
To reproduce the issue with JDK8:
1. Dump class list: java -XX:DumpLoadedClassList=my.list -version
2. Generate jsa:java -XX:+UnlockDiagnosticVMOptions -Xshare:dump -XX:SharedClassListFile=my.list -XX:SharedArchiveFile=my.jsa
3. Touch some jar files in JDK build: touch jre/lib/resources.jar eg
4. Run with the jsa:java -XX:+UnlockDiagnosticVMOptions -Xshare:on -XX:SharedArchiveFile=nmt_version.jsa -XX:NativeMemoryTracking=summary -XX:-RequireSharedSpaces -version
Then crash as below:
#
# A fatal error has been detected by the Java Runtime Environment:
#
# SIGSEGV (0xb) at pc=0x00007fc08dee0195, pid=21887, tid=0x00007fc08f024700
#
# JRE version: (8.0_322-b06) (build )
# Java VM: OpenJDK 64-Bit Server VM (25.322-b06 mixed mode linux-amd64 compressed oops)
# Problematic frame:
# V [libjvm.so+0xb32195] VirtualMemoryTracker::add_committed_region(unsigned char*, unsigned long, NativeCallStack const&)+0x1a5
#
# Failed to write core dump. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
#
# An error report file with more information is saved as:
# /data/work/test/nmtissue/hs_err_pid21887.log
#
# If you would like to submit a bug report, please visit:
# https://github.com/adoptium/adoptium-support/issues
#
To solve the issue, we’d like to back port this fix to jdk8u
-------------
Commit messages:
- 8146523: VirtualMemoryTracker::remove_released_region double count unmapped CDS shared memory
Changes: https://git.openjdk.java.net/jdk8u-dev/pull/27/files
Webrev: https://webrevs.openjdk.java.net/?repo=jdk8u-dev&pr=27&range=00
Issue: https://bugs.openjdk.java.net/browse/JDK-8146523
Stats: 8 lines in 1 file changed: 8 ins; 0 del; 0 mod
Patch: https://git.openjdk.java.net/jdk8u-dev/pull/27.diff
Fetch: git fetch https://git.openjdk.java.net/jdk8u-dev pull/27/head:pull/27
PR: https://git.openjdk.java.net/jdk8u-dev/pull/27
More information about the jdk8u-dev
mailing list