-
Type:
Bug
-
Resolution: Fixed
-
Priority:
P4
-
Affects Version/s: 25, 27
-
Component/s: hotspot
-
Environment:
+ uname -a
Linux xiexuan 5.15.0-94-generic #104 SMP Tue Apr 22 02:10:36 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux
+ cat /etc/os-release
PRETTY_NAME="Ubuntu 22.04.4 LTS"
NAME="Ubuntu"
VERSION_ID="22.04"
VERSION="22.04.4 LTS (Jammy Jellyfish)"
VERSION_CODENAME=jammy
ID=ubuntu
ID_LIKE=debian
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
UBUNTU_CODENAME=jammy
+ free -h
total used free shared buff/cache available
Mem: 755Gi 37Gi 590Gi 71Gi 127Gi 643Gi
Swap: 8.0Gi 0B 8.0Gi
+ lscpu
Architecture: x86_64
CPU op-mode(s): 32-bit, 64-bit
Address sizes: 48 bits physical, 48 bits virtual
Byte Order: Little Endian
CPU(s): 384
On-line CPU(s) list: 0-383
Vendor ID: HygonGenuine
Model name: Hygon C86-4G (OPN:7490H)
CPU family: 24
Model: 7
Thread(s) per core: 2
Core(s) per socket: 96
Socket(s): 2
Stepping: 0
BogoMIPS: 3999.81
Flags: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm constant_tsc rep_good nopl nonstop_tsc cpuid extd_ap
icid amd_dcm aperfmperf rapl pni pclmulqdq monitor ssse3 fma cx16 sse4_1 sse4_2 x2apic movbe popcnt aes xsave avx f16c rdrand lahf_lm cmp_legacy svm extapic cr8_legacy abm sse4a misalignsse 3dnowpre
fetch osvw skinit wdt tce topoext perfctr_core perfctr_nb bpext perfctr_llc mwaitx cpb cat_l3 cdp_l3 hw_pstate ssbd mba ibrs ibpb stibp vmmcall fsgsbase tsc_adjust bmi1 avx2 smep bmi2 cqm rdt_a avx5
12f avx512dq rdseed adx smap avx512ifma clflushopt clwb avx512cd sha_ni avx512bw avx512vl xsaveopt xsavec xgetbv1 xsaves cqm_llc cqm_occup_llc cqm_mbm_total cqm_mbm_local avx_vnni avx512_bf16 clzero
irperf xsaveerptr wbnoinvd arat npt lbrv svm_lock nrip_save tsc_scale vmcb_clean flushbyasid decodeassists pausefilter pfthreshold avic v_vmsave_vmload vgif v_spec_ctrl avx512vbmi umip avx512_vbmi2
gfni vaes vpclmulqdq avx512_vnni avx512_bitalg avx512_vpopcntdq overflow_recov succor smca avx512_vp2intersect sme sev sev_es
Virtualization features:
Virtualization: AMD-V
Caches (sum of all):
L1d: 6 MiB (192 instances)
L1i: 6 MiB (192 instances)
L2: 96 MiB (192 instances)
L3: 384 MiB (24 instances)
NUMA:
NUMA node(s): 12
NUMA node0 CPU(s): 0-15,192-207
NUMA node1 CPU(s): 16-31,208-223
NUMA node2 CPU(s): 32-47,224-239
NUMA node3 CPU(s): 48-63,240-255
NUMA node4 CPU(s): 64-79,256-271
NUMA node5 CPU(s): 80-95,272-287
NUMA node6 CPU(s): 96-111,288-303
NUMA node7 CPU(s): 112-127,304-319
NUMA node8 CPU(s): 128-143,320-335
NUMA node9 CPU(s): 144-159,336-351
NUMA node10 CPU(s): 160-175,352-367
NUMA node11 CPU(s): 176-191,368-383
Vulnerabilities:
Gather data sampling: Not affected
Itlb multihit: Not affected
L1tf: Not affected
Mds: Not affected
Meltdown: Not affected
Mmio stale data: Not affected
Retbleed: Mitigation; untrained return thunk; SMT enabled with STIBP protection
Spec rstack overflow: Mitigation; safe RET, no microcode
Spec store bypass: Mitigation; Speculative Store Bypass disabled via prctl and seccomp
Spectre v1: Mitigation; usercopy/swapgs barriers and __user pointer sanitization
Spectre v2: Mitigation; Retpolines, IBPB conditional, STIBP always-on, RSB filling, PBRSB-eIBRS Not affected
Srbds: Not affected
Tsx async abort: Not affected
+ ldd --version
ldd (Ubuntu GLIBC 2.35-0ubuntu3.13) 2.35
Copyright (C) 2022 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Written by Roland McGrath and Ulrich Drepper.
+ java -version
openjdk version "27" 2026-09-15
OpenJDK Runtime Environment HJDK-0 (build 27+-ac6e8d48)
OpenJDK 64-Bit Server VM HJDK-0 (build 27+-ac6e8d48, mixed mode, sharing)
+ java -Xinternalversion
OpenJDK 64-Bit Server VM (27+-ac6e8d48) for linux-amd64 JRE (27+-ac6e8d48), built on 2026-02-05T15:13:18Z with gcc 10.2.1 20210130 (Red Hat 10.2.1-11)
+ git remote -v
origin git@github.com:openjdk/jdk.git (fetch)
origin git@github.com:openjdk/jdk.git (push)
+ git log -n 1
+ head -n 1
commit ac6e8d481a20b40e136263c0e0c075bd138677ab
+ hostname -I
10.59.42.158 172.17.0.1+ uname -a Linux xiexuan 5.15.0-94-generic #104 SMP Tue Apr 22 02:10:36 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux + cat /etc/os-release PRETTY_NAME="Ubuntu 22.04.4 LTS" NAME="Ubuntu" VERSION_ID="22.04" VERSION="22.04.4 LTS (Jammy Jellyfish)" VERSION_CODENAME=jammy ID=ubuntu ID_LIKE=debian HOME_URL="https://www.ubuntu.com/" SUPPORT_URL="https://help.ubuntu.com/" BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/" PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy" UBUNTU_CODENAME=jammy + free -h total used free shared buff/cache available Mem: 755Gi 37Gi 590Gi 71Gi 127Gi 643Gi Swap: 8.0Gi 0B 8.0Gi + lscpu Architecture: x86_64 CPU op-mode(s): 32-bit, 64-bit Address sizes: 48 bits physical, 48 bits virtual Byte Order: Little Endian CPU(s): 384 On-line CPU(s) list: 0-383 Vendor ID: HygonGenuine Model name: Hygon C86-4G (OPN:7490H) CPU family: 24 Model: 7 Thread(s) per core: 2 Core(s) per socket: 96 Socket(s): 2 Stepping: 0 BogoMIPS: 3999.81 Flags: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm constant_tsc rep_good nopl nonstop_tsc cpuid extd_ap icid amd_dcm aperfmperf rapl pni pclmulqdq monitor ssse3 fma cx16 sse4_1 sse4_2 x2apic movbe popcnt aes xsave avx f16c rdrand lahf_lm cmp_legacy svm extapic cr8_legacy abm sse4a misalignsse 3dnowpre fetch osvw skinit wdt tce topoext perfctr_core perfctr_nb bpext perfctr_llc mwaitx cpb cat_l3 cdp_l3 hw_pstate ssbd mba ibrs ibpb stibp vmmcall fsgsbase tsc_adjust bmi1 avx2 smep bmi2 cqm rdt_a avx5 12f avx512dq rdseed adx smap avx512ifma clflushopt clwb avx512cd sha_ni avx512bw avx512vl xsaveopt xsavec xgetbv1 xsaves cqm_llc cqm_occup_llc cqm_mbm_total cqm_mbm_local avx_vnni avx512_bf16 clzero irperf xsaveerptr wbnoinvd arat npt lbrv svm_lock nrip_save tsc_scale vmcb_clean flushbyasid decodeassists pausefilter pfthreshold avic v_vmsave_vmload vgif v_spec_ctrl avx512vbmi umip avx512_vbmi2 gfni vaes vpclmulqdq avx512_vnni avx512_bitalg avx512_vpopcntdq overflow_recov succor smca avx512_vp2intersect sme sev sev_es Virtualization features: Virtualization: AMD-V Caches (sum of all): L1d: 6 MiB (192 instances) L1i: 6 MiB (192 instances) L2: 96 MiB (192 instances) L3: 384 MiB (24 instances) NUMA: NUMA node(s): 12 NUMA node0 CPU(s): 0-15,192-207 NUMA node1 CPU(s): 16-31,208-223 NUMA node2 CPU(s): 32-47,224-239 NUMA node3 CPU(s): 48-63,240-255 NUMA node4 CPU(s): 64-79,256-271 NUMA node5 CPU(s): 80-95,272-287 NUMA node6 CPU(s): 96-111,288-303 NUMA node7 CPU(s): 112-127,304-319 NUMA node8 CPU(s): 128-143,320-335 NUMA node9 CPU(s): 144-159,336-351 NUMA node10 CPU(s): 160-175,352-367 NUMA node11 CPU(s): 176-191,368-383 Vulnerabilities: Gather data sampling: Not affected Itlb multihit: Not affected L1tf: Not affected Mds: Not affected Meltdown: Not affected Mmio stale data: Not affected Retbleed: Mitigation; untrained return thunk; SMT enabled with STIBP protection Spec rstack overflow: Mitigation; safe RET, no microcode Spec store bypass: Mitigation; Speculative Store Bypass disabled via prctl and seccomp Spectre v1: Mitigation; usercopy/swapgs barriers and __user pointer sanitization Spectre v2: Mitigation; Retpolines, IBPB conditional, STIBP always-on, RSB filling, PBRSB-eIBRS Not affected Srbds: Not affected Tsx async abort: Not affected + ldd --version ldd (Ubuntu GLIBC 2.35-0ubuntu3.13) 2.35 Copyright (C) 2022 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. Written by Roland McGrath and Ulrich Drepper. + java -version openjdk version "27" 2026-09-15 OpenJDK Runtime Environment HJDK-0 (build 27+-ac6e8d48) OpenJDK 64-Bit Server VM HJDK-0 (build 27+-ac6e8d48, mixed mode, sharing) + java -Xinternalversion OpenJDK 64-Bit Server VM (27+-ac6e8d48) for linux-amd64 JRE (27+-ac6e8d48), built on 2026-02-05T15:13:18Z with gcc 10.2.1 20210130 (Red Hat 10.2.1-11) + git remote -v origin git@github.com:openjdk/jdk.git (fetch) origin git@github.com:openjdk/jdk.git (push) + git log -n 1 + head -n 1 commit ac6e8d481a20b40e136263c0e0c075bd138677ab + hostname -I 10.59.42.158 172.17.0.1
-
master
-
x86_64
-
linux
The test log snippet:
java.lang.OutOfMemoryError: Java heap space
at jdk.jfr.event.gc.detailed.TestZAllocationStallEvent.main(TestZAllocationStallEvent.java:51)
If I catch the OOM error warpper the memory allocation loop, the Events.fromRecording still report OOM error, the patch and the stack strace shows below:
// Allocate many large objects quickly, to outrun the GC
- for (int i = 0; i < 100; i++) {
- blackHole(new byte[4 * 1024 * 1024]);
+ try {
+ for (int i = 0; i < 100; i++) {
+ blackHole(new byte[4 * 1024 * 1024]);
+ }
+ } catch (java.lang.OutOfMemoryError ex) {
+ System.gc();
}
java.lang.OutOfMemoryError: Java heap space
at java.base/java.util.HashMap.newNode(HashMap.java:1910)
at java.base/java.util.HashMap.putVal(HashMap.java:638)
at java.base/java.util.HashMap.put(HashMap.java:619)
at jdk.jfr/jdk.jfr.internal.MetadataReader.declareTypes(MetadataReader.java:262)
at jdk.jfr/jdk.jfr.internal.MetadataReader.<init>(MetadataReader.java:79)
at jdk.jfr/jdk.jfr.internal.MetadataDescriptor.read(MetadataDescriptor.java:257)
at jdk.jfr/jdk.jfr.internal.consumer.ChunkHeader.readMetadata(ChunkHeader.java:238)
at jdk.jfr/jdk.jfr.internal.consumer.ChunkParser.<init>(ChunkParser.java:129)
at jdk.jfr/jdk.jfr.internal.consumer.ChunkParser.<init>(ChunkParser.java:109)
at jdk.jfr/jdk.jfr.internal.consumer.ChunkParser.<init>(ChunkParser.java:105)
at jdk.jfr/jdk.jfr.consumer.RecordingFile.createChunkParser(RecordingFile.java:314)
at jdk.jfr/jdk.jfr.consumer.RecordingFile.findNext(RecordingFile.java:290)
at jdk.jfr/jdk.jfr.consumer.RecordingFile.<init>(RecordingFile.java:86)
at jdk.jfr/jdk.jfr.consumer.RecordingFile.readAllEvents(RecordingFile.java:267)
at jdk.test.lib.jfr.Events.fromRecording(Events.java:280)
at jdk.jfr.event.gc.detailed.TestZAllocationStallEvent.main(TestZAllocationStallEvent.java:61)
- links to
-
Commit(master)
openjdk/jdk/0842782b
-
Review(master)
openjdk/jdk25u-dev/266
-
Review(master)
openjdk/jdk/29601