{"record":{"id":"c40200397ae239d0","repo":"apache/dolphinscheduler","slug":"the-current-mlflow-task-has-been-interrupted","errorCode":null,"errorMessage":"The current Mlflow task has been interrupted","messagePattern":"The current Mlflow task has been interrupted","errorType":"exception","errorClass":"TaskException","httpStatus":null,"severity":"error","filePath":"dolphinscheduler-task-plugin/dolphinscheduler-task-mlflow/src/main/java/org/apache/dolphinscheduler/plugin/task/mlflow/MlflowTask.java","lineNumber":121,"sourceCode":"            // construct process\n            IShellInterceptorBuilder<?, ?> shellActuatorBuilder = ShellInterceptorBuilderFactory.newBuilder()\n                    .properties(ParameterUtils.convert(getParamsMap()))\n                    .appendScript(buildCommand());\n            TaskResponse commandExecuteResult = shellCommandExecutor.run(shellActuatorBuilder, taskCallBack);\n            int exitCode;\n            if (mlflowParameters.getIsDeployDocker()) {\n                exitCode = checkDockerHealth();\n            } else {\n                exitCode = commandExecuteResult.getExitStatusCode();\n            }\n            setExitStatusCode(exitCode);\n            setProcessId(commandExecuteResult.getProcessId());\n            mlflowParameters.dealOutParam(shellCommandExecutor.getTaskOutputParams());\n        } catch (InterruptedException e) {\n            Thread.currentThread().interrupt();\n            log.error(\"The current Mlflow task has been interrupted\", e);\n            setExitStatusCode(EXIT_CODE_FAILURE);\n            throw new TaskException(\"The current Mlflow task has been interrupted\", e);\n        } catch (Exception e) {\n            log.error(\"Mlflow task error\", e);\n            setExitStatusCode(EXIT_CODE_FAILURE);\n            throw new TaskException(\"Execute Mlflow task failed\", e);\n        }\n    }\n\n    @Override\n    public void cancel() throws TaskException {\n        // cancel process\n        try {\n            shellCommandExecutor.cancelApplication();\n        } catch (Exception e) {\n            throw new TaskException(\"cancel application error\", e);\n        }\n    }\n\n    public String buildCommand() {","sourceCodeStart":103,"sourceCodeEnd":139,"githubUrl":"https://github.com/apache/dolphinscheduler/blob/02eac45a1b6676e639fcbfb4be2243de5771b05d/dolphinscheduler-task-plugin/dolphinscheduler-task-mlflow/src/main/java/org/apache/dolphinscheduler/plugin/task/mlflow/MlflowTask.java#L103-L139","documentation":"InterruptedException was caught while the MLflow shell command ran — the task was killed by the master/user and the waiting worker thread was interrupted. The handler restores the interrupt flag, sets the failure exit code, and rethrows so the instance is recorded as interrupted rather than completed.","triggerScenarios":"Thrown at dolphinscheduler-task-plugin/dolphinscheduler-task-mlflow/src/main/java/org/apache/dolphinscheduler/plugin/task/mlflow/MlflowTask.java:121 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["No fix needed when the kill was intentional","If interrupts are spurious, check worker restarts/thread pool shutdown events","Ensure the mlflow process is actually terminated by the cancel path to avoid orphans"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"02eac45a1b6676e639fcbfb4be2243de5771b05d","analyzedAt":"2026-09-06T17:43:00.555Z","contentChangedAt":"2026-09-06T17:43:00.555Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}