[
https://issues.apache.org/jira/browse/FLINK-39962?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
ASF GitHub Bot updated FLINK-39962:
-----------------------------------
Labels: pull-request-available (was: )
> 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)