You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@druid.apache.org by "jtuglu1 (via GitHub)" <gi...@apache.org> on 2025/09/01 10:29:28 UTC

[I] "Ghost" locks can remain allocated for finished/killed tasks (druid)

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: commits-unsubscribe@druid.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org


Re: [I] "Ghost" locks can remain allocated for finished/killed tasks (druid)

Posted by "jtuglu1 (via GitHub)" <gi...@apache.org>.
jtuglu1 closed issue #18464: "Ghost" locks can remain allocated for finished/killed tasks
URL: https://github.com/apache/druid/issues/18464


-- 
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: commits-unsubscribe@druid.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org