{"record":{"id":"090a4228530bf719","repo":"apache/dolphinscheduler","slug":"cancel-application-error-090a42","errorCode":null,"errorMessage":"cancel application error","messagePattern":"cancel application error","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":135,"sourceCode":"        } 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() {\n        String command = \"\";\n        if (mlflowParameters.getMlflowTaskType().equals(MlflowConstants.MLFLOW_TASK_TYPE_PROJECTS)) {\n            command = buildCommandForMlflowProjects();\n        } else if (mlflowParameters.getMlflowTaskType().equals(MlflowConstants.MLFLOW_TASK_TYPE_MODELS)) {\n            command = buildCommandForMlflowModels();\n        }\n        log.info(\"mlflow task command: \\n{}\", command);\n        return command;\n    }\n\n    /**\n     * create command\n     *\n     * @return file name","sourceCodeStart":117,"sourceCodeEnd":153,"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#L117-L153","documentation":"ShellCommandExecutor.cancelApplication() threw while killing the mlflow process during task cancellation — process already gone, kill signal undeliverable, or execute directory issues. A cancellation-path failure only; wrapping in TaskException preserves the cause for the kill audit trail.","triggerScenarios":"Thrown at dolphinscheduler-task-plugin/dolphinscheduler-task-mlflow/src/main/java/org/apache/dolphinscheduler/plugin/task/mlflow/MlflowTask.java:135 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Inspect the caused-by exception; already-terminated processes can be treated as best-effort","Manually kill lingering mlflow processes by PID from the task log","Check worker permissions on the execute directory"],"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"}