Uploaded image for project: 'Flink'
  1. Flink
  2. FLINK-15156

Warn user if System.exit() is called in user code

    XMLWordPrintableJSON

    Details

    • Release Note:
      Hide
      A new configuration value `cluster.intercept-user-system-exit` allows to log a warning, or throw an exception if user code calls "System.exit()".

      This feature is not covering all locations in Flink where user code is executed. It just adds the infrastructure for such an interception.
      Show
      A new configuration value `cluster.intercept-user-system-exit` allows to log a warning, or throw an exception if user code calls "System.exit()". This feature is not covering all locations in Flink where user code is executed. It just adds the infrastructure for such an interception.

      Description

      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.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                hwanju Hwanju Kim
                Reporter:
                rmetzger Robert Metzger
              • Votes:
                0 Vote for this issue
                Watchers:
                6 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: