luoyuan3471 commented on PR #4726:
URL: https://github.com/apache/hadoop/pull/4726#issuecomment-1211760018

   > @luoyuan3471 
![未命名](https://user-images.githubusercontent.com/29743168/183837904-187ebe71-d5a6-474c-948d-1160f0d3407e.png)
 you can see this image. this problem will happen when refresh thread is 
calling PreemptionManager.refreshQueue and schedule thread is calling 
AbstractCSQueue.getTotalKillableResource.At this time, refresh thread will 
require csqueue.readLock,but csqueue.readLock will blocked by schedule thread 
and "other thread"( https://bugs.openjdk.org/browse/JDK-6893626 ).And schedule 
thread will require PremmptionManager.readLock,but this readLock will blocked 
by refresh thread held writeLock. so i use tryLock to make refresh thread get 
csqueue.readLock. Wait for the refresh thread complete 
PreemptionManager.refreshQueue,the schedule thread will get 
premmptionManager.readLock, then can allocate new container.
   
   -----------------------------------------------
   Do you mean readLock.tryLock() will make readLock place first ,though a 
write lock request is already in the head of waiting queue? @yb12138 


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

Reply via email to