[
https://issues.apache.org/jira/browse/FLINK-41043?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18137822#comment-18137822
]
sepuri sai krishna commented on FLINK-41043:
--------------------------------------------
Still Open and unassigned since 2026-10-20, so a short ping.
I rechecked NettyShuffleMaster on master today. jobShuffleContexts at line 74
and
jobShuffleDescriptors at line 76 are both still plain HashMaps, and there is no
synchronization
anywhere in the file: registerJob puts, unregisterJob removes, and one
ShuffleMaster is shared by
every JobMaster. So the analysis above still holds.
[~martijnvisser] happy to take this if you assign it. I would fix both maps in
one change, and it
looks like it wants a backport to 1.20, 2.2 and 2.3.
> NettyShuffleMaster.registerJob fails with "HashMap$Node cannot be cast to
> HashMap$TreeNode" when jobs start concurrently
> ------------------------------------------------------------------------------------------------------------------------
>
> Key: FLINK-41043
> URL: https://issues.apache.org/jira/browse/FLINK-41043
> Project: Flink
> Issue Type: Bug
> Components: Runtime / Coordination
> Affects Versions: 1.20.6
> Reporter: Martijn Visser
> Priority: Major
> Labels: test-stability
>
> https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=80031&view=logs&j=0c940707-2659-5648-cbe6-a1ad63045f0a
> (release-1.20 nightly 2026-10-11, test_ci table, Java 8)
> TimeFunctionsITCase failed 128 of its 350 cases. One JobMaster could not
> start:
> {code}
> [ERROR]
> org.apache.flink.table.planner.functions.TimeFunctionsITCase.test(TestCase)[301]
> -- Time elapsed: 0.492 s <<< ERROR!
> java.lang.RuntimeException: Failed to fetch next result
> ...
> Caused by: org.apache.flink.runtime.jobmaster.JobMasterException: Could not
> start the JobMaster.
> at
> org.apache.flink.runtime.jobmaster.JobMaster.onStart(JobMaster.java:462)
> ...
> Caused by: java.lang.ClassCastException: java.util.HashMap$Node cannot be
> cast to java.util.HashMap$TreeNode
> at
> org.apache.flink.runtime.shuffle.NettyShuffleMaster.registerJob(NettyShuffleMaster.java:192)
> at
> org.apache.flink.runtime.jobmaster.JobMaster.startJobExecution(JobMaster.java:1142)
> at
> org.apache.flink.runtime.jobmaster.JobMaster.onStart(JobMaster.java:460)
> {code}
> The other cases failed with "Job completed with illegal application status:
> UNKNOWN" (60) and "MiniCluster is not yet running or has already been shut
> down" (65).
> {{NettyShuffleMaster.jobShuffleContexts}} is a plain {{HashMap}} since
> FLINK-33985 (1.20.0). {{registerJob}} and {{unregisterJob}} are called from
> each JobMaster's main thread, and the ShuffleMaster is shared by all
> JobMasters through {{JobManagerSharedServices}}. {{BuiltInFunctionTestBase}}
> runs its cases concurrently against one MiniCluster. The field is the same on
> release-2.2, release-2.3 and master. First occurrence.
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)