You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "Purushottam Sinha (Jira)" <ji...@apache.org> on 2026/06/26 05:04:00 UTC

[jira] [Commented] (FLINK-39962) Runtime: DeclarativeSlotPoolBridgeTest.testAcceptingOfferedSlotsWithoutResourceManagerConnected flaky

    [ https://issues.apache.org/jira/browse/FLINK-39962?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18091744#comment-18091744 ] 

Purushottam Sinha commented on FLINK-39962:
-------------------------------------------

[~qiuyanjun] Thanks for contributing, but can you comment on the JIRA for confirmation before picking it up.
It is a part of the Contribution guidlines. Please assign it to yourself.

> Runtime: DeclarativeSlotPoolBridgeTest.testAcceptingOfferedSlotsWithoutResourceManagerConnected flaky
> -----------------------------------------------------------------------------------------------------
>
>                 Key: FLINK-39962
>                 URL: https://issues.apache.org/jira/browse/FLINK-39962
>             Project: Flink
>          Issue Type: Bug
>          Components: Runtime / Coordination
>            Reporter: Purushottam Sinha
>            Priority: Minor
>              Labels: pull-request-available
>
> Problem
> The test fails intermittently in CI with NegativeArraySizeException: -1, failing the core test module. It is a test-only threading race, not a production defect.
>   Evidence
>   - Stack: NegativeArraySizeException in LinkedHashMap$LinkedValues.toArray via DeclarativeSlotPoolBridge.cancelPendingRequests (DeclarativeSlotPoolBridge.java:228-229, new ArrayList<>(pendingRequests.values())) ← onClose (:176).
>   - The bridge uses forMainThread(); onStart schedules checkIdleSlotTimeout/checkBatchSlotTimeout on that thread, but the test drives requestNewAllocatedSlot/offerSlots/close() from the test thread. A scheduled task mutates pendingRequests while close() copies it.
>   - Observed on master commit 6627acb. CI: https://github.com/apache/flink/actions/runs/27864565978/job/82466897527
>   Proposed fix
>   - Drive the test lifecycle through componentMainThreadExecutor, or use a ManuallyTriggeredScheduledExecutor so timeout tasks cannot fire concurrently with close().



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