eclipse-openj9 / openj9

Eclipse OpenJ9: A Java Virtual Machine for OpenJDK that's optimized for small footprint, fast start-up, and high throughput. Builds on Eclipse OMR (https://github.com/eclipse/omr) and combines with the Extensions for OpenJDK for OpenJ9 repo.
Other
3.41k stars 754 forks source link

balanced OpenJDK vm/gc/InfiniteList OutOfMemoryError #21901

Open pshipton opened 1 month ago

pshipton commented 1 month ago

https://openj9-jenkins.osuosl.org/job/Test_openjdk11_j9_sanity.openjdk_aarch64_mac_Nightly_testList_1/413 vm/gc/InfiniteList.java jdk_lang_j9_1

No heap or system dump due to the options used to run this test suite. https://openj9-artifactory.osuosl.org/artifactory/ci-openj9/Test/Test_openjdk11_j9_sanity.openjdk_aarch64_mac_Nightly_testList_1/413/openjdk_test_output.tar.gz

main -Xmx25M InfiniteList 23:11:45 JVMDUMP055I Processing dump event "systhrow", detail "java/lang/OutOfMemoryError", exception "Java heap space" at 2025/05/16 13:11:42 - please wait.

pshipton commented 1 month ago

30x x 5 grinder on InfiniteList https://openj9-jenkins.osuosl.org/job/Grinder/4344/ - passed

dmitripivkine commented 3 weeks ago

Test source: https://github.com/ibmruntimes/openj9-openjdk-jdk/blob/openj9/test/hotspot/jtreg/gc/InfiniteList.java

Test generates OOM condition intentionally.

dmitripivkine commented 3 weeks ago

OOM expected to be caught in the "MainThread" 0x14d8c1500 (and it is) but also occur in the "Finalizer thread" 0x14b811500:

cat Snap.20250516.131142.39956.0003.trc.fmt.txt | grep "NULL!"
03:11:42.153867136         0x14d8c1500       j9mm.101  Event       J9AllocateIndexableObject() returning NULL! 400024 bytes requested for object of class 0x15cb45900 from memory space 'Flat' id=0x600000f5cf20
03:11:42.153867469                *0x0       j9mm.101  Event       J9AllocateIndexableObject() returning NULL! 400024 bytes requested for object of class 0x15cb45900 from memory space 'Flat' id=0x600000f5cf20
03:11:42.187175856         0x14d8c1500       j9mm.100  Event       J9AllocateObject() returning NULL! 64 bytes requested for object of class 0x15cb6bc00 from memory space 'Flat' id=0x600000f5cf20
03:11:42.187176481                *0x0       j9mm.100  Event       J9AllocateObject() returning NULL! 64 bytes requested for object of class 0x15cb6bc00 from memory space 'Flat' id=0x600000f5cf20
03:11:42.230453643         0x14b811500       j9mm.101  Event       J9AllocateIndexableObject() returning NULL! 1048 bytes requested for object of class 0x14d8cee00 from memory space 'Flat' id=0x600000f5cf20
03:11:42.230454268                *0x0       j9mm.101  Event       J9AllocateIndexableObject() returning NULL! 1048 bytes requested for object of class 0x14d8cee00 from memory space 'Flat' id=0x600000f5cf20
03:11:42.265363695         0x14b811500       j9mm.100  Event       J9AllocateObject() returning NULL! 64 bytes requested for object of class 0x15cb6bc00 from memory space 'Flat' id=0x600000f5cf20
03:11:42.265364320                *0x0       j9mm.100  Event       J9AllocateObject() returning NULL! 64 bytes requested for object of class 0x15cb6bc00 from memory space 'Flat' id=0x600000f5cf20
dmitripivkine commented 3 weeks ago

@tajila Test creates artificial OOM in the Main Thread and catching it, but also got OOM in Finalization Thread. Is it the test issue or VM/GC should do something better?

tajila commented 3 weeks ago

@tajila Test creates artificial OOM in the Main Thread and catching it, but also got OOM in Finalization Thread. Is it the test issue or VM/GC should do something better?

We've had other failures like this in the past. Tests like these tend to be flaky. I think maybe we should disable finalization for these tests.