RFR: 8377347: jdk/jfr/event/gc/detailed/TestZAllocationStallEvent.java intermittent OOME

SendaoYan syan at openjdk.org
Fri Feb 6 10:19:25 UTC 2026


Hi all,

Test test/jdk/jdk/jfr/event/gc/detailed/TestZAllocationStallEvent.java intermittent throw OOME on some specific mahcines. If I catch the OOM error wrapper the memory allocation loop, the Events.fromRecording still report OOM error. 
The max memory heap was seted to 32M, this seems too small for ZGC to workly normally onm some specific machines, The gc log shows that ZGC unable to recliam the heap memory.

This PR change  include:

1. the -Xmx seted to 64G
2. increase the memory allocation loop count from 100 to 1000, this make sure the jfr evnet always happened. With the original count 100, the jfr event numbers couned to zero intermittely.
3. Invoke whitebox.fullgc() explicitly, make sure the JFR check code has enough heap memory to finish.

The test jdk/jfr/event/gc/detailed/TestZAllocationStallEvent.java run 10k times all passed after this PR.

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

Commit messages:
 - 8377347: jdk/jfr/event/gc/detailed/TestZAllocationStallEvent.java intermittent OOME

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

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


More information about the hotspot-dev mailing list