{"record":{"id":"87c33541dd7111fa","repo":"apache/seatunnel","slug":"taskcalltimer-thread-interrupted","errorCode":null,"errorMessage":"TaskCallTimer thread interrupted","messagePattern":"TaskCallTimer thread interrupted","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"seatunnel-engine/seatunnel-engine-server/src/main/java/org/apache/seatunnel/engine/server/execution/TaskCallTimer.java","lineNumber":124,"sourceCode":"                    wait = wait0.get();\n                    currentTime = System.currentTimeMillis();\n                    executionTime = this.nextExecutionTime;\n                    if (!wait && executionTime <= currentTime) {\n                        timeoutAct(this.taskTracker.expiredTimes.incrementAndGet());\n                        break;\n                    }\n                }\n                if (wait) {\n                    synchronized (lock) {\n                        lock.wait();\n                    }\n                } else {\n                    synchronized (lock) {\n                        lock.wait(executionTime - currentTime);\n                    }\n                }\n            } catch (InterruptedException e) {\n                log.warn(\"TaskCallTimer thread interrupted\", e);\n            }\n        }\n    }\n\n    /** The action to be performed when the task call method execution times out */\n    private void timeoutAct(int expiredTimes) {\n        if (expiredTimes >= 1) {\n            // 1 busWork keep on running\n            keep.set(true);\n            // 2 busWork exclusive to the current taskTracker\n            cooperativeTaskWorker.exclusiveTaskTracker.set(taskTracker);\n            // 3 Submit a new BusWork to execute other tasks\n            runBusWorkSupplier.runNewBusWork(false);\n        } else {\n            // 1 Stop the current busWork from continuing to execute the new Task\n            keep.set(false);\n            // 2 Submit a new BusWork to execute other tasks\n            runBusWorkSupplier.runNewBusWork(false);","sourceCodeStart":106,"sourceCodeEnd":142,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-engine/seatunnel-engine-server/src/main/java/org/apache/seatunnel/engine/server/execution/TaskCallTimer.java#L106-L142","documentation":"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.","triggerScenarios":"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.","commonSituations":"Task finishing and its timer being cancelled during Zeta job shutdown; failover interrupting running task threads; engine worker shutdown while timers are armed.","solutions":["No action needed — the timer exits its loop after logging; this is expected during task teardown.","If it appears during normal operation (not shutdown), investigate which component interrupts the timer thread (thread dumps, lifecycle logs).","Ensure tasks are cancelled through the engine APIs so timers are stopped cleanly before thread interruption.","Keep wait durations sane; very long timers increase the window during which shutdown interruption is observed."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try { synchronized (lock) { lock.wait(timeout); } } catch (InterruptedException e) { log.warn(\"TaskCallTimer thread interrupted\", e); /* exit loop */ }","preventionTips":["Let the engine stop task timers during normal cancellation","Avoid interrupting engine timer threads from user code","Correlate the warning with job shutdown before investigating"],"tags":["zeta","timer","interrupt","thread"],"backgroundTag":"thread-interrupted","analyzedSha":"cf67b549a7a6c35fa0beb12d83c62892427ea919","analyzedAt":"2026-09-10T21:44:55.265Z","contentChangedAt":"2026-09-10T21:44:55.265Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}