RFR: JDK-8324930: java/lang/StringBuilder problem with concurrent jtreg runs

Matthias Baesken mbaesken at openjdk.org
Mon Feb 5 16:00:01 UTC 2024


On Tue, 30 Jan 2024 09:08:28 GMT, Matthias Baesken <mbaesken at openjdk.org> wrote:

> On some Windows machines we see sometimes OOM errors because of high resource (memory/swap) consumption. This is especially seen when the jtreg runs have higher concurrency. A solution is to put the java/lang/StringBuilder tests in the exclusiveAccess.dirs group so that they are not executed concurrently, which helps to mitigate the resource shortages.
> Of course this has the downside that on very large machines the concurrent execution is not done any more.

This is what the thread stack looks like in hs_err for example 
for  java\lang\StringBuilder\Insert\hs_err_pid910208.log
we had on
Sun Jan 07 20:32:56 CET 2024
such an hs err file with thread stack : 


#
# There is insufficient memory for the Java Runtime Environment to continue.
# Native memory allocation (mmap) failed to map 536870912 bytes. Error detail: G1 virtual space
# Possible reasons:
#   The system is out of physical RAM or swap space
#   This process is running with CompressedOops enabled, and the Java Heap may be blocking the growth of the native heap
# Possible solutions:
#   Reduce memory load on the system
#   Increase physical memory or swap space
#   Check if swap backing store is full
#   Decrease Java heap size (-Xmx/-Xms)
#   Decrease number of Java threads
#   Decrease Java thread stack sizes (-Xss)
#   Set larger code cache with -XX:ReservedCodeCacheSize=
#   JVM is running with Unscaled Compressed Oops mode in which the Java heap is
#     placed in the first 4GB address space. The Java Heap base address is the
#     maximum limit for the native heap growth. Please use -XX:HeapBaseMinAddress
#     to set the Java Heap base and to place the Java Heap above 4GB virtual address.
# This output file may be truncated or incomplete.
#
#  Out of Memory Error (c:\openjdk-jdk-dev-windows_x86_64-dbg\jdk\src\hotspot\os\windows\os_windows.cpp:3627), pid=910208, tid=910648
#
# JRE version:  (23.0) (fastdebug build )
# Java VM: OpenJDK 64-Bit Server VM (fastdebug 23-internal-adhoc.GLOBALsapmachine.jdk, mixed mode, sharing, tiered, compressed oops, compressed class ptrs, g1 gc, windows-amd64)
# CreateCoredumpOnCrash turned off, no core file dumped
#

...

---------------  T H R E A D  ---------------

Current thread (0x000002178c5a44c0):  JavaThread "Unknown thread" [_thread_in_vm, id=910648, stack(0x000000eeec500000,0x000000eeec600000) (1024K)]

Stack: [0x000000eeec500000,0x000000eeec600000]
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
V  [jvm.dll+0xc96581]  os::win32::platform_print_native_stack+0x101  (os_windows_x86.cpp:236)
V  [jvm.dll+0xfe7b31]  VMError::report+0x1491  (vmError.cpp:1005)
V  [jvm.dll+0xfea055]  VMError::report_and_die+0x645  (vmError.cpp:1834)
V  [jvm.dll+0xfea7cf]  VMError::report_and_die+0x5f  (vmError.cpp:1604)
V  [jvm.dll+0x559d4f]  report_vm_out_of_memory+0x5f  (debug.cpp:225)
V  [jvm.dll+0xc91c5d]  os::pd_commit_memory_or_exit+0xad  (os_windows.cpp:3635)
V  [jvm.dll+0xc82a2e]  os::commit_memory_or_exit+0x6e  (os.cpp:2051)
V  [jvm.dll+0x6de800]  G1PageBasedVirtualSpace::commit+0x100  (g1PageBasedVirtualSpace.cpp:192)
V  [jvm.dll+0x6f0aff]  G1RegionsLargerThanCommitSizeMapper::commit_regions+0x7f  (g1RegionToSpaceMapper.cpp:100)
V  [jvm.dll+0x7806da]  HeapRegionManager::expand+0x8a  (heapRegionManager.cpp:164)
V  [jvm.dll+0x780be6]  HeapRegionManager::expand_by+0xf6  (heapRegionManager.cpp:361)
V  [jvm.dll+0x6812e4]  G1CollectedHeap::expand+0xf4  (g1CollectedHeap.cpp:1014)
V  [jvm.dll+0x682dc6]  G1CollectedHeap::initialize+0x596  (g1CollectedHeap.cpp:1389)
V  [jvm.dll+0xf823e0]  universe_init+0x140  (universe.cpp:794)
V  [jvm.dll+0x79c8c1]  init_globals+0x31  (init.cpp:126)
V  [jvm.dll+0xf5c20e]  Threads::create_vm+0x2ae  (threads.cpp:552)
V  [jvm.dll+0x8c17b2]  JNI_CreateJavaVM_inner+0x82  (jni.cpp:3576)
V  [jvm.dll+0x8c5d9f]  JNI_CreateJavaVM+0x1f  (jni.cpp:3667)
C  [jli.dll+0x539f]  JavaMain+0x113  (java.c:491)
C  [ucrtbase.dll+0x2268a]  (no source info available)
C  [KERNEL32.DLL+0x17ac4]  (no source info available)
C  [ntdll.dll+0x5a4e1]  (no source info available)

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

PR Comment: https://git.openjdk.org/jdk/pull/17625#issuecomment-1927319309


More information about the core-libs-dev mailing list