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

Bug 358745

Summary: Deadlock while GenericJpaProjectManager attempts to stop
Product: [WebTools] Dali JPA Tools Reporter: Ian Trimble <ian.trimble>
Component: GeneralAssignee: Brian Vosburgh <brian.vosburgh>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: neil.hauge
Version: 3.0.1   
Target Milestone: 3.2   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
Thread dump showing deadlock. none

Description Ian Trimble CLA 2011-09-23 12:33:32 EDT
Created attachment 203920 [details]
Thread dump showing deadlock.

In adopter JUnit testing, we are sometimes seeing GenericJpaProjectManager deadlocking while attempting to stop.

A colleague's assessment was:
"This appears to be a deadlock in the org.eclipse.jpt.jpa code.  The main (ui) thread is trying to join to another JPA thread while holding an ILock that the other JPA thread is waiting for.  Therefore the join will never return.  This is being called on main during JpaJptCorePlugin shutdown."

Thread dump attached.
Comment 1 Brian Vosburgh CLA 2012-03-27 16:56:36 EDT
This deadlock should no longer occur, as we have completely reworked how the JPA project manager works. It now uses Eclipse Jobs (instead of its own background thread). This deadlock is the result of a misunderstanding of the method ILock.acquire() - apparently it "ignores attempts to interrupt the thread". Whoops. :-)
Comment 2 Ian Trimble CLA 2012-03-27 21:47:38 EDT
We haven't seen this in some time, so closing. We will re-open if we see it again, which sounds unlikely given the rework description.

Thanks,
 - Ian