JDK-8289778 : ZGC: incorrect use of os::free() for mountpoint string handling after JDK-8289633
  • Type: Bug
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: 20
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2022-07-05
  • Updated: 2022-07-11
  • Resolved: 2022-07-07
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 20
20 masterFixed
Related Reports
Relates :  
Description
NMT Block at 0x00007fcfc00a0ce0, corruption at: 0x00007fcfc00a0ce0:
0x00007fcfc00a0c60:   40 de 29 c8 cf 7f 00 00 85 00 00 00 00 00 00 00
0x00007fcfc00a0c70:   31 35 20 33 37 20 30 3a 31 34 20 2f 20 2f 73 79
0x00007fcfc00a0c80:   73 20 72 77 2c 72 65 6c 61 74 69 6d 65 20 73 68
0x00007fcfc00a0c90:   61 72 65 64 3a 36 20 2d 20 73 79 73 66 73 20 73
0x00007fcfc00a0ca0:   79 73 66 73 20 72 77 0a 00 00 00 00 00 00 00 00
0x00007fcfc00a0cb0:   00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x00007fcfc00a0cc0:   00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x00007fcfc00a0cd0:   00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x00007fcfc00a0ce0:   00 00 00 00 00 00 00 00 25 00 00 00 00 00 00 00
0x00007fcfc00a0cf0:   2f 73 79 73 00 7f 00 00 78 00 00 c0 cf 7f 00 00
0x00007fcfc00a0d00:   00 00 00 00 00 00 00 00 55 00 00 00 00 00 00 00
0x00007fcfc00a0d10:   00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x00007fcfc00a0d20:   00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x00007fcfc00a0d30:   00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x00007fcfc00a0d40:   00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x00007fcfc00a0d50:   00 00 00 00 00 00 00 00 25 00 00 00 00 00 00 00
# To suppress the following error report, specify this argument
# after -XX: or in .hotspotrc:  SuppressErrorAt=/mallocTracker.cpp:151
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  Internal Error (/home/jvm/jdk/src/hotspot/share/services/mallocTracker.cpp:151), pid=72206, tid=72207
#  fatal error: NMT corruption: Block at 0x00007fcfc00a0ce0: header canary broken
#
# JRE version:  (20.0) (slowdebug build )
# Java VM: OpenJDK 64-Bit Server VM (slowdebug 20-internal-adhoc.jvm.jdk, mixed mode, sharing, tiered, compressed class ptrs, z gc, linux-amd64)
# Problematic frame:
# V  [libjvm.so+0x1042bfb]  MallocHeader::assert_block_integrity() const+0x95
#
# No core dump will be written. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
#

Stack: [0x00007fcfc8c12000,0x00007fcfc8d13000],  sp=0x00007fcfc8d103b0,  free space=1016k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
V  [libjvm.so+0x1042bfb]  MallocHeader::assert_block_integrity() const+0x95
V  [libjvm.so+0x104311e]  MallocTracker::record_free(void*)+0xa8
V  [libjvm.so+0x1147366]  MemTracker::record_free(void*)+0x67
V  [libjvm.so+0x11436c5]  os::free(void*)+0x3b
V  [libjvm.so+0x1529907]  ZMountPoint::get_mountpoint(char const*, char const*) const+0x91
V  [libjvm.so+0x1529a0c]  ZMountPoint::get_mountpoints(char const*, GrowableArrayCHeap<char*, (MEMFLAGS)5>*) const+0xea
V  [libjvm.so+0x1529c67]  ZMountPoint::find_mountpoint(char const*, char const**) const+0x4b
V  [libjvm.so+0x152982e]  ZMountPoint::ZMountPoint(char const*, char const**)+0x78
V  [libjvm.so+0x1539fa1]  ZPhysicalMemoryBacking::create_file_fd(char const*) const+0x89
V  [libjvm.so+0x153a4f0]  ZPhysicalMemoryBacking::create_fd(char const*) const+0x98
V  [libjvm.so+0x15397bd]  ZPhysicalMemoryBacking::ZPhysicalMemoryBacking(unsigned long)+0x75
V  [libjvm.so+0x1538275]  ZPhysicalMemoryManager::ZPhysicalMemoryManager(unsigned long)+0x23
V  [libjvm.so+0x1530f13]  ZPageAllocator::ZPageAllocator(ZWorkers*, unsigned long, unsigned long, unsigned long)+0x9d
V  [libjvm.so+0x15119b5]  ZHeap::ZHeap()+0x65
V  [libjvm.so+0x150a91e]  ZCollectedHeap::ZCollectedHeap()+0x76
V  [libjvm.so+0x14fc861]  ZArguments::create_heap()+0x3b
V  [libjvm.so+0x14349b6]  Universe::initialize_heap()+0x5a
V  [libjvm.so+0x1434798]  universe_init()+0x9a
V  [libjvm.so+0xc41f37]  init_globals()+0x35
V  [libjvm.so+0x1415107]  Threads::create_vm(JavaVMInitArgs*, bool*)+0x393
V  [libjvm.so+0xd58416]  JNI_CreateJavaVM_inner(JavaVM_**, void**, void*)+0x10c
V  [libjvm.so+0xd5876c]  JNI_CreateJavaVM+0x32
C  [libjli.so+0x7181]  InitializeJVM+0x13a
C  [libjli.so+0x3f79]  JavaMain+0xdc
C  [libjli.so+0xaad7]  ThreadJavaMain+0x27
Comments
Changeset: 77ad998b Author: Jie Fu <jiefu@openjdk.org> Date: 2022-07-07 12:52:04 +0000 URL: https://git.openjdk.org/jdk/commit/77ad998b6e741f7cd7cdd52155c024bbc77f2027
07-07-2022

A pull request was submitted for review. URL: https://git.openjdk.org/jdk/pull/9387 Date: 2022-07-06 02:17:39 +0000
06-07-2022