apache/seatunnel · warning

TaskCallTimer thread interrupted

Error message

TaskCallTimer thread interrupted

What it means

TaskCallTimer's run loop waits with lock.wait() for the next timeout deadline; if the wait is interrupted, it logs this warning with the exception. The timer thread is being cancelled or woken prematurely — interruption typically comes from shutdown of the task or engine executor.

Solutions

  1. No action needed — the timer exits its loop after logging; this is expected during task teardown.
  2. If it appears during normal operation (not shutdown), investigate which component interrupts the timer thread (thread dumps, lifecycle logs).
  3. Ensure tasks are cancelled through the engine APIs so timers are stopped cleanly before thread interruption.
  4. Keep wait durations sane; very long timers increase the window during which shutdown interruption is observed.
Defensive patterns

Strategy: try-catch

Try / catch

try { synchronized (lock) { lock.wait(timeout); } } catch (InterruptedException e) { log.warn("TaskCallTimer thread interrupted", e); /* exit loop */ }

Prevention

When it happens

Trigger: The timer thread blocks in lock.wait(executionTime - currentTime) and another thread calls interrupt() on it — e.g. during task completion/cancellation when the TaskCallTimer is stopped.

Common situations: Task finishing and its timer being cancelled during Zeta job shutdown; failover interrupting running task threads; engine worker shutdown while timers are armed.

Related errors


AI-assisted analysis of apache/seatunnel@cf67b549a7 (2026-09-10). Data as JSON: /api/errors/87c33541dd7111fa. Report an issue: GitHub.

Appendix: source

Thrown at seatunnel-engine/seatunnel-engine-server/src/main/java/org/apache/seatunnel/engine/server/execution/TaskCallTimer.java:124

                    wait = wait0.get();
                    currentTime = System.currentTimeMillis();
                    executionTime = this.nextExecutionTime;
                    if (!wait && executionTime <= currentTime) {
                        timeoutAct(this.taskTracker.expiredTimes.incrementAndGet());
                        break;
                    }
                }
                if (wait) {
                    synchronized (lock) {
                        lock.wait();
                    }
                } else {
                    synchronized (lock) {
                        lock.wait(executionTime - currentTime);
                    }
                }
            } catch (InterruptedException e) {
                log.warn("TaskCallTimer thread interrupted", e);
            }
        }
    }

    /** The action to be performed when the task call method execution times out */
    private void timeoutAct(int expiredTimes) {
        if (expiredTimes >= 1) {
            // 1 busWork keep on running
            keep.set(true);
            // 2 busWork exclusive to the current taskTracker
            cooperativeTaskWorker.exclusiveTaskTracker.set(taskTracker);
            // 3 Submit a new BusWork to execute other tasks
            runBusWorkSupplier.runNewBusWork(false);
        } else {
            // 1 Stop the current busWork from continuing to execute the new Task
            keep.set(false);
            // 2 Submit a new BusWork to execute other tasks
            runBusWorkSupplier.runNewBusWork(false);

View on GitHub (pinned to cf67b549a7)