[ https://issues.apache.org/jira/browse/FLINK-14300?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16942753#comment-16942753 ]
Piotr Nowojski edited comment on FLINK-14300 at 10/2/19 12:11 PM: ------------------------------------------------------------------ Hi [~mklein0]. Thank you for reporting and proposing a fix for this bug. Could you open a pull request for this change on the [github|https://github.com/apache/flink/]? If you do so, please notify me so I can quickly review it. was (Author: pnowojski): Hi [~mklein0]. Thank you for reporting and proposing a fix for this bug. Could you open a pull request for this change on the [github|https://github.com/apache/flink/]? > StreamTask#invoke leaks threads if OperatorChain fails to be constructed > ------------------------------------------------------------------------ > > Key: FLINK-14300 > URL: https://issues.apache.org/jira/browse/FLINK-14300 > Project: Flink > Issue Type: Bug > Components: Runtime / Task > Affects Versions: 1.8.1, 1.8.2, 1.9.0 > Reporter: Marcos Klein > Priority: Minor > Fix For: 1.10.0 > > Attachments: thread-leak-patch.diff > > > In the *StreamTask#invoke* method if an exception occurs during the > allocation of the > [operatorChain|[https://github.com/apache/flink/blob/release-1.9.0/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/tasks/StreamTask.java#L370]] > class, the [exception > handling|[https://github.com/apache/flink/blob/release-1.9.0/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/tasks/StreamTask.java#L485-L491]] > fails to cleanup the threads allocated as *StreamTask#recordWriters*. This > causes threads to leak as flink attempts to continually restart and fail for > the same cause. > > An example cause is a deserialization issue on a custom operator from a > checkpoint. > > Attached is a suggested fix for the master branch. -- This message was sent by Atlassian Jira (v8.3.4#803005)