Bug 32039 - Deadlock reconciling compilation unit
Summary: Deadlock reconciling compilation unit
Status: RESOLVED DUPLICATE of bug 31891
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Text (show other bugs)
Version: 2.1   Edit
Hardware: PC Windows 2000
: P3 blocker (vote)
Target Milestone: ---   Edit
Assignee: JDT-Text-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-02-17 13:16 EST by John Arthorne CLA
Modified: 2003-02-17 14:50 EST (History)
0 users

See Also:


Attachments
javacore dump file (20.66 KB, text/plain)
2003-02-17 13:16 EST, John Arthorne CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description John Arthorne CLA 2003-02-17 13:16:19 EST
Build: I20030214

I got a deadlock after selecting a method to override in the "Override/Implement
methods" dialog, and clicking finish.  Attaching the core dump file (I waited 30
minutes).  The problem is that the reconciler background thread is in the middle
of  reconciling.  It synchronizes on the working copy before starting this
(JavaReconcilingStrategy.reconcile), and then it tries to acquire the workspace
lock.  In the main thread, the reverse has happened.  It has acquired the
workspace lock, and then it is synchronizing on the working copy
(ImportsStructure.getReplaceRange).  

I believe the reconciler thread should not be synchronizing on the working copy
before starting the reconcile operation.  To avoid deadlock, the workspace lock
should be acquired before attempting to obtain other monitors.  In fact, the
sync block may not be needed since the workspace lock guarantees that no other
modifying operations are happening concurrently.
Comment 1 John Arthorne CLA 2003-02-17 13:16:57 EST
Created attachment 3526 [details]
javacore dump file
Comment 2 John Arthorne CLA 2003-02-17 13:33:47 EST
Upgrading severity.  The deadlock happens every time without fail.

- open a java editor on a class (don't dirty it)
- open the "override methods" dialog.
- wait two or three seconds for the reconciler thread to block
- select a method and click ok

-> deadlock

The workspace lock is already acquired when the dialog is open, which guarantees
that the reconciler will be blocked.
Comment 3 Dani Megert CLA 2003-02-17 14:50:06 EST

*** This bug has been marked as a duplicate of 31891 ***