Oliverwqcwrw opened a new issue, #18246:
URL: https://github.com/apache/dolphinscheduler/issues/18246

   ### 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
   
   Master 节点日志出现如下报错:
   
   ```
   [WARN] ... TaskStateEventHandler:[69] - The current TaskInstance:  state is 
FAILURE, but the task state event status is RUNNING_EXECUTION, so the task 
state event will be ignored
   [ERROR] ... WorkflowExecuteRunnable:[292] - State event handle error, will 
remove this event: TaskStateEvent(processInstanceId=203448, 
taskInstanceId=215783, taskCode=0, status=TaskExecutionStatus{code=1, 
desc='running'}, type=TASK_STATE_CHANGE, key=null, channel=null, context=null)
   org.apache.dolphinscheduler.server.master.event.StateEventHandleError: The 
current TaskInstance:  state is FAILURE, but the task state event status is 
RUNNING_EXECUTION, so the task state event will be ignored
   ```
   
   导致 workflow 卡住、无法自动推进或结束。
   
   ### What you expected to happen
   
   预期:
   - 任务失败(FAILURE)后,workflow 应能自动结束、failover 或做下一步处理
   
   实际:
   - 明明 TaskInstance 状态已经是 FAILURE,又收到一个 RUNNING_EXECUTION 的事件
   - master 侧判断事件冲突,将其忽略并抛异常 "State event handle error"
   - workflow 卡在 running,无法推进
   
   怀疑和 #14428 类似,状态event顺序或幂等性逻辑出问题。
   
   ### How to reproduce
   
   1. 创建一个包含 timeout 或 failover 或依赖/子流程节点的 workflow(如出现依赖失败/超时/子流程异常均可能触发)
   2. 对应 TaskInstance 已经状态 FAIL
   3. 等待一段时间,查看 master 日志,观察是否有重复收到 RUNNING_EXECUTION event 并被忽略的情况
   4. workflow 卡在 running,且日志持续打印上述报错
   
   ### Anything else
   
   - 发生频率:偶发,主要出现在高并发/大 workflow/依赖/timeout 相关场景
   - master/worker 都是单独节点,分布式部署
   - 3.2.1 版本
   
   完整日志片段:
   ```
   [WI-203448][TI-215783] - [WARN] 2026-05-12 09:10:01.496 +0800 
o.a.d.s.m.e.TaskStateEventHandler:[69] - The current TaskInstance:  state is 
FAILURE, but the task state event status is RUNNING_EXECUTION, so the task 
state event will be ignored
   [WI-203448][TI-215783] - [ERROR] 2026-05-12 09:10:01.496 +0800 
o.a.d.s.m.r.WorkflowExecuteRunnable:[292] - State event handle error, will 
remove this
   event: TaskStateEvent(processInstanceId=203448, taskInstanceId=215783, 
taskCode=0, status=TaskExecutionStatus{code=1, desc='running'}, 
type=TASK_STATE_CHANGE, key=null, channel=null, context=null)
   org.apache.dolphinscheduler.server.master.event.StateEventHandleError: The 
current TaskInstance:  state is FAILURE
   , but the task state event status is RUNNING_EXECUTION, so the task state 
event will be ignored
           at 
org.apache.dolphinscheduler.server.master.event.TaskStateEventHandler.handleStateEvent(TaskStateEventHandler.java:70)
           at 
org.apache.dolphinscheduler.server.master.runner.WorkflowExecuteRunnable.handleEvents(WorkflowExecuteRunnable.java:288)
           at 
java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
           at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
           at 
java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
           at 
java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
           at java.base/java.lang.Thread.run(Thread.java:834)
   ```
   
   - 已经搜索过 issue,没有发现完全一样的 bug,但有 #14428、#15683 现象类似
   
   ### Version
   
   3.3.1
   
   ### Are you willing to submit PR?
   
   - [ ] 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]

Reply via email to