Community
Participate
Working Groups
I'm seeing this when I start up Eclipse - doesn't happen all the time, just "most" of the time :) - the following message appears in my Error Log: While loading class "org.eclipse.jdt.internal.corext.util.AllTypesCache$1$RequestorAbort", thread "main" timed out waiting (5000ms) for thread "Worker-0" to finish starting bundle "org.eclipse.jdt.ui". To avoid deadlock, thread "main" is proceeding but "org.eclipse.jdt.internal.corext.util.AllTypesCache$1$RequestorAbort" may not be fully initialized. I used to think this had to do with switching workspaces, but I have seen cases where this happened to me and multiple-workspaces didn't come into play. So, I no longer think this has much if anything to do with multiple workspaces. Here's the stack for more info: 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.internal.corext.util.AllTypesCache.startBackgroundMode(AllTypesCache.java:627) at org.eclipse.jdt.internal.corext.util.AllTypesCache.access$3(AllTypesCache.java:595) at org.eclipse.jdt.internal.corext.util.AllTypesCache$4.run(AllTypesCache.java:589) at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35) at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:118) at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:2780) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2451) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1569) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1540) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:285) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:144) at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:102) at org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:220) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:273) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:129) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.eclipse.core.launcher.Main.basicRun(Main.java:185) at org.eclipse.core.launcher.Main.run(Main.java:710) at org.eclipse.core.launcher.Main.main(Main.java:694) My particulars... running on WinXP, JDK 1.4.2, Eclipse 3.1M4 but I've seen this behavior on 3.1M2 and 3.0.1. The plugins that I have installed: JBoss IDE 1.4, jadClipse, Jalopy. I originally added this to bug #68129 but was told that my issue was due to a different component and I should write it up against the JDT UI. Hence, this bug report.
*** Bug 68895 has been marked as a duplicate of this bug. ***
John, does Eclipse really hang at startup. And what perspective are you in when you shutdown and restart Eclipse ?
Pascal, can you please shed some light on this. Since I don't know what trigger the worker-0 thread there is little I can do. Is there any way to find out what job is actually running in worker thread ?
Dirk - sorry if I wasn't clear. When I say "hang at startup", I mean the GUI is non-responsive for the first X seconds when it starts up (about 5 or 10). It "hangs" from the user point of view. I can't select any menu items, list items or any GUI components. The perspectives that it starts up in is either Resource or Java (I have seen it happen in both). Once that initial "hang" period, the GUI becomes responsive again. So, "hang" was probably a bad word, since the problem isn't permanent. Its a temporary condition that only occurs during the first few seconds during startup.
OK will adjust title than.
Pascal, can you please comment !
I'm back from vacation! There is no way to know what is triggering the thread "worker-0" nor what it is doing except that it is starting the jdt.ui plugin. The only thing I can say from that is that jdt.ui is taking a long time to start.
Now that I'm fully awake, you can know who and why jdt ui is being activated by using the core tools.
John, is it possible that you create a VM dump the next time you are seeing the hang. This would allow to understand what is going on in the worker thread. I am not seeing the hand on my machine.
Unfortunately, I cannot replicate this so easily anymore (I just tried 5 or 6 times right now, going to different workspaces, and didn't see it). After I reported this, I removed some plugins that I didn't use much, and now I don't see this as often (I did see it a few days ago, but its now a rare occurence). When I see it again, I'll be sure to take a dump and post it here.
Thanks John.
If this can help, I've got the same symptoms with: - JDK 1.4.2_05 - eclipse-SDK-N20050120-0010-macosx-carbon - PHPEclipse1.1.2-2004-12-04 Sometimes (about one in three startups, with no particular pattern), when firing up Eclipse, each one of 400 classes of PHPEclipse timeouts with 5 s (I let it do that entirely once, and, yes, I then have the functionnal environment). I went into jdb, and found Worker-0 waiting for a lock. But doing a "lock work" got me a "Operation is not supported on the target VM". OK, here are my threads: (java.lang.Thread)0x1 main cond. waiting (org.eclipse.osgi.framework.eventmgr.EventThread)0xa10 Framework Event Dispatcher cond. waiting (org.eclipse.osgi.framework.eventmgr.EventThread)0xa11 Start Level Event Dispatcher cond. waiting (org.eclipse.core.internal.jobs.Worker)0xa12 Worker-0 running (org.eclipse.jface.resource.ImageCache$ReferenceCleanerThread)0xa13 Reference Cleaner: 1 cond. waiting Here's what Worker-0 is doing, well, waiting for: [1] java.lang.Object.wait (native method) [2] org.eclipse.ui.internal.Semaphore.acquire (Semaphore.java:41) [3] org.eclipse.ui.internal.UISynchronizer.syncExec (UISynchronizer.java:45) [4] org.eclipse.swt.widgets.Display.syncExec (Display.java:3?335) [5] net.sourceforge.phpdt.ui.PreferenceConstants.initializeDefaultValues (PreferenceConstants.java:2? 249) [6] net.sourceforge.phpeclipse.PHPeclipsePlugin.initializeDefaultPreferences (PHPeclipsePlugin.java: 843) [7] org.eclipse.ui.plugin.AbstractUIPlugin.initializeDefaultPluginPreferences (AbstractUIPlugin.java:354) [8] org.eclipse.core.runtime.Plugin.internalInitializeDefaultPluginPreferences (Plugin.java:408) [9] org.eclipse.core.internal.preferences.DefaultPreferences.applyRuntimeDefaults (DefaultPreferences.java:204) [10] org.eclipse.core.internal.preferences.DefaultPreferences.loadDefaults (DefaultPreferences.java: 301) [11] org.eclipse.core.internal.preferences.DefaultPreferences.load (DefaultPreferences.java:297) [12] org.eclipse.core.internal.preferences.EclipsePreferences.create (EclipsePreferences.java:298) [13] org.eclipse.core.internal.preferences.EclipsePreferences.internalNode (EclipsePreferences.java: 531) [14] org.eclipse.core.internal.preferences.EclipsePreferences.node (EclipsePreferences.java:660) [15] org.eclipse.core.internal.preferences.AbstractScope.getNode (AbstractScope.java:39) [16] org.eclipse.ui.preferences.ScopedPreferenceStore.getDefaultPreferences (ScopedPreferenceStore.java:226) [17] org.eclipse.ui.preferences.ScopedPreferenceStore.getPreferenceNodes (ScopedPreferenceStore.java:257) [18] org.eclipse.ui.preferences.ScopedPreferenceStore.contains (ScopedPreferenceStore.java:314) [19] net.sourceforge.phpeclipse.PHPeclipsePlugin.installPreferenceStoreBackwardsCompatibility (PHPeclipsePlugin.java:1?084) [20] net.sourceforge.phpeclipse.PHPeclipsePlugin.start (PHPeclipsePlugin.java:1?224) [21] org.eclipse.core.internal.compatibility.PluginActivator.start (PluginActivator.java:30) [22] org.eclipse.osgi.framework.internal.core.BundleContextImpl$2.run (BundleContextImpl.java:989) [23] java.security.AccessController.doPrivileged (native method) [24] org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator (BundleContextImpl.java:985) [25] org.eclipse.osgi.framework.internal.core.BundleContextImpl.start (BundleContextImpl.java:968) [26] org.eclipse.osgi.framework.internal.core.BundleHost.startWorker (BundleHost.java:311) [27] org.eclipse.osgi.framework.internal.core.AbstractBundle.start (AbstractBundle.java:274) [28] org.eclipse.core.runtime.adaptor.EclipseClassLoader.findLocalClass (EclipseClassLoader.java:110) [29] org.eclipse.osgi.framework.internal.core.BundleLoader.findLocalClass (BundleLoader.java:332) [30] org.eclipse.osgi.framework.internal.core.BundleLoader.findClass (BundleLoader.java:358) [31] org.eclipse.osgi.framework.adaptor.core.AbstractClassLoader.loadClass (AbstractClassLoader.java:94) [32] java.lang.ClassLoader.loadClass (ClassLoader.java:235) [33] org.eclipse.osgi.framework.internal.core.BundleLoader.loadClass (BundleLoader.java:272) [34] org.eclipse.osgi.framework.internal.core.BundleHost.loadClass (BundleHost.java:222) [35] org.eclipse.osgi.framework.internal.core.AbstractBundle.loadClass (AbstractBundle.java:1?213) [36] org.eclipse.core.internal.registry.ConfigurationElement.createExecutableExtension (ConfigurationElement.java:161) [37] org.eclipse.core.internal.registry.ConfigurationElement.createExecutableExtension (ConfigurationElement.java:151) [38] org.eclipse.core.internal.registry.ConfigurationElement.createExecutableExtension (ConfigurationElement.java:138) [39] org.eclipse.core.internal.registry.ConfigurationElementHandle.createExecutableExtension (ConfigurationElementHandle.java:48) [40] org.eclipse.core.internal.events.BuildManager.instantiateBuilder (BuildManager.java:718) [41] org.eclipse.core.internal.events.BuildManager.initializeBuilder (BuildManager.java:670) [42] org.eclipse.core.internal.events.BuildManager.getBuilder (BuildManager.java:429) [43] org.eclipse.core.internal.events.BuildManager.basicBuild (BuildManager.java:195) [44] org.eclipse.core.internal.events.BuildManager$1.run (BuildManager.java:226) [45] org.eclipse.core.internal.runtime.InternalPlatform.run (InternalPlatform.java:1?071) [46] org.eclipse.core.runtime.Platform.run (Platform.java:747) [47] org.eclipse.core.internal.events.BuildManager.basicBuild (BuildManager.java:229) [48] org.eclipse.core.internal.events.BuildManager.basicBuildLoop (BuildManager.java:248) [49] org.eclipse.core.internal.events.BuildManager.build (BuildManager.java:277) [50] org.eclipse.core.internal.events.AutoBuildJob.doBuild (AutoBuildJob.java:141) [51] org.eclipse.core.internal.events.AutoBuildJob.run (AutoBuildJob.java:202) [52] org.eclipse.core.internal.jobs.Worker.run (Worker.java:66)
Could this bug get changed to Platform: All, OS: All, Version: 3.1?
Guillaune, you problem isn't caused by JDT/UI. It is cause bay the PHPPlugin itself. What the do in the start method of their plug-in is a sync exec into the UI thread. This definitelly asks for trouble. Can you please report the bug in the corresponding Bug system of the PHP plugin. There is nothing Eclipse can do here.
John, I will set the PR to remind until you can reproduce the problem.
Guillaume, it might be good to open a bug report against the owner of the PHP plugin, because what they are doing is bad practice.
I just got it to happen again this morning (side note: I had killed Eclipse abnormally on Friday via Windows TaskManager which reset my workspace - I now got it to happen again - have no idea if that is significant or not; thought i should bring it up though). I will attach my thread dump. Sorry for the formatting, had to cut-n-paste from command window - how do you get thread dumps (via Ctrl-Break) to show up in .log? All I got was the exception stack trace in .log, but nothing from Ctrl-Break). In any event, I think it will be helpful.
Created attachment 17390 [details] thread dump during the "hang" This is the thread dump of the Eclipse JVM during the startup "hang". I will leave it up to this issue's owner to consider reopening this issue, assuming this thread dump provides enough information to continue investigation.
Created attachment 17424 [details] Formatted thread dump
Pascal, can you please have a look at the thread dump attached under comment #19. What I don't understand is the fact that main is waiting on a lock in EclipseClassLoader.findLocalClass (some lock for bundle state changes). However, the JavaPlugin must already be loaded and initialized since code prior to that call in main is code from JDT/UI (org.eclipse.jdt.internal.corext.util.AllTypesCache). The Worker-0 thread seems to wait on the JavaPlugin as well. We want to get rid of the all types cache for 3.1. However, I would like to understand what's going on here to avoid such situations in the future.
Pinging Pascal...
I looked at the trace several times but could not reach a conclusion. Sorry.
Sorry I did not mean to close it.
Pascal, any form of speculation. As said all that happens in core runtime and I don't see what JDT/UI can do here.
John, have you seen such hangs in the past ?
I can't remember when I started seeing this - I am almost positive I started seeing this in the 3.0.1 version. I've been using 3.1 M4 and now M5 for a while, and while I do see this problem, it doesn't seem to be as prevalent as before. Either the M's are getting more stable as you go along :-) or something else is happening in the way I am using the tool that circumvents the problem (what that is I dunno). For me personally, this problem isn't as serious as when I first reported it. Before, I was getting this everytime I started Eclipse, now I rarely see it. It may have to do with the number of projects in my workspace, but then again, I thought that before and I remember seeing the problem with only a single project. So, I'm baffled.
As of now 'LATER' and 'REMIND' resolutions are no longer supported. Please reopen this bug if it is still valid for you.