Martijn Visser created FLINK-40851:
--------------------------------------

             Summary: HybridShuffleITCase NPE in 
TieredStorageMemoryManagerImpl.release
                 Key: FLINK-40851
                 URL: https://issues.apache.org/jira/browse/FLINK-40851
             Project: Flink
          Issue Type: Bug
          Components: Runtime / Network
    Affects Versions: 1.20.6
            Reporter: Martijn Visser


The release-1.20 nightly on 2026-09-30 lost a flink-tests fork (JDK 8, exit 
code 239) while HybridShuffleITCase was running:
https://github.com/apache/flink/actions/runs/36658517115/job/109719695832

The fork log has a TaskExecutor I/O thread failing while it released a tiered 
result partition, during 
testHybridSelectiveExchangesRestart[enableNewHybridMode=true 
enableAdaptiveAutoParallelism=true]:

{code}
03:18:30,323 [flink-taskexecutor-io-thread-3] ERROR 
org.apache.flink.util.FatalExitExceptionHandler [] - FATAL: Thread 
'flink-taskexecutor-io-thread-3' produced an uncaught exception. Stopping the 
process...
java.lang.NullPointerException: null
        at java.util.ArrayDeque.addLast(ArrayDeque.java:249)
        at java.util.ArrayDeque.add(ArrayDeque.java:423)
        at 
org.apache.flink.runtime.io.network.buffer.LocalBufferPool.recycle(LocalBufferPool.java:596)
        at 
org.apache.flink.runtime.io.network.buffer.LocalBufferPool.recycle(LocalBufferPool.java:576)
        at 
org.apache.flink.runtime.io.network.partition.hybrid.tiered.storage.TieredStorageMemoryManagerImpl.release(TieredStorageMemoryManagerImpl.java:307)
        at java.util.ArrayList.forEach(ArrayList.java:1259)
        at 
org.apache.flink.runtime.io.network.partition.hybrid.tiered.storage.TieredStorageResourceRegistry.clearResourceFor(TieredStorageResourceRegistry.java:59)
        at 
org.apache.flink.runtime.io.network.partition.hybrid.tiered.shuffle.TieredResultPartition.releaseInternal(TieredResultPartition.java:196)
        at 
org.apache.flink.runtime.io.network.partition.ResultPartition.release(ResultPartition.java:276)
        at 
org.apache.flink.runtime.io.network.partition.ResultPartitionManager.releasePartition(ResultPartitionManager.java:182)
        at 
org.apache.flink.runtime.io.network.NettyShuffleEnvironment.lambda$releasePartitionsLocally$0(NettyShuffleEnvironment.java:186)
{code}

The segment passed to {{LocalBufferPool.recycle}} was null. 
{{TieredStorageMemoryManagerImpl.release()}} is the same on master, release-2.3 
and release-2.2. This is the only occurrence in the last seven days (1 of 135 
runs on the four branches). FLINK-33184 failed in the same release path with a 
"Leaking buffers" IllegalStateException, resolved by FLINK-33185 in 1.19.0. 
FLINK-33502 was an earlier fatal error in this test with a different cause, and 
FLINK-34426 covers this test timing out.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to