Community
Participate
Working Groups
It does not happen always, but quite frequently: While loading class "org.eclipse.tm.internal.tcf.cdt.ui.TCFBreakpointStatusListener", thread "Thread[TCF Event Dispatcher,5,main]" timed out waiting (5000ms) for thread "Thread[main,6,main]" to finish starting bundle "org.eclipse.tm.tcf.cdt.ui_0.3.0.qualifier [266]". To avoid deadlock, thread "Thread[TCF Event Dispatcher,5,main]" is proceeding but "org.eclipse.tm.internal.tcf.cdt.ui.TCFBreakpointStatusListener" may not be fully initialized. org.osgi.framework.BundleException: State change in progress for bundle "reference:file:/C:/ws/cdt-dev-7.0.x/org.eclipse.tm.tcf.cdt.ui/" by thread "main". at org.eclipse.osgi.framework.internal.core.AbstractBundle.beginStateChange(AbstractBundle.java:1077) at org.eclipse.osgi.framework.internal.core.AbstractBundle.start(AbstractBundle.java:282) at org.eclipse.osgi.framework.util.SecureAction.start(SecureAction.java:417) at org.eclipse.osgi.internal.loader.BundleLoader.setLazyTrigger(BundleLoader.java:265) at org.eclipse.core.runtime.internal.adaptor.EclipseLazyStarter.postFindLocalClass(EclipseLazyStarter.java:106) at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClass(ClasspathManager.java:453) at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.findLocalClass(DefaultClassLoader.java:216) at org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass(BundleLoader.java:393) at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:469) at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:422) at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:410) at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:107) at java.lang.ClassLoader.loadClass(ClassLoader.java:248) at org.eclipse.tm.internal.tcf.cdt.ui.Activator$1.run(Activator.java:37) at org.eclipse.tm.tcf.EventQueue.run(EventQueue.java:99) at java.lang.Thread.run(Thread.java:619) Caused by: org.eclipse.osgi.framework.internal.core.AbstractBundle$BundleStatusException ... 16 more Root exception: org.eclipse.osgi.framework.internal.core.AbstractBundle$BundleStatusException at org.eclipse.osgi.framework.internal.core.AbstractBundle.beginStateChange(AbstractBundle.java:1077) at org.eclipse.osgi.framework.internal.core.AbstractBundle.start(AbstractBundle.java:282) at org.eclipse.osgi.framework.util.SecureAction.start(SecureAction.java:417) at org.eclipse.osgi.internal.loader.BundleLoader.setLazyTrigger(BundleLoader.java:265) at org.eclipse.core.runtime.internal.adaptor.EclipseLazyStarter.postFindLocalClass(EclipseLazyStarter.java:106) at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClass(ClasspathManager.java:453) at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.findLocalClass(DefaultClassLoader.java:216) at org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass(BundleLoader.java:393) at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:469) at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:422) at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:410) at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:107) at java.lang.ClassLoader.loadClass(ClassLoader.java:248) at org.eclipse.tm.internal.tcf.cdt.ui.Activator$1.run(Activator.java:37) at org.eclipse.tm.tcf.EventQueue.run(EventQueue.java:99) at java.lang.Thread.run(Thread.java:619)
Created attachment 189073 [details] Proposed patch Putting the initialization of the TCFBreakpointStatusListener last in the start method of the activator fixes it. The reason behind the deadlock is explained in https://bugs.eclipse.org/bugs/show_bug.cgi?id=86713
As understand, Equinox can dead lock if a thread, other then main, tries to load a class form a plugin being started. Looks like a serious platform bug to me. I wonder why the bug is closed with "Marking this bug as invalid because sufficient details were not provided". Anyway, I have committed the patch. Thanks!
(In reply to comment #2) > As understand, Equinox can dead lock if a thread, other then main, tries to > load a class form a plugin being started. Looks like a serious platform bug to > me. I wonder why the bug is closed with "Marking this bug as invalid because > sufficient details were not provided". It's actually considered a Sun/Oracle JVM bug http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4670071 and the last comment is probably due to an automatic update. It was resolved as REMIND which is now an invalid state.