[
https://issues.apache.org/jira/browse/FLINK-41077?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
ASF GitHub Bot updated FLINK-41077:
-----------------------------------
Labels: pull-request-available (was: )
> RpcEndpoint.MainThreadExecutor#schedule swallows exceptions thrown by the
> scheduled task
> ----------------------------------------------------------------------------------------
>
> Key: FLINK-41077
> URL: https://issues.apache.org/jira/browse/FLINK-41077
> Project: Flink
> Issue Type: Bug
> Components: Runtime / RPC
> Affects Versions: 2.3.0, 2.2.1, 1.20.6, 2.4.0
> Reporter: Martijn Visser
> Assignee: Martijn Visser
> Priority: Major
> Labels: pull-request-available
>
> {{RpcEndpoint.MainThreadExecutor#schedule}} wraps the task in a
> {{FutureTask}} and runs that in the main thread. {{FutureTask#run}} catches
> every {{Throwable}}, so an exception thrown by a scheduled task is stored in
> the returned future and never reaches {{PekkoRpcActor#handleRunAsync}}, which
> logs failures of {{execute()}}-submitted runnables and rethrows fatal errors.
> A scheduled task that throws, including an {{OutOfMemoryError}}, is silent
> unless the caller calls {{get()}} on the returned future, and no in-tree
> caller does: {{HeartbeatManagerSenderImpl}} (a throwing heartbeat tick ends
> the heartbeat loop with no log line), {{DefaultBlocklistHandler}},
> {{DeclarativeSlotPoolBridge}}, {{DefaultDeclarativeSlotPool}},
> {{PhysicalSlotRequestBulkCheckerImpl}},
> {{ExecutionTimeBasedSlowTaskDetector}}, {{AdaptiveScheduler}}, and the driver
> executor in {{ActiveResourceManager}}. {{schedule()}} should surface the
> failure to the actor the same way {{execute()}} does while keeping it in the
> returned future. After the change a fatal error in any of these tasks exits
> the JVM like one in an {{execute()}}-submitted runnable does today.
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)