Bug 81306 - Possible deadlock initializing jdt.core
Summary: Possible deadlock initializing jdt.core
Status: RESOLVED WORKSFORME
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.1   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.1 M4   Edit
Assignee: Jerome Lanneluc CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-12-15 15:38 EST by Olivier Thomann CLA
Modified: 2004-12-16 11:50 EST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Olivier Thomann CLA 2004-12-15 15:38:46 EST
From bug 81303, the following stack trace was found starting a workspace.

I was checking a project out of eclipse.org as anonymous@pserver when eclipse
crashed.  Here is all I 
could find:

!ENTRY org.eclipse.osgi 2004-12-15 14:50:46.428
!MESSAGE While loading class "org.eclipse.jdt.core.JavaCore$7", thread
"Worker-4" timed out waiting 
(5000ms) for thread "Worker-2" to finish starting bundle "org.eclipse.jdt.core".
To avoid deadlock, 
thread "Worker-4" is proceeding but "org.eclipse.jdt.core.JavaCore$7" may not be
fully initialized.
!STACK 0
java.lang.Exception: Generated exception.
	at
org.eclipse.core.runtime.adaptor.EclipseClassLoader.findLocalClass(EclipseClassLoader.java:
102)
	at
org.eclipse.osgi.framework.internal.core.BundleLoader.findLocalClass(BundleLoader.java:371)
	at
org.eclipse.osgi.framework.internal.core.BundleLoader.findClass(BundleLoader.java:402)
	at 
org.eclipse.osgi.framework.adaptor.core.AbstractClassLoader.loadClass(AbstractClassLoader.java:93)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
	at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)
	at org.eclipse.jdt.core.JavaCore$6.run(JavaCore.java:4125)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:66)

This shows that a deadlock appended starting jdt.core.
Comment 1 Jerome Lanneluc CLA 2004-12-16 04:45:18 EST
Can someone explain how this show a deadlock ? Where is the second thread ? This
stack trace is pretty useless as it is.
Comment 2 Pascal Rapicault CLA 2004-12-16 09:04:04 EST
The problem here is not a deadlock but actually a concurrency problem while JDT 
core is starting. 

The message indicates that while "Worker-2" thread was activating the jdt core 
plugin, the thread "worker-4" has been trying to load a class (from jdt core) 
and that the loading of this class has been delayed until the startup of jdt 
core startup is over (or a 5s delay has expired).
Comment 3 Jerome Lanneluc CLA 2004-12-16 11:50:40 EST
Thanks Pascal, but I don't see how we can identify the problem without knowing
which classes were being loaded concurrently, what was the stacks of the threads
at the time the timeout occured, etc.
I entered bug 81423 and will close this one for lack of information.