| [CDO] Possibly deadlock during the session invalidation [message #1821658] | 
Tue, 18 February 2020 05:00   | 
 
Eclipse User  | 
 | 
 | 
   | 
 
Hi, 
 
In our application, we sometimes encounter deadlocks if we commit while the session is invalidated. Indeed: 
- During the commit, the transaction is locked and waits for the SessionInvalidator in session.startLocalCommit() 
- During the session invalidation, the SessionInvalidator is locked and waits for the transaction in the updatePermissions method when comparing it with the head view. 
 
The deadlock can be avoided by adding the following code in the doAfterActivate method in CDOSessionImpl, as done in CDOViewImpl : 
ExecutorService executorService = getExecutorService();
invalidator.setDelegate(executorService);  
It allows to not keep the lock on the SessionInvalidator, but is it the best solution? 
 
Vincent
 |  
 |  
  | 
 | 
 | 
 | 
 | 
Powered by 
FUDForum. Page generated in 0.04839 seconds