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

  1. No action needed if it occurs during planned shutdown — the loop resumes next duty cycle after restart
  2. If frequent at other times, check coordinator liveness/leader stability
  3. Verify task queue capacity and overlord health so kill-task submits do not fail
  4. 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

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


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);
  }

  @Nullable

View on GitHub (pinned to 9b90983fd2)