jtuglu1 opened a new issue, #18464: URL: https://github.com/apache/druid/issues/18464
Ghost locks can be allocated due to races between `TaskQueue` and `TaskLockbox`. These can stall future kill/compaction tasks and/or other tasks which use locks. ### Affected Version Druid v34, although I suspect it's earlier versions too. ### Description [T=1,Thread=1]: Overlord shutdown task A, executing [this](https://github.com/apache/druid/blob/-/indexing-service/src/main/java/org/apache/druid/indexing/overlord/TaskQueue.java#L744) line. [T=1,Thread=2]: Task begins [running](https://github.com/apache/druid/blob/-/indexing-service/src/main/java/org/apache/druid/indexing/overlord/TaskLockbox.java#L485) a SegmentAllocate action [T=1,Thread=2]: [This](https://github.com/apache/druid/blob/-/indexing-service/src/main/java/org/apache/druid/indexing/overlord/TaskLockbox.java#L498) line executes, returning a non-empty `AllocationHolderList` because indeed the task is still in `activeTasks`. [T=1,Thread=2]: Releases `giant` lock. [T=1,Thread=1]: Acquires `giant` lock and [removes](https://github.com/apache/druid/blob/-/indexing-service/src/main/java/org/apache/druid/indexing/overlord/TaskLockbox.java#L1239) it from the `activeTasks` set. Result: We receive the shutdown signal, but we allocate a lock for the task A (or do really any stateful operation on the overlord) before actually shutting down the task (race). -- 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] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
