apache/druid · info
Skipping kill task scheduling because thread is interrupted.
Error message
Skipping kill task scheduling because thread is interrupted.
What it means
KillUnusedSegments.runInternal() submits kill tasks per datasource/interval; when a submit fails and the coordinator thread has been interrupted (shutdown in progress), it logs this warning and stops scheduling further kill tasks for this run. It prevents the duty cycle from fighting shutdown.
Solutions
- No action needed if it occurs during planned shutdown — the loop resumes next duty cycle after restart
- If frequent at other times, check coordinator liveness/leader stability
- Verify task queue capacity and overlord health so kill-task submits do not fail
- Check ZK/HTTP connectivity between coordinator and overlord
Defensive patterns
Strategy: try-catch
Try / catch
// warning indicates shutdown; only act if seen outside shutdown
if (!shuttingDown && logsContain("Skipping kill task scheduling")) {
pageCoordinatorOwner();
} Prevention
- Perform coordinator restarts during low-traffic windows
- Keep the overlord/task queue healthy so kill submissions don't fail
- Monitor coordinator leadership stability (leader elections mid-cycle cause this)
- Verify kill duty config (druid.coordinator.kill.*) so cycles complete quickly
When it happens
Trigger: During the coordinator's kill duty loop, remoteTaskService/taskQueue submission fails (e.g.RejectedExecutionException during shutdown) while Thread.currentThread().isInterrupted() is true.
Common situations: Coordinator graceful shutdown or leadership loss mid-duty-cycle; coordinator being killed while kill-task scheduling is running; overloaded task queue rejecting submissions.
Related errors
- lookup management on node
- Interrupted during close()
- Interrupted waiting for jetty shutdown.
- Already shut down, not starting again
- Background lookup manager thread could not be cancelled
AI-assisted analysis of apache/druid@9b90983fd2 (2026-09-07).
Data as JSON: /api/errors/7d7da1bec234f8af.
Report an issue: GitHub.
Appendix: source
Thrown at server/src/main/java/org/apache/druid/server/coordinator/duty/KillUnusedSegments.java:250
intervalToKill,
null,
maxSegmentsToKill,
maxUsedStatusLastUpdatedTime
),
true
);
++submittedTasks;
datasourceToLastKillIntervalEnd.put(dataSource, intervalToKill.getEnd());
// Termination conditions.
if (remainingDatasourcesToKill.isEmpty() || submittedTasks >= availableKillTaskSlots) {
break;
}
}
catch (Exception ex) {
log.error(ex, "Failed to submit kill task for dataSource[%s] in interval[%s]", dataSource, intervalToKill);
if (Thread.currentThread().isInterrupted()) {
log.warn("Skipping kill task scheduling because thread is interrupted.");
break;
}
}
}
log.info(
"Submitted [%d] kill tasks for [%d] datasources: [%s]. Remaining [%d] datasources to kill: [%s].",
submittedTasks,
dataSourcesToKill.size() - remainingDatasourcesToKill.size(),
Sets.difference(dataSourcesToKill, remainingDatasourcesToKill),
remainingDatasourcesToKill.size(),
remainingDatasourcesToKill
);
stats.add(Stats.Kill.SUBMITTED_TASKS, submittedTasks);
}
@NullableView on GitHub (pinned to 9b90983fd2)