Bug 244003 - Eclipse hangs when checking out multiple projects
Summary: Eclipse hangs when checking out multiple projects
Status: VERIFIED NOT_ECLIPSE
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.5   Edit
Hardware: PC Windows XP
: P3 critical (vote)
Target Milestone: 3.5 M4   Edit
Assignee: Jerome Lanneluc CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-08-13 06:48 EDT by Joachim Piketz CLA
Modified: 2009-05-07 03:33 EDT (History)
8 users (show)

See Also:


Attachments
Check out result after a few minutes (267.14 KB, image/jpeg)
2008-08-13 06:53 EDT, Joachim Piketz CLA
no flags Details
Thread dump (25.41 KB, text/plain)
2008-08-13 06:54 EDT, Joachim Piketz CLA
no flags Details
Thread dump from Eclipse 3.4.1 (88.39 KB, text/plain)
2008-10-07 06:08 EDT, Joachim Piketz CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Joachim Piketz CLA 2008-08-13 06:48:21 EDT
Build ID: I20080617-2000

Steps To Reproduce:
1. Install eclipse (eclipse-jee-ganymede-win32.zip).
2. Start eclipse.
3. Select multiple projects from the CVS Repository view.
4. Check out the selected projects.

After a while, eclipse hangs within the check out operation. The check out operation cannot be canceled in the Progress view and if Eclipse is closed an dialog is shown with the message "The user operation is waiting for background work to complete".
Comment 1 Joachim Piketz CLA 2008-08-13 06:53:59 EDT
Created attachment 109887 [details]
Check out result after a few minutes
Comment 2 Joachim Piketz CLA 2008-08-13 06:54:27 EDT
Created attachment 109888 [details]
Thread dump
Comment 3 Tomasz Zarna CLA 2008-08-14 11:15:29 EDT
(In reply to comment #0)
> After a while, eclipse hangs within the check out operation. The check out
> operation cannot be canceled in the Progress view and if Eclipse is closed an
> dialog is shown with the message "The user operation is waiting for background
> work to complete".

By "eclipse hangs" you meant it got unresponsive or the fact that the checkout operation blocked whole workspace? Was the checkout operation still in progress at the time you made the screen shot? Checking out a huge project (or plenty of them) can take "a while". I think we can both agree on this. The problem here is the completely workspace, isn't?
Comment 4 Joachim Piketz CLA 2008-08-18 03:10:12 EDT
At the time the screenshot was taken, eclipse has no harddisk and CPU activity. The dialog "Checking out.." does not close automatically. Pressing "Cancel" closes the dialog. Next, an attempt to checkout a single project results in "The user operation is waiting for background work to complete.".
Comment 5 Joachim Piketz CLA 2008-08-18 03:45:31 EDT
Continued: If eclipse is closed a dialog is displayed "The user operation is waiting for background work to complete." with a disabled cancel button. The eclipse process must be killed using the task manager.
Comment 6 Genady Beryozkin CLA 2008-09-16 08:48:28 EDT
I have a similar eclipse hang (workspace locked) when I try to close a Java project and open another Java Project. Eclipse starts to build the workspace and the job never completes. It's stuck for more than few hours on 0%.
Cancelling the operation doesn't do anything.
Comment 7 Szymon Brandys CLA 2008-09-16 10:34:05 EDT
The lock in Worker-28 is causing the deadlock.
Please look at the John' suggestion in bug 245573, comment 12.
Comment 8 Konstantin Komissarchik CLA 2008-09-16 12:03:54 EDT
Chuck,

Could you take a look at this? Looks like a problem with module core model locking.
Comment 9 Carl Anderson CLA 2008-09-17 14:44:08 EDT
Bug 236438 not only improves performance, it will keep the second attempt (on Worker-28) from trying to load the already loading EMF Edit model, and thus should prevent this deadlock from occurring.

*** This bug has been marked as a duplicate of bug 236438 ***
Comment 10 Joachim Piketz CLA 2008-10-02 02:20:22 EDT
Not solved, still the same behaviour - impossible to use Eclipse 3.4.
Comment 11 Nitin Dahyabhai CLA 2008-10-02 15:25:01 EDT
Joachim, bug 236438 was fixed in WTP 3.0.1.  WTP version numbers are not the same as Eclipse version numbers.  Are you using WTP 3.0.1 or newer?  This would mean using Eclipse 3.4.1, or Ganymede SR1.
Comment 12 Joachim Piketz CLA 2008-10-03 02:45:34 EDT
I used Eclipse 3.4.1, but the third retry today works without any problems. I will retry more times.
Comment 13 Joachim Piketz CLA 2008-10-07 06:08:07 EDT
Created attachment 114402 [details]
Thread dump from Eclipse 3.4.1

Hang also occurs in the Ganymede SR1
Comment 14 Carl Anderson CLA 2008-10-16 14:07:26 EDT
Setting the found in version to 3.0.2 since the last comment says it happens in Ganymede SR1
Comment 15 Chuck Bridgham CLA 2008-10-16 14:23:26 EDT
Moving this over to jsdt... seems all the locked threads are due to org.eclipse.wst.jsdt.internal.ui.viewsupport.ProblemMarkerManager$1.run(ProblemMarkerManager.java:173)


Comment 16 Phil Berkland CLA 2008-10-16 17:51:42 EDT
Is it possible that com.csc.dip.projectset.ui.ProjectSetUI gets a workspace lock, which in turn blocks org.eclipse.jdt.core.JavaCore.setClasspathContainer which is also trying to get a workspace lock?
Comment 17 Phil Berkland CLA 2008-10-17 11:47:39 EDT
I think the deadlock is being caused by both org.eclipse.jdt.core.JavaCore.setClasspathContainer and
com.csc.dip.projectset.ui.ProjectSetUI trying to get the workspace lock on the same thread. 

Even though JSDT is on the stack a number of times, it has no locks.
Comment 18 Jerome Lanneluc CLA 2008-11-18 09:52:11 EST
Phil, why are you saying that org.eclipse.jdt.core.JavaCore.setClasspathContainer takes the workspace lock? In fact, it only runs in an IProject scheduling rule.

Also how did you find out that ProjectSetUI takes a workspace lock? Do you have the source for this?

John, again I'm not able to debug this deadlock as all looks right from the calls to Platform/Resources. Would you have any idea of what's causing the deadlock?
Comment 19 John Arthorne CLA 2008-11-21 10:12:57 EST
I can't see a problem from this new stack trace. I will note that this new stack trace is completely unrelated to the original stack trace, which was a clear deadlock in WTP code that was fixed. Also the steps are obviously not as simple as comment #0 since there is commercial (non-Eclipse) code running here. The only possibility that comes to mind is another case of bug 246136, where someone is creating their own scheduling rule that doesn't follow the scheduling rule contract.
Comment 20 Jerome Lanneluc CLA 2008-11-21 10:26:25 EST
Thanks John.
Comment 21 Jerome Lanneluc CLA 2008-11-21 10:27:16 EST
Joachim, there is not much we can do here since another component (com.csc.dip.projectset.ui) is involved and we don't have the source for it. You should report the problem to the provider of com.csc.dip.projectset.ui.

Closing as NOT_ECLIPSE. Please reopen if you have evidence that the bug is in Eclipse.
Comment 22 Joachim Piketz CLA 2008-11-24 02:19:14 EST
Thanks for your efforts.
Comment 23 David Audel CLA 2008-12-09 04:30:37 EST
Verified for 3.5M4