Community
Participate
Working Groups
Build ID: M20070921-1145 Steps To Reproduce: This is probably not cleanly reproducable but it happens quite often to me that during startup eclipse freezes (Not Responding). More information: I have a stack trace showing the deadlock between the main thread and a worker thread. It seems that org.eclipse.mylyn.internal.tasks.ui.util.TasksUiExtensionReader.initStartupExtensions() needs to access a class which is currently beeing loaded. here are the stacktraces: "main" cpu=21512.54 [reset 21512.54] ms allocated=243386056 B (232.11 MB) [reset 243386056 B (232.11 MB)] prio=6 tid=0x00bd6560 nid=0xf90 waiting for monitor entry [0x0006e000..0x0006fb44] java.lang.Thread.State: BLOCKED (on object monitor) at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClassImpl(Ljava/lang/String;[Lorg/eclipse/osgi/baseadaptor/hooks/ClassLoadingStatsHook;)Ljava/lang/Class;(ClasspathManager.java:424) - waiting to lock <0x180fc5b0> (a org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader) at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClass(Ljava/lang/String;)Ljava/lang/Class;(ClasspathManager.java:413) at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.findLocalClass(Ljava/lang/String;)Ljava/lang/Class;(DefaultClassLoader.java:189) at org.eclipse.osgi.framework.internal.core.BundleLoader.findLocalClass(Ljava/lang/String;)Ljava/lang/Class;(BundleLoader.java:340) at org.eclipse.osgi.framework.internal.core.SingleSourcePackage.loadClass(Ljava/lang/String;)Ljava/lang/Class;(SingleSourcePackage.java:37) at org.eclipse.osgi.framework.internal.core.BundleLoader.findClassInternal(Ljava/lang/String;ZLjava/lang/ClassLoader;)Ljava/lang/Class;(BundleLoader.java:405) at org.eclipse.osgi.framework.internal.core.BundleLoader.findClass(Ljava/lang/String;Z)Ljava/lang/Class;(BundleLoader.java:369) at org.eclipse.osgi.framework.internal.core.BundleLoader.findClass(Ljava/lang/String;)Ljava/lang/Class;(BundleLoader.java:357) at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(Ljava/lang/String;Z)Ljava/lang/Class;(DefaultClassLoader.java:83) at java.lang.ClassLoader.loadClass(Ljava/lang/String;)Ljava/lang/Class;(ClassLoader.java:285) at java.lang.ClassLoader.loadClassInternal(Ljava/lang/String;)Ljava/lang/Class;(ClassLoader.java:353) - locked <0x180f8768> (a org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader) at org.eclipse.mylyn.internal.java.ui.actions.ToggleActiveFoldingAction.<init>()V(ToggleActiveFoldingAction.java:43) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Ljava/lang/reflect/Constructor;[Ljava/lang/Object;)Ljava/lang/Object;(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance([Ljava/lang/Object;)Ljava/lang/Object;(NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance([Ljava/lang/Object;)Ljava/lang/Object;(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance([Ljava/lang/Object;)Ljava/lang/Object;(Constructor.java:494) at java.lang.Class.newInstance0()Ljava/lang/Object;(Class.java:350) at java.lang.Class.newInstance()Ljava/lang/Object;(Class.java:303) at org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.createExecutableExtension(Lorg/eclipse/core/runtime/spi/RegistryContributor;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/Object;(RegistryStrategyOSGI.java:170) at org.eclipse.core.internal.registry.ExtensionRegistry.createExecutableExtension(Lorg/eclipse/core/runtime/spi/RegistryContributor;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/Object;(ExtensionRegistry.java:788) at org.eclipse.core.internal.registry.ConfigurationElement.createExecutableExtension(Ljava/lang/String;)Ljava/lang/Object;(ConfigurationElement.java:243) at org.eclipse.core.internal.registry.ConfigurationElementHandle.createExecutableExtension(Ljava/lang/String;)Ljava/lang/Object;(ConfigurationElementHandle.java:51) at org.eclipse.ui.internal.WorkbenchPlugin.createExtension(Lorg/eclipse/core/runtime/IConfigurationElement;Ljava/lang/String;)Ljava/lang/Object;(WorkbenchPlugin.java:244) at org.eclipse.ui.internal.PluginAction.createDelegate()V(PluginAction.java:122) at org.eclipse.ui.internal.WWinPluginAction.refreshActionList()V(WWinPluginAction.java:165) at org.eclipse.ui.plugin.AbstractUIPlugin$1.run()V(AbstractUIPlugin.java:486) at org.eclipse.swt.widgets.RunnableLock.run()V(RunnableLock.java:35) at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Z)Z(Synchronizer.java:123) - locked <0x182101f0> (a org.eclipse.swt.widgets.RunnableLock) at org.eclipse.swt.widgets.Display.runAsyncMessages(Z)Z(Display.java:3659) at org.eclipse.swt.widgets.Display.readAndDispatch()Z(Display.java:3296) at org.eclipse.ui.internal.Workbench.runEventLoop(Lorg/eclipse/jface/window/Window$IExceptionHandler;Lorg/eclipse/swt/widgets/Display;)V(Workbench.java:2389) at org.eclipse.ui.internal.Workbench.runUI()I(Workbench.java:2353) at org.eclipse.ui.internal.Workbench.access$4(Lorg/eclipse/ui/internal/Workbench;)I(Workbench.java:2219) at org.eclipse.ui.internal.Workbench$4.run()V(Workbench.java:466) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Lorg/eclipse/core/databinding/observable/Realm;Ljava/lang/Runnable;)V(Realm.java:289) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Lorg/eclipse/swt/widgets/Display;Lorg/eclipse/ui/application/WorkbenchAdvisor;)I(Workbench.java:461) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(Lorg/eclipse/swt/widgets/Display;Lorg/eclipse/ui/application/WorkbenchAdvisor;)I(PlatformUI.java:149) at org.eclipse.ui.internal.ide.application.IDEApplication.start(Lorg/eclipse/equinox/app/IApplicationContext;)Ljava/lang/Object;(IDEApplication.java:106) at org.eclipse.equinox.internal.app.EclipseAppHandle.run(Ljava/lang/Object;)Ljava/lang/Object;(EclipseAppHandle.java:169) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(Ljava/lang/Object;)Ljava/lang/Object;(EclipseAppLauncher.java:106) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(Ljava/lang/Object;)Ljava/lang/Object;(EclipseAppLauncher.java:76) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(Ljava/lang/Object;)Ljava/lang/Object;(EclipseStarter.java:363) at org.eclipse.core.runtime.adaptor.EclipseStarter.run([Ljava/lang/String;Ljava/lang/Runnable;)Ljava/lang/Object;(EclipseStarter.java:176) at sun.reflect.NativeMethodAccessorImpl.invoke0(Ljava/lang/reflect/Method;Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;(Method.java:585) at org.eclipse.equinox.launcher.Main.invokeFramework([Ljava/lang/String;[Ljava/net/URL;)V(Main.java:508) at org.eclipse.equinox.launcher.Main.basicRun([Ljava/lang/String;)V(Main.java:447) at org.eclipse.equinox.launcher.Main.run([Ljava/lang/String;)I(Main.java:1173) at org.eclipse.equinox.launcher.Main.main([Ljava/lang/String;)V(Main.java:1148) "Worker-0" cpu=1014.01 [reset 1014.01] ms allocated=10135384 B (9.67 MB) [reset 10135384 B (9.67 MB)] prio=6 tid=0x34f79290 nid=0x115c waiting for monitor entry [0x3580d000..0x3580fadc] java.lang.Thread.State: BLOCKED (on object monitor) at java.lang.Class.getDeclaredConstructors0(Z)[Ljava/lang/reflect/Constructor;(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Z)[Ljava/lang/reflect/Constructor;(Class.java:2357) at java.lang.Class.getConstructor0([Ljava/lang/Class;I)Ljava/lang/reflect/Constructor;(Class.java:2671) at java.lang.Class.newInstance0()Ljava/lang/Object;(Class.java:321) at java.lang.Class.newInstance()Ljava/lang/Object;(Class.java:303) at org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.createExecutableExtension(Lorg/eclipse/core/runtime/spi/RegistryContributor;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/Object;(RegistryStrategyOSGI.java:170) at org.eclipse.core.internal.registry.ExtensionRegistry.createExecutableExtension(Lorg/eclipse/core/runtime/spi/RegistryContributor;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/Object;(ExtensionRegistry.java:788) at org.eclipse.core.internal.registry.ConfigurationElement.createExecutableExtension(Ljava/lang/String;)Ljava/lang/Object;(ConfigurationElement.java:243) at org.eclipse.core.internal.registry.ConfigurationElementHandle.createExecutableExtension(Ljava/lang/String;)Ljava/lang/Object;(ConfigurationElementHandle.java:51) at org.eclipse.mylyn.internal.tasks.ui.util.TasksUiExtensionReader.readHyperlinkDetector(Lorg/eclipse/core/runtime/IConfigurationElement;)V(TasksUiExtensionReader.java:296) at org.eclipse.mylyn.internal.tasks.ui.util.TasksUiExtensionReader.initStartupExtensions(Lorg/eclipse/mylyn/internal/tasks/ui/util/TaskListWriter;)V(TasksUiExtensionReader.java:183) at org.eclipse.mylyn.tasks.ui.TasksUiPlugin.start(Lorg/osgi/framework/BundleContext;)V(TasksUiPlugin.java:433) at org.eclipse.osgi.framework.internal.core.BundleContextImpl$2.run()Ljava/lang/Object;(BundleContextImpl.java:999) at java.security.AccessController.doPrivileged(Ljava/security/PrivilegedExceptionAction;)Ljava/lang/Object;(Native Method) at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(Lorg/osgi/framework/BundleActivator;)V(BundleContextImpl.java:993) at org.eclipse.osgi.framework.internal.core.BundleContextImpl.start()V(BundleContextImpl.java:974) at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(I)V(BundleHost.java:346) at org.eclipse.osgi.framework.internal.core.AbstractBundle.start(I)V(AbstractBundle.java:260) at org.eclipse.osgi.framework.util.SecureAction.start(Lorg/osgi/framework/Bundle;I)V(SecureAction.java:400) at org.eclipse.core.runtime.internal.adaptor.EclipseLazyStarter.postFindLocalClass(Ljava/lang/String;Ljava/lang/Class;Lorg/eclipse/osgi/baseadaptor/loader/ClasspathManager;)V(EclipseLazyStarter.java:111) at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClass(Ljava/lang/String;)Ljava/lang/Class;(ClasspathManager.java:417) at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.findLocalClass(Ljava/lang/String;)Ljava/lang/Class;(DefaultClassLoader.java:189) at org.eclipse.osgi.framework.internal.core.BundleLoader.findLocalClass(Ljava/lang/String;)Ljava/lang/Class;(BundleLoader.java:340) at org.eclipse.osgi.framework.internal.core.SingleSourcePackage.loadClass(Ljava/lang/String;)Ljava/lang/Class;(SingleSourcePackage.java:37) at org.eclipse.osgi.framework.internal.core.BundleLoader.findClassInternal(Ljava/lang/String;ZLjava/lang/ClassLoader;)Ljava/lang/Class;(BundleLoader.java:405) at org.eclipse.osgi.framework.internal.core.BundleLoader.findClass(Ljava/lang/String;Z)Ljava/lang/Class;(BundleLoader.java:369) at org.eclipse.osgi.framework.internal.core.BundleLoader.findClass(Ljava/lang/String;)Ljava/lang/Class;(BundleLoader.java:357) at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(Ljava/lang/String;Z)Ljava/lang/Class;(DefaultClassLoader.java:83) at java.lang.ClassLoader.loadClass(Ljava/lang/String;)Ljava/lang/Class;(ClassLoader.java:285) at java.lang.ClassLoader.loadClassInternal(Ljava/lang/String;)Ljava/lang/Class;(ClassLoader.java:353) - locked <0x180fc5b0> (a org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader) at java.lang.Class.getDeclaredConstructors0(Z)[Ljava/lang/reflect/Constructor;(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Z)[Ljava/lang/reflect/Constructor;(Class.java:2357) at java.lang.Class.getConstructor0([Ljava/lang/Class;I)Ljava/lang/reflect/Constructor;(Class.java:2671) at java.lang.Class.newInstance0()Ljava/lang/Object;(Class.java:321) at java.lang.Class.newInstance()Ljava/lang/Object;(Class.java:303) at org.eclipse.osgi.framework.internal.core.AbstractBundle.loadBundleActivator()Lorg/osgi/framework/BundleActivator;(AbstractBundle.java:136) at org.eclipse.osgi.framework.internal.core.BundleContextImpl.start()V(BundleContextImpl.java:970) at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(I)V(BundleHost.java:346) at org.eclipse.osgi.framework.internal.core.AbstractBundle.start(I)V(AbstractBundle.java:260) at org.eclipse.osgi.framework.util.SecureAction.start(Lorg/osgi/framework/Bundle;I)V(SecureAction.java:400) at org.eclipse.core.runtime.internal.adaptor.EclipseLazyStarter.postFindLocalClass(Ljava/lang/String;Ljava/lang/Class;Lorg/eclipse/osgi/baseadaptor/loader/ClasspathManager;)V(EclipseLazyStarter.java:111) at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClass(Ljava/lang/String;)Ljava/lang/Class;(ClasspathManager.java:417) at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.findLocalClass(Ljava/lang/String;)Ljava/lang/Class;(DefaultClassLoader.java:189) at org.eclipse.osgi.framework.internal.core.BundleLoader.findLocalClass(Ljava/lang/String;)Ljava/lang/Class;(BundleLoader.java:340) at org.eclipse.osgi.framework.internal.core.BundleLoader.findClassInternal(Ljava/lang/String;ZLjava/lang/ClassLoader;)Ljava/lang/Class;(BundleLoader.java:408) at org.eclipse.osgi.framework.internal.core.BundleLoader.findClass(Ljava/lang/String;Z)Ljava/lang/Class;(BundleLoader.java:369) at org.eclipse.osgi.framework.internal.core.BundleLoader.findClass(Ljava/lang/String;)Ljava/lang/Class;(BundleLoader.java:357) at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(Ljava/lang/String;Z)Ljava/lang/Class;(DefaultClassLoader.java:83) at java.lang.ClassLoader.loadClass(Ljava/lang/String;)Ljava/lang/Class;(ClassLoader.java:285) at org.eclipse.osgi.framework.internal.core.BundleLoader.loadClass(Ljava/lang/String;)Ljava/lang/Class;(BundleLoader.java:289) at org.eclipse.osgi.framework.internal.core.BundleHost.loadClass(Ljava/lang/String;Z)Ljava/lang/Class;(BundleHost.java:227) at org.eclipse.osgi.framework.internal.core.AbstractBundle.loadClass(Ljava/lang/String;)Ljava/lang/Class;(AbstractBundle.java:1269) at org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.createExecutableExtension(Lorg/eclipse/core/runtime/spi/RegistryContributor;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/Object;(RegistryStrategyOSGI.java:160) at org.eclipse.core.internal.registry.ExtensionRegistry.createExecutableExtension(Lorg/eclipse/core/runtime/spi/RegistryContributor;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/Object;(ExtensionRegistry.java:788) at org.eclipse.core.internal.registry.ConfigurationElement.createExecutableExtension(Ljava/lang/String;)Ljava/lang/Object;(ConfigurationElement.java:243) at org.eclipse.core.internal.registry.ConfigurationElementHandle.createExecutableExtension(Ljava/lang/String;)Ljava/lang/Object;(ConfigurationElementHandle.java:51) at org.eclipse.ui.internal.WorkbenchPlugin$1.run()V(WorkbenchPlugin.java:252) at org.eclipse.swt.custom.BusyIndicator.showWhile(Lorg/eclipse/swt/widgets/Display;Ljava/lang/Runnable;)V(BusyIndicator.java:49) at org.eclipse.ui.internal.WorkbenchPlugin.createExtension(Lorg/eclipse/core/runtime/IConfigurationElement;Ljava/lang/String;)Ljava/lang/Object;(WorkbenchPlugin.java:248) at org.eclipse.ui.internal.decorators.LightweightDecoratorDefinition$1.run()V(LightweightDecoratorDefinition.java:117) at org.eclipse.core.runtime.SafeRunner.run(Lorg/eclipse/core/runtime/ISafeRunnable;)V(SafeRunner.java:37) at org.eclipse.core.runtime.Platform.run(Lorg/eclipse/core/runtime/ISafeRunnable;)V(Platform.java:857) at org.eclipse.ui.internal.decorators.LightweightDecoratorDefinition.internalGetDecorator()Lorg/eclipse/jface/viewers/ILightweightLabelDecorator;(LightweightDecoratorDefinition.java:113) at org.eclipse.ui.internal.decorators.LightweightDecoratorDefinition.decorate(Ljava/lang/Object;Lorg/eclipse/jface/viewers/IDecoration;)V(LightweightDecoratorDefinition.java:241) at org.eclipse.ui.internal.decorators.LightweightDecoratorManager$LightweightRunnable.run()V(LightweightDecoratorManager.java:71) at org.eclipse.core.runtime.SafeRunner.run(Lorg/eclipse/core/runtime/ISafeRunnable;)V(SafeRunner.java:37) at org.eclipse.core.runtime.Platform.run(Lorg/eclipse/core/runtime/ISafeRunnable;)V(Platform.java:857) at org.eclipse.ui.internal.decorators.LightweightDecoratorManager.decorate(Ljava/lang/Object;Lorg/eclipse/ui/internal/decorators/DecorationBuilder;Lorg/eclipse/ui/internal/decorators/LightweightDecoratorDefinition;)V(LightweightDecoratorManager.java:336) at org.eclipse.ui.internal.decorators.LightweightDecoratorManager.getDecorations(Ljava/lang/Object;Lorg/eclipse/ui/internal/decorators/DecorationBuilder;)V(LightweightDecoratorManager.java:322) at org.eclipse.ui.internal.decorators.DecorationScheduler$1.ensureResultCached(Ljava/lang/Object;ZLorg/eclipse/jface/viewers/IDecorationContext;)V(DecorationScheduler.java:369) at org.eclipse.ui.internal.decorators.DecorationScheduler$1.run(Lorg/eclipse/core/runtime/IProgressMonitor;)Lorg/eclipse/core/runtime/IStatus;(DecorationScheduler.java:329) at org.eclipse.core.internal.jobs.Worker.run()V(Worker.java:55)
Oh, I forgot to mention: there is a workaround: I delete in the .plugins folder in my workspace all folders named org.eclipse.mylyn.*. Afterwards I can start eclipse without problems. (I have to restore my task data from backup, though). Regards, Holger.
Holder: we have not seen this before and it would be very useful if you could try to reproduce it again, but with the latest Weekly build from http://www.eclipse.org/mylyn/downloads/ Also, it would be helpful if before updating you could let us know exactly which version of Mylyn you saw this with (Help -> About Eclipse SDK -> Feature Details. Steffen: for 2.3 let's investigate whether this could be possible.
Btw, which JDK are you using?
Hello Mik, thank you for the fast response. The exact version is 2.2.0.I20071220-1700. I have it from the update site: http://download.eclipse.org/tools/mylyn/update/e3.3 I just did an update to http://download.eclipse.org/tools/mylyn/update/weekly/e3.3 BTW, last time I started eclipse the deadlock did not occur (before the update). I have to restart the IDE now, to let the update take effect. Best regards, Holger.
Hello Mik, exact version is now 2.3.0.I20080203-2200, and the deadlock did not occur when I restarted. Anything I should try out? Best regards, Holger.
That's good to know. The stack traces look somewhat unusual. Holger, which Java version are you using? Do you have the UI Usage Monitor from the Mylyn extras update site installed?
Hi Steffen, ok, you got me there, the version is java version "1.5.0_13", but not the original SUN vm, it is modified to allow the deadlock detection and to trigger the dump of a stack trace from another process. I switched to that vm after having several hanging IDEs, then detected the deadlocking threads. Best Regards, Holger.
Holger: thanks for this information. Steffen and I investigated and the underlying problem appears to be that we're getting to a state when a lock is held, which is fine, but that your deadlock detection is not liking. See bug 86713 for details on that. We have put in some additional laziness for next Wednesday's Weekly build that will make this scenario even less likely. However, we don't currently have evidence that it would cause a real deadlock and so did not make any fundamental changes to startup. If you ever see a real deadlock without this tool please do let us know and we'll investigate further.
Created attachment 89584 [details] mylyn/context/zip
Created attachment 91008 [details] stacktrace A new stacktrace, on Suns VM 1.6.0_01-b06 mixed mode.
Hi Mik, this deadlock occurred on an installation from a colleague of mine, he has mylyn version "2.1.0.v20070927-0900" (I took the version string from the "platform.xml of his installation). I hope its ok, to reopen this bug with the new stack trace. Best regards, Holger.
Holger, we recently fixed a potential deadlock during startup initialization. It would be great if you could update to the latest 2.3.0 release from the weekly update site and verify if that works for you (the current weekly release is the final 2.3.0 release which will be available from the main update site on Friday): http://www.eclipse.org/mylyn/downloads/ Please reopen this bug if you still see errors with that release. *** This bug has been marked as a duplicate of bug 217857 ***