Github user StefanRRichter commented on a diff in the pull request:

    https://github.com/apache/flink/pull/4058#discussion_r120291185
  
    --- Diff: 
flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/tasks/StreamTask.java
 ---
    @@ -824,11 +824,14 @@ public ProcessingTimeService 
getProcessingTimeService() {
         * FAILED, and, if the invokable code is running, starts an 
asynchronous thread
         * that aborts that code.
         *
    -    * <p>This method never blocks.</p>
    +    * <p>This method never blocks.
         */
        @Override
        public void handleAsyncException(String message, Throwable exception) {
    -           getEnvironment().failExternally(exception);
    +           if (isRunning) {
    --- End diff --
    
    I doubt that this is working fix, it will only make the problem less likely 
to occur. This method can be called asynchronously to Threads that manipulate 
`isRunning`, which means that the stream task can leave running status after 
the condition was checked as true, but before `failExternally(...)` went 
through.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to