Bug 321398 - Deadlock occuring due to ModuleStructuralModel.checkSync()
Summary: Deadlock occuring due to ModuleStructuralModel.checkSync()
Status: RESOLVED FIXED
Alias: None
Product: WTP Common Tools
Classification: WebTools
Component: wst.common (show other bugs)
Version: 3.2.1   Edit
Hardware: PC Windows XP
: P1 critical (vote)
Target Milestone: 3.2.0 P   Edit
Assignee: Carl Anderson CLA
QA Contact: Carl Anderson CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-07-30 15:25 EDT by Carl Anderson CLA
Modified: 2010-08-02 11:22 EDT (History)
0 users

See Also:
ccc: review+


Attachments
Go to the LocalManager to do the refresh (1.69 KB, patch)
2010-07-30 15:27 EDT, Carl Anderson CLA
no flags Details | Diff
Cleaned up version - only go to the LocalManager (2.07 KB, patch)
2010-07-30 16:18 EDT, Carl Anderson CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Carl Anderson CLA 2010-07-30 15:25:56 EDT
In an adopter product, we are running into the circumstance where a process that already has a lock on a file, and the component file is out of sync with the filesystem, is calling into ModuleStructuralModel.checkSync().  When Job.getJobManager().beginRule(root, null); is called, this results in the thread waiting for itself (since it cannot get a workspace lock while it already has a file lock), and thus a deadlock occurs.
Comment 1 Carl Anderson CLA 2010-07-30 15:27:26 EDT
Created attachment 175608 [details]
Go to the LocalManager to do the refresh
Comment 2 Carl Anderson CLA 2010-07-30 15:30:42 EDT
Note that this code brings ModuleStructuralModel.checkSync() in sync with the way org.eclipse.jst.j2ee.common.internal.impl.XMLResourceImpl synchronizes files.

see bug 303635 for details on the XMLResourceImpl change.
Comment 3 Carl Anderson CLA 2010-07-30 16:18:05 EDT
Created attachment 175613 [details]
Cleaned up version - only go to the LocalManager

I left in the release of the lock I was no longer acquiring.
Comment 4 Carl Anderson CLA 2010-08-02 11:22:28 EDT
Committed to R3_2_1_patches