njnu-seafish opened a new issue, #17820: URL: https://github.com/apache/dolphinscheduler/issues/17820
### Search before asking - [x] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened A NullPointerException will occur when task timeout alerts are configured. > [WI-0][TI-0] - 2025-12-23 16:14:15.280 INFO [MasterRpcServer-methodInvoker-5] o.a.d.s.m.e.WorkflowEventBus:[41] - Publish event: TaskRunningLifecycleEvent{task=s1, runtimeContext=null} [WI-173][TI-0] - 2025-12-23 16:14:15.379 INFO [ds-workflow-eventbus-worker-8] o.a.d.s.m.e.t.l.h.AbstractTaskLifecycleEventHandler:[47] - Fired task s1 TaskRunningLifecycleEvent{task=s1, runtimeContext=null} with state RUNNING_EXECUTION [WI-173][TI-0] - 2025-12-23 16:15:15.086 INFO [ds-workflow-eventbus-worker-14] o.a.d.s.m.e.t.l.h.TaskTimeoutLifecycleEventHandler:[67] - The task s1 TimeoutStrategy is WARN, try to send a timeout alert. [WI-173][TI-0] - 2025-12-23 16:15:15.087 ERROR [ds-workflow-eventbus-worker-14] o.a.d.s.m.e.WorkflowEventBusFireWorker:[88] - Fire event failed for WorkflowExecuteRunnable: s1-20251223161414354 org.apache.dolphinscheduler.server.master.engine.exceptions.WorkflowEventFireException: Failed to fire event: TaskRetryEvent{task=s1, timeout=60007} at org.apache.dolphinscheduler.server.master.engine.WorkflowEventBusFireWorker.doFireSingleWorkflowEventBus(WorkflowEventBusFireWorker.java:133) at org.apache.dolphinscheduler.server.master.engine.WorkflowEventBusFireWorker.fireAllRegisteredEvent(WorkflowEventBusFireWorker.java:86) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:750) Caused by: java.lang.NullPointerException: null at org.apache.dolphinscheduler.dao.AlertDao.sendTaskTimeoutAlert(AlertDao.java:250) at org.apache.dolphinscheduler.service.alert.WorkflowAlertManager.sendTaskTimeoutAlert(WorkflowAlertManager.java:265) at org.apache.dolphinscheduler.server.master.engine.task.lifecycle.handler.TaskTimeoutLifecycleEventHandler.doTaskTimeoutAlert(TaskTimeoutLifecycleEventHandler.java:94) at org.apache.dolphinscheduler.server.master.engine.task.lifecycle.handler.TaskTimeoutLifecycleEventHandler.handle(TaskTimeoutLifecycleEventHandler.java:68) at org.apache.dolphinscheduler.server.master.engine.task.lifecycle.handler.TaskTimeoutLifecycleEventHandler.handle(TaskTimeoutLifecycleEventHandler.java:38) at org.apache.dolphinscheduler.server.master.engine.task.lifecycle.handler.AbstractTaskLifecycleEventHandler.handle(AbstractTaskLifecycleEventHandler.java:46) at org.apache.dolphinscheduler.server.master.engine.task.lifecycle.handler.AbstractTaskLifecycleEventHandler.handle(AbstractTaskLifecycleEventHandler.java:32) at org.apache.dolphinscheduler.server.master.engine.WorkflowEventBusFireWorker.doFireSingleEvent(WorkflowEventBusFireWorker.java:144) at org.apache.dolphinscheduler.server.master.engine.WorkflowEventBusFireWorker.doFireSingleWorkflowEventBus(WorkflowEventBusFireWorker.java:122) ... 8 common frames omitted ### What you expected to happen After configuring task timeout, alert notifications can be sent normally. ### How to reproduce Select a timeout alert policy when creating a task. ### Anything else _No response_ ### Version dev ### Are you willing to submit PR? - [x] Yes I am willing to submit a PR! ### Code of Conduct - [x] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
