Martijn Visser created FLINK-41620:
--------------------------------------

             Summary: NetworkBufferTest.testMultipleLevelRetainedSlice4 fails 
with OutOfMemoryError: Java heap space
                 Key: FLINK-41620
                 URL: https://issues.apache.org/jira/browse/FLINK-41620
             Project: Flink
          Issue Type: Bug
          Components: Runtime / Network
    Affects Versions: 2.5.0
            Reporter: Martijn Visser


The flink-runtime unit tests failed on a master push run 2026-11-21 (Default 
Java 17, core) because the fork ran out of heap in {{NetworkBufferTest}}:
https://github.com/apache/flink/actions/runs/44840317766/job/136650102861

{code}
java.lang.OutOfMemoryError: Java heap space
[ERROR] JUnit Jupiter.JUnit Jupiter -- Time elapsed: 3.345 s <<< ERROR!
org.junit.platform.commons.JUnitException: TestEngine with ID 'junit-jupiter' 
failed to execute tests
Caused by: java.lang.OutOfMemoryError: Java heap space
        at 
org.apache.flink.core.memory.MemorySegmentFactory.allocateUnpooledSegment(MemorySegmentFactory.java:102)
        at 
org.apache.flink.runtime.io.network.buffer.NetworkBufferTest.newBuffer(NetworkBufferTest.java:73)
        at 
org.apache.flink.runtime.io.network.buffer.AbstractByteBufTest.testMultipleLevelRetainedSliceWithNonRetained(AbstractByteBufTest.java:4395)
        at 
org.apache.flink.runtime.io.network.buffer.AbstractByteBufTest.testMultipleLevelRetainedSlice4(AbstractByteBufTest.java:4041)
{code}

The heap dump in the job's artifact (fork limit -Xmx768m) has 465.5 MB live, of 
which 384 MB are six 64 MB segments held by this test. Every {{newBuffer}} in 
{{NetworkBufferTest}} allocates a 64 MB segment, and this test holds seven of 
them at once, counting the one from {{@BeforeEach}}. The seventh allocation 
failed. It is the only occurrence since 2026-10-29, and the test is unchanged 
since 2023. FLINK-36294 has the same TestEngine error in the table stage, 
without a cause.



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

Reply via email to