DarkAssassinator opened a new issue, #11838: URL: https://github.com/apache/dolphinscheduler/issues/11838
### 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 when we confige the `Timeout period` and `Failed retry interval` at the same time in Shell task. When shell task failed, it will submit a `TASK_STATE_CHANGE` TaskEvent, and then `TaskStateEventHandler` will call `WorkflowExecuteRunnable.taskFinished` and remove the _<taskInstanceCode,TaskProcessor>_ in `activeTaskProcessorMaps`  Then `StateWheelExecuteThread` will submit a `TASK_TIMEOUT` and a `TASK_RETRY` TaskEvent. But `TaskTimeoutStateEventHandler` will query a TaskProcessor form `activeTaskProcessorMaps` to process the TIMEOUT, this will casue a NPE:  And `WorkflowExecuteRunnable` will not remove this TaskEvent if this taskEventHandler throw a Exception, so it keep loop, but it will no any update,just a infinite loop.  Besides, the `WorkflowExecuteThreadPool.executeEvent` will keep print the `The workflow has been executed by another thread` each 100ms, because event count > 0 So u can find the master log prints NPE and `The workflow has been executed by another thread` at the same time like crazy This bug may cause #11796 But I think this needs to be discussed separately ### What you expected to happen this process instance will stop caused by TIMEOUT, not keep a infinite loop, and show it's keep running. ### How to reproduce just create a shell task like the following screenshot:  ### 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]
