rmannibucau opened a new issue, #9399:
URL: https://github.com/apache/hop/issues/9399

   ## Problem
   The local pipeline shutdown monitor can deadlock. A JVM thread dump of 
pipeline shutdown showed a three-thread cycle:
   
   - TableInput completion holds the transform monitor and waits for the 
pipeline monitor in the transform-finished listener.
   - FilterRows completion holds the pipeline monitor and waits for the 
transforms-list monitor in transforms.size().
   - ExecSqlRow error shutdown holds the transforms-list monitor in 
stopAll()/synchronizedList.forEach() and waits for the TableInput monitor in 
stopRunning().
   
   The SQL exception in ExecSqlRow triggers shutdown; the deadlock is in 
shutdown/completion locking, not SQL execution itself.
   
   ## Fix
   - Iterate transform snapshots in stopAll(), safeStop() and killAllNoWait() 
instead of invoking transform callbacks under the synchronized transform-list 
monitor.
   - Atomically claim stopAll() before callbacks, preventing duplicate 
concurrent shutdown and recursive stopping.
   - Update terminal state in BaseTransform.markStop() under its monitor, then 
invoke finished listeners outside it.
   - Snapshot finished listeners and invoke callbacks without holding the 
listener-list monitor.
   - Move error-triggered stopping outside the pipeline monitor in the 
completion listener.
   
   Originally part of PR #9374; split out per review.


-- 
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