[
https://issues.apache.org/jira/browse/FLINK-33121?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Panagiotis Garefalakis updated FLINK-33121:
-------------------------------------------
Description:
{{JobExceptionsHandler#createRootExceptionInfo}} makes the assumption that
*Global* Failures (with null Task name) may *only* be RootExceptions and
*Local/Task* may be part of concurrent exceptions List *--* if this
precondition is violated, an assertion is thrown as part of
{{{}asserLocalExceptionInfo{}}}.
However, in the existing logic in the AdaptiveScheduler, we always both the
Global and the Local failures at the *end* of the [failure collection
list|https://github.com/confluentinc/flink/blob/b8482260622c14db00f9dc88bbf9e82233613235/flink-runtime/src/main/java/org/apache/flink/runtime/scheduler/adaptive/StateWithExecutionGraph.java#L338]
and when converting them to history entries, we *remove from the Head* the
[oldest failure
exception.|https://github.com/confluentinc/flink/blob/b8482260622c14db00f9dc88bbf9e82233613235/flink-runtime/src/main/java/org/apache/flink/runtime/scheduler/adaptive/StateWithExecutionGraph.java#L386]
As a result, when there is a concurrent Task failure (first) with a Global
failure (second terminating the job), the global failure ends up in the
concurrent exception list, violating the precondition.
Solution is to only add Global failures in the *head* of the List as part of
handleGlobalFailure method to ensure they are ending up as RootExceptionEntries.
was:
{{JobExceptionsHandler#createRootExceptionInfo}} *only* allows concurrent
exceptions that are local failures *--* otherwise throws an assertion as part
of {{{}asserLocalExceptionInfo{}}}.
However, there are rare cases where multiple concurrent global failures are
triggered and added to the failureCollection, before transitioning the job
state to Failed e.g., through {{StateWithExecutionGraph#handleGlobalFailure}}
of the AdaptiveScheduler.
In this case the last added will be the root and the next one will trigger the
assertion
> Failed precondition in JobExceptionsHandler due to concurrent global failures
> -----------------------------------------------------------------------------
>
> Key: FLINK-33121
> URL: https://issues.apache.org/jira/browse/FLINK-33121
> Project: Flink
> Issue Type: Bug
> Components: Runtime / Coordination
> Reporter: Panagiotis Garefalakis
> Priority: Major
>
> {{JobExceptionsHandler#createRootExceptionInfo}} makes the assumption that
> *Global* Failures (with null Task name) may *only* be RootExceptions and
> *Local/Task* may be part of concurrent exceptions List *--* if this
> precondition is violated, an assertion is thrown as part of
> {{{}asserLocalExceptionInfo{}}}.
> However, in the existing logic in the AdaptiveScheduler, we always both the
> Global and the Local failures at the *end* of the [failure collection
> list|https://github.com/confluentinc/flink/blob/b8482260622c14db00f9dc88bbf9e82233613235/flink-runtime/src/main/java/org/apache/flink/runtime/scheduler/adaptive/StateWithExecutionGraph.java#L338]
> and when converting them to history entries, we *remove from the Head* the
> [oldest failure
> exception.|https://github.com/confluentinc/flink/blob/b8482260622c14db00f9dc88bbf9e82233613235/flink-runtime/src/main/java/org/apache/flink/runtime/scheduler/adaptive/StateWithExecutionGraph.java#L386]
> As a result, when there is a concurrent Task failure (first) with a Global
> failure (second terminating the job), the global failure ends up in the
> concurrent exception list, violating the precondition.
> Solution is to only add Global failures in the *head* of the List as part of
> handleGlobalFailure method to ensure they are ending up as
> RootExceptionEntries.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)