Community
Participate
Working Groups
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.
Can someone explain how this show a deadlock ? Where is the second thread ? This stack trace is pretty useless as it is.
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).
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.