Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 321473

Summary: DeadLock in ConcurrencyManager because of deferred lock
Product: z_Archived Reporter: Vikram Bhatia <vikram.jeet.bhatia>
Component: EclipselinkAssignee: Nobody - feel free to take it <nobody>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P2 CC: bob.cotton, david.minsky, gordon.yorke, michael.f.obrien, peter.krogh, tom.ware, vikram.jeet.bhatia
Version: unspecified   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:
Attachments:
Description Flags
Log File containing Thread dump and output from printLocks()
david.minsky: iplog+
Fix
david.minsky: iplog+
Fix
david.minsky: iplog+
Fix in main trunk
david.minsky: iplog+
Fix in main trunk - conflict resolved david.minsky: iplog+

Description Vikram Bhatia CLA 2010-08-02 01:44:24 EDT
Build Identifier: 

Under load Eclipselink 2.1 will be in an effective deadlock (not a java
deadlock) in the concurrency manager while waiting to release a deferred lock.
Please find the log file enclosed with thread dump and printLocks() log
using eclipselink.cache.record-stack-on-lock=true.


From the logs, it appears to be happening between the following threads.
1644838203@qtp-1567434291-6 and a daemon thread {"RMI TCP Connection(596)-10.32.0.129" daemon prio=10 tid=0x000000005f4e8000 nid=0x15ee in Object.wait() [0x0000000040538000]} where daemon thread has acquired a lock on a Vector and is waiting to acquire ReadLock whereas other thread after acquiring lock has been waiting to acquire lock on vector.

Please see enclosed log for more details.

Reproducible: Couldn't Reproduce

Steps to Reproduce:
Can only reproduce under load with a customer application which is difficult to attach.
Comment 1 Vikram Bhatia CLA 2010-08-02 01:46:30 EDT
This has been reproduced with EclipseLink 2.1.
Comment 2 Vikram Bhatia CLA 2010-08-02 01:53:32 EDT
Created attachment 175682 [details]
Log File containing Thread dump and output from printLocks()
Comment 3 Tom Ware CLA 2010-08-09 15:35:32 EDT
Reqires triage for 2.1.2
Comment 4 Vikram Bhatia CLA 2010-08-10 13:04:26 EDT
Created attachment 176255 [details]
Fix
Comment 5 David Minsky CLA 2010-08-11 12:59:40 EDT
Discussed this bug with Peter Krogh and permission has been given for it to be checked into 2.1.1 only.

A separate bug and fix is required for trunk.
Comment 6 Peter Krogh CLA 2010-08-17 09:45:40 EDT
Missed the 2.1.1 cutoff.  2.1.2 is the next patch release.
Comment 7 Vikram Bhatia CLA 2010-08-25 10:17:35 EDT
Created attachment 177425 [details]
Fix
Comment 8 David Minsky CLA 2010-08-27 16:31:40 EDT
Completed: At revision: 8100  
Fixed in 2.1 trunk (2.1.2)
Comment 9 Gordon Yorke CLA 2010-08-30 15:58:20 EDT
This bug should not be closed until the issue is fixed in TRUNK.  For the TRUNK fix the more risky  but better long term bug fix is to acquire locks in the Distributed merge using the same artifacts and mechanisms as the UOW merge.
Comment 10 Vikram Bhatia CLA 2010-09-16 01:14:30 EDT
Created attachment 178994 [details]
Fix in main trunk
Comment 11 Vikram Bhatia CLA 2010-09-20 04:14:22 EDT
Created attachment 179227 [details]
Fix in main trunk - conflict resolved

There was another check-in made after the patch was uploaded causing a conflict. The conflict is resolved, and another version of patch is enclosed.
Comment 12 David Minsky CLA 2010-09-20 14:26:42 EDT
Fixed in EL trunk
At revision: 8220
Comment 13 Tom Ware CLA 2010-11-01 11:39:01 EDT
*** Bug 328308 has been marked as a duplicate of this bug. ***
Comment 14 Eclipse Webmaster CLA 2022-06-09 10:19:22 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink