Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 358745 - Deadlock while GenericJpaProjectManager attempts to stop
Summary: Deadlock while GenericJpaProjectManager attempts to stop
Status: CLOSED FIXED
Alias: None
Product: Dali JPA Tools
Classification: WebTools
Component: General (show other bugs)
Version: 3.0.1   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.2   Edit
Assignee: Brian Vosburgh CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-09-23 12:33 EDT by Ian Trimble CLA
Modified: 2012-03-27 21:47 EDT (History)
1 user (show)

See Also:


Attachments
Thread dump showing deadlock. (13.72 KB, text/plain)
2011-09-23 12:33 EDT, Ian Trimble CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
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