apache/dolphinscheduler · warning · TaskException
The current DvcTask has been interrupted
Error message
The current DvcTask has been interrupted
What it means
During DvcTask.handle, if the shell command execution is interrupted (worker shutdown, task kill/cancel) the code restores the interrupt flag, logs, sets exit code to failure, and throws TaskException 'The current DvcTask has been interrupted'.
Source
Thrown at dolphinscheduler-task-plugin/dolphinscheduler-task-dvc/src/main/java/org/apache/dolphinscheduler/plugin/task/dvc/DvcTask.java:75
throw new TaskException("dvc task params is not valid");
}
}
@Override
public void handle(TaskCallBack taskCallBack) throws TaskException {
try {
// construct process
IShellInterceptorBuilder<?, ?> shellActuatorBuilder = ShellInterceptorBuilderFactory.newBuilder()
.appendScript(buildCommand());
TaskResponse commandExecuteResult = shellCommandExecutor.run(shellActuatorBuilder, taskCallBack);
setExitStatusCode(commandExecuteResult.getExitStatusCode());
setProcessId(commandExecuteResult.getProcessId());
parameters.dealOutParam(shellCommandExecutor.getTaskOutputParams());
} catch (InterruptedException e) {
Thread.currentThread().interrupt();
log.error("The current DvcTask has been interrupted", e);
setExitStatusCode(EXIT_CODE_FAILURE);
throw new TaskException("The current DvcTask has been interrupted", e);
} catch (Exception e) {
log.error("dvc task error", e);
setExitStatusCode(EXIT_CODE_FAILURE);
throw new TaskException("Execute dvc task failed", e);
}
}
@Override
public void cancel() throws TaskException {
// cancel process
try {
shellCommandExecutor.cancelApplication();
} catch (Exception e) {
throw new TaskException("cancel application error", e);
}
}
public String buildCommand() {View on GitHub (pinned to 02eac45a1b)
Solutions
- Expected on cancel/shutdown — simply re-run the DVC task; DVC operations are generally resumable.
- If it appears unexpectedly, check worker logs for shutdown/kill events around the timestamp.
- Reduce DVC data size / use dvc push with cache so uploads survive interruption.
- Increase task timeout if the interruption stems from task timeout policy.
Defensive patterns
Strategy: try-catch
Try / catch
try {
dvcTask.handle(null);
} catch (TaskException e) {
if (e.getMessage().contains("interrupted")) {
Thread.currentThread().interrupt(); // propagate, treat as cancellation not failure
}
} Prevention
- Avoid killing workers mid-DVC-upload; use graceful shutdown.
- Set realistic task timeouts so cancellations are planned.
- Chunk large DVC pushes to reduce interruption windows.
- Treat this exception as cancellation: re-run rather than debug as a bug.
When it happens
Trigger: shellCommandExecutor.run(...) (waiting on the dvc/git subprocess) throws InterruptedException because the worker thread is interrupted — task cancel/kill from the UI, worker graceful shutdown, or process timeout handling.
Common situations: User clicks stop/kill on a long-running DVC upload/download; worker restarts during deployment; the enclosing workflow is cancelled; master kills the task after timeout.
Related errors
- The current ChunJun Task has been interrupted
- cancel application error
- The current yarn task has been interrupted
- not support shell type:
- Cancel application failed!
AI-assisted analysis of apache/dolphinscheduler@02eac45a1b (2026-09-06).
Data as JSON: /api/errors/4e4f8273ff76f049.
Report an issue: GitHub.