You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "Robert Metzger (Jira)" <ji...@apache.org> on 2020/10/19 15:30:00 UTC
[jira] [Comment Edited] (FLINK-15156) Warn user if System.exit() is
called in user code
[ https://issues.apache.org/jira/browse/FLINK-15156?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17212318#comment-17212318 ]
Robert Metzger edited comment on FLINK-15156 at 10/19/20, 3:29 PM:
-------------------------------------------------------------------
Thanks a lot for describing a potential fix for this ticket.
I have a few questions:
1. Did you observe any performance penalties from this change?
2. Additional places that come to mind:
- ExecutionGraph.vertexFinished() calls user function: finalizeOnMaster()
- ExecutionGraph() calls user function: initializeOnMaster(classLoader);
3. In your description, it seems that you have a toggle to disable/enable the exit-check-securityManager.
How about introducing a config that has 3 options: disabled | reportAndExit | reportAndThrow. When I created the ticket, I mostly thought about making debugging easier, buy having a log message that tells the user that System.exit() was called (That's why I'm proposing these 3 config options).
was (Author: rmetzger):
Thanks a lot for describing a potential fix for this ticket.
I have a few questions:
1. Did you observe any performance penalties from this change?
2. Additional places that come to mind:
- ExecutionGraph.vertexFinished() calls user function: finalizeOnMaster()
- ExecutionGraph() calls user function: initializeOnMaster(classLoader);
3. In your description, it seems that you have a toggle to disable/enable the exit-check-securityManager.
How about introducing a config that has 3 options: disabled | reportAndExit | reportAndThrow. When I created the ticket, I mostly thought about making debugging easier, buy having a log message that tells the user that System.exit() was called (That's why I'm proposing these 3 config options).
> Warn user if System.exit() is called in user code
> -------------------------------------------------
>
> Key: FLINK-15156
> URL: https://issues.apache.org/jira/browse/FLINK-15156
> Project: Flink
> Issue Type: Improvement
> Components: Runtime / Coordination
> Reporter: Robert Metzger
> Priority: Minor
> Labels: starter
>
> It would make debugging Flink errors easier if we would intercept and log calls to System.exit() through the SecurityManager.
> A user recently had an error where the JobManager was shutting down because of a System.exit() in the user code: https://lists.apache.org/thread.html/b28dabcf3068d489f38399c456c80d48569fcdf74b15f8bb95d532d0%40%3Cuser.flink.apache.org%3E
> If I remember correctly, we had such issues before.
> I put this ticket into the "Runtime / Coordination" component, as it is mostly about improving the usability / debuggability in that area.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)