RFR: 8313593: Generational ZGC: NMT assert when the heap fails to expand

Stefan Karlsson stefank at openjdk.org
Wed Aug 2 07:22:10 UTC 2023


The following assert is hit when the ZGC fails to commit more memory for the heap:

assert(size > 0) failed: Invalid size
...
V  [libjvm.so+0x185d157]  VirtualMemoryTracker::add_committed_region(unsigned char*, unsigned long, NativeCallStack const&)+0x4d7  (virtualMemoryTracker.cpp:428)
V  [libjvm.so+0x19c1f33]  ZNMT::process_fake_mapping(zoffset, unsigned long, bool)+0xa3  (memTracker.hpp:168)
V  [libjvm.so+0x19db817]  ZPhysicalMemoryManager::commit(ZPhysicalMemory&)+0x47  (zPhysicalMemory.cpp:312)
V  [libjvm.so+0x19d1e4b]  ZPageAllocator::alloc_page_finalize(ZPageAllocation*)+0x6b  (zPageAllocator.cpp:427)

The problem is that we still call the NMT reporting code even when the committed size is zero.

-------------

Commit messages:
 - 8313593: Generational ZGC: NMT assert when the heap fails to expand

Changes: https://git.openjdk.org/jdk/pull/15120/files
 Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=15120&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8313593
  Stats: 6 lines in 1 file changed: 4 ins; 0 del; 2 mod
  Patch: https://git.openjdk.org/jdk/pull/15120.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/15120/head:pull/15120

PR: https://git.openjdk.org/jdk/pull/15120


More information about the hotspot-gc-dev mailing list