Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 337226

Summary: Thread time-out value (5 seconds) should be configurable
Product: [Eclipse Project] Equinox Reporter: Thomas Watson <tjwatson>
Component: FrameworkAssignee: Thomas Watson <tjwatson>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: jamesblackburn+eclipse, john.arthorne, mstancamp, pwebster, tjwatson
Version: 3.4.2   
Target Milestone: 3.4.2+   
Hardware: All   
OS: All   
Whiteboard:
Bug Depends on: 330716    
Bug Blocks:    
Attachments:
Description Flags
patch none

Description Thomas Watson CLA 2011-02-15 11:01:06 EST
Cloning bug to release to 3.4.2+

+++ This bug was initially created as a clone of Bug #330716 +++

Build Identifier: Eclipse 3.4.2

Our product contains a large number of bundles (in the hundreds). Periodically
timeout messages appear during the start of the product. The following is an
example:

2010/02/26 19:37:48.890 WARNING While loading class
"com.mypackage.Activator", thread "Thread[MyMergeThread:com.otherpackage.kernel:START,5,main]" timed
out waiting (5000ms) for thread "Thread[Thread-1,5,main]" to finish starting
bundle "update@../../myproduct/eclipse/plugins/com.mypackage.console.jsf_1.2.0/
[318]". To avoid deadlock, thread
"Thread[MyMergeThread:com.otherpackage.kernel:START,5,main]" is
proceeding but "com.mypackage.Activator" may not
be fully initialized. ::class.method=unknown
::thread=MyMergeThread:com.otherpackage.kernel:START
::loggername=org.eclipse.osgi
   org.osgi.framework.BundleException: State change in progress for bundle
"update@../../myproduct/eclipse/plugins/com.mypackage.console.jsf_1.2.0/"
by thread "Thread-1".
                 at
org.eclipse.osgi.framework.internal.core.AbstractBundle.beginStateChange(AbstractBundle.java:1144)
                 at
org.eclipse.osgi.framework.internal.core.AbstractBundle.start(AbstractBundle.java:263)
                 at
org.eclipse.osgi.framework.util.SecureAction.start(SecureAction.java:400)
                 at
org.eclipse.core.runtime.internal.adaptor.EclipseLazyStarter.postFindLocalClass(EclipseLazyStarter.java:111)
                 at
org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClass(ClasspathManager.java:427)
                 at
org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.findLocalClass(DefaultClassLoader.java:193)
                 at
org.eclipse.osgi.framework.internal.core.BundleLoader.findLocalClass(BundleLoader.java:370)
                 at
org.eclipse.osgi.framework.internal.core.BundleLoader.findClassInternal(BundleLoader.java:446)
                 at
org.eclipse.osgi.framework.internal.core.BundleLoader.findClass(BundleLoader.java:399)
                 at
org.eclipse.osgi.framework.internal.core.BundleLoader.findClass(BundleLoader.java:387)
                 at
org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:87)
                 at java.lang.ClassLoader.loadClass(ClassLoader.java:609)


We understand and don't disagree with the reasons for issuing this sort of
message. The issue is that the timeout value (5000ms) is hard-coded and is not
configurable. In many cases if the timeout value was longer the processing
would complete successfully. Allowing the timeout value to be configurable
would also help us determine when actual deadlock conditions occur.


Reproducible: Sometimes

Steps to Reproduce:
Not easily reproducible. See details above.
Comment 1 Thomas Watson CLA 2011-02-15 11:02:14 EST
Created attachment 189011 [details]
patch

backport to 3.4.2+
Comment 2 Thomas Watson CLA 2011-02-15 11:12:09 EST
I released the patch to 3.4.2+