Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Virgo » Occasional start-up failure due to synchronisation in Virgo kernel
Occasional start-up failure due to synchronisation in Virgo kernel [message #894823] Tue, 10 July 2012 16:24 Go to next message
Daniel McGreal is currently offline Daniel McGrealFriend
Messages: 27
Registered: April 2012
Junior Member
Hi,
While using Virgo 2.1.1, my application occasionally (50/50) fails to start. I'm not sure of my interpretation of the issue, but it appears to me to be due to two "region-dm" threads, the 'first' of which is waiting on a ConcurrentHashMap owned by the 'second' which is monitoring because of the first. The map is classNameLocks in ClasspathManager, synchronised at line 510. The monitor is KernelBundleClassLoader.checkCerts, line 933. Relevant stack traces follow, please let me know what additional information I can provide:

Thread [region-dm-10] (Suspended)	
	owns: Object  (id=163)	
	owns: KernelBundleClassLoader  (id=154)	
		waited by: Thread [region-dm-12] (Suspended)	
		waited by: Thread [start-signalling-2] (Suspended)	
	waiting for: HashMap<K,V>  (id=162)	
	Object.wait(long) line: not available [native method]	
	HashMap<K,V>(Object).wait() line: 503	
	ClasspathManager.lockClassName(String) line: 510	
	ClasspathManager.findLocalClass_LockClassName(String, ClassLoadingStatsHook[]) line: 458	
	ClasspathManager.findLocalClass(String) line: 447	
	KernelBundleClassLoader(DefaultClassLoader).findLocalClass(String) line: 216	
	BundleLoader.findLocalClass(String) line: 393	
	BundleLoader.findClassInternal(String, boolean, ClassLoader) line: 469	
	BundleLoader.findClass(String, boolean) line: 422	
	BundleLoader.findClass(String) line: 410	
	KernelBundleClassLoader(DefaultClassLoader).loadClass(String, boolean) line: 107	
	KernelBundleClassLoader.loadClass(String, boolean) line: 135	
	KernelBundleClassLoader(ClassLoader).loadClass(String) line: 356	
	ClassLoader.defineClass1(String, byte[], int, int, ProtectionDomain, String) line: not available [native method]	
	KernelBundleClassLoader(ClassLoader).defineClass(String, byte[], int, int, ProtectionDomain) line: 791	
	KernelBundleClassLoader(DefaultClassLoader).defineClass(String, byte[], ClasspathEntry, BundleEntry) line: 188	
	KernelBundleClassLoader.defineClass(String, byte[], ClasspathEntry, BundleEntry) line: 239	
	ClasspathManager.defineClass(String, byte[], ClasspathEntry, BundleEntry, ClassLoadingStatsHook[]) line: 580	
	ClasspathManager.findClassImpl(String, ClasspathEntry, ClassLoadingStatsHook[]) line: 550	
	ClasspathManager.findLocalClassImpl(String, ClassLoadingStatsHook[]) line: 481	
	ClasspathManager.findLocalClass_LockClassName(String, ClassLoadingStatsHook[]) line: 460	
	ClasspathManager.findLocalClass(String) line: 447	
	KernelBundleClassLoader(DefaultClassLoader).findLocalClass(String) line: 216	
	BundleLoader.findLocalClass(String) line: 393	
	BundleLoader.findClassInternal(String, boolean, ClassLoader) line: 469	
	BundleLoader.findClass(String, boolean) line: 422	
	BundleLoader.findClass(String) line: 410	
	KernelBundleClassLoader(DefaultClassLoader).loadClass(String, boolean) line: 107	
	KernelBundleClassLoader.loadClass(String, boolean) line: 135	
	KernelBundleClassLoader(ClassLoader).loadClass(String) line: 356	
	BundleLoader.loadClass(String) line: 338	
	BundleHost.loadClass(String, boolean) line: 232	
	BundleHost(AbstractBundle).loadClass(String) line: 1197	
	BundleDelegatingClassLoader.findClass(String) line: 99	
	BundleDelegatingClassLoader.loadClass(String, boolean) line: 156	
	BundleDelegatingClassLoader(ClassLoader).loadClass(String) line: 356	
	ClassUtils.forName(String, ClassLoader) line: 257	
	RootBeanDefinition(AbstractBeanDefinition).resolveBeanClass(ClassLoader) line: 408	
	DefaultListableBeanFactory(AbstractBeanFactory).doResolveBeanClass(RootBeanDefinition, Class...) line: 1271	
	DefaultListableBeanFactory(AbstractBeanFactory).resolveBeanClass(RootBeanDefinition, String, Class...) line: 1242	
	DefaultListableBeanFactory(AbstractAutowireCapableBeanFactory).predictBeanType(String, RootBeanDefinition, Class[]) line: 576	
	DefaultListableBeanFactory(AbstractBeanFactory).isFactoryBean(String, RootBeanDefinition) line: 1319	
	DefaultListableBeanFactory.getBeanNamesForType(Class, boolean, boolean) line: 315	
	OsgiBundleXmlApplicationContext(AbstractDelegatedExecutionApplicationContext).invokeBeanFactoryPostProcessors(ConfigurableListableBeanFactory, Class, Class) line: 424	
	OsgiBundleXmlApplicationContext(AbstractDelegatedExecutionApplicationContext).invokeBeanFactoryPostProcessors(ConfigurableListableBeanFactory) line: 395	
	AbstractDelegatedExecutionApplicationContext$3.run() line: 281	
	PrivilegedUtils.executeWithCustomTCCL(ClassLoader, PrivilegedUtils$UnprivilegedExecution) line: 85	
	OsgiBundleXmlApplicationContext(AbstractDelegatedExecutionApplicationContext).startRefresh() line: 247	
	DependencyWaiterApplicationContextExecutor.stageOne() line: 214	
	DependencyWaiterApplicationContextExecutor.refresh() line: 169	
	OsgiBundleXmlApplicationContext(AbstractDelegatedExecutionApplicationContext).refresh() line: 175	
	ContextLoaderListener$2.run() line: 716	
	ContextPropagatingTaskExecutor$2.run() line: 95	
	ThreadPoolExecutor.runWorker(ThreadPoolExecutor$Worker) line: 1110	
	ThreadPoolExecutor$Worker.run() line: 603	
	Thread.run() line: 722	



Thread [region-dm-12] (Suspended)	
	owns: ConcurrentHashMap<K,V>  (id=155)	
	waiting for: KernelBundleClassLoader  (id=154)	
	KernelBundleClassLoader(ClassLoader).checkCerts(String, CodeSource) line: 933	
	KernelBundleClassLoader(ClassLoader).preDefineClass(String, ProtectionDomain) line: 657	
	KernelBundleClassLoader(ClassLoader).defineClass(String, byte[], int, int, ProtectionDomain) line: 785	
	KernelBundleClassLoader(DefaultClassLoader).defineClass(String, byte[], ClasspathEntry, BundleEntry) line: 188	
	KernelBundleClassLoader.defineClass(String, byte[], ClasspathEntry, BundleEntry) line: 239	
	ClasspathManager.defineClass(String, byte[], ClasspathEntry, BundleEntry, ClassLoadingStatsHook[]) line: 580	
	ClasspathManager.findClassImpl(String, ClasspathEntry, ClassLoadingStatsHook[]) line: 550	
	ClasspathManager.findLocalClassImpl(String, ClassLoadingStatsHook[]) line: 481	
	ClasspathManager.findLocalClass_LockClassName(String, ClassLoadingStatsHook[]) line: 460	
	ClasspathManager.findLocalClass(String) line: 447	
	KernelBundleClassLoader(DefaultClassLoader).findLocalClass(String) line: 216	
	BundleLoader.findLocalClass(String) line: 393	
	SingleSourcePackage.loadClass(String) line: 33	
	BundleLoader.findClassInternal(String, boolean, ClassLoader) line: 457	
	BundleLoader.findClass(String, boolean) line: 422	
	BundleLoader.findClass(String) line: 410	
	KernelBundleClassLoader(DefaultClassLoader).loadClass(String, boolean) line: 107	
	KernelBundleClassLoader.loadClass(String, boolean) line: 135	
	KernelBundleClassLoader(ClassLoader).loadClass(String) line: 356	
	BundleLoader.loadClass(String) line: 338	
	BundleHost.loadClass(String, boolean) line: 232	
	BundleHost(AbstractBundle).loadClass(String) line: 1197	
	BundleDelegatingClassLoader.findClass(String) line: 99	
	BundleDelegatingClassLoader.loadClass(String, boolean) line: 156	
	BundleDelegatingClassLoader(ClassLoader).loadClass(String) line: 356	
	ClassUtils.forName(String, ClassLoader) line: 257	
	ClassUtils.resolveClassName(String, ClassLoader) line: 290	
	ClassArrayEditor.setAsText(String) line: 68	
	TypeConverterDelegate.doConvertTextValue(Object, String, PropertyEditor) line: 416	
	TypeConverterDelegate.doConvertValue(Object, Object, Class<?>, PropertyEditor) line: 388	
	TypeConverterDelegate.convertIfNecessary(String, Object, Object, Class<T>, TypeDescriptor) line: 157	
	BeanWrapperImpl.convertIfNecessary(String, Object, Object, Class<?>, TypeDescriptor) line: 447	
	BeanWrapperImpl.convertForProperty(String, Object, Object, PropertyDescriptor) line: 499	
	BeanWrapperImpl.convertForProperty(Object, String) line: 493	
	DefaultListableBeanFactory(AbstractAutowireCapableBeanFactory).convertForProperty(Object, String, BeanWrapper, TypeConverter) line: 1371	
	DefaultListableBeanFactory(AbstractAutowireCapableBeanFactory).applyPropertyValues(String, BeanDefinition, BeanWrapper, PropertyValues) line: 1330	
	DefaultListableBeanFactory(AbstractAutowireCapableBeanFactory).populateBean(String, AbstractBeanDefinition, BeanWrapper) line: 1086	
	DefaultListableBeanFactory(AbstractAutowireCapableBeanFactory).doCreateBean(String, RootBeanDefinition, Object[]) line: 517	
	DefaultListableBeanFactory(AbstractAutowireCapableBeanFactory).createBean(String, RootBeanDefinition, Object[]) line: 456	
	AbstractBeanFactory$1.getObject() line: 291	
	DefaultListableBeanFactory(DefaultSingletonBeanRegistry).getSingleton(String, ObjectFactory) line: 222	
	DefaultListableBeanFactory(AbstractBeanFactory).doGetBean(String, Class<T>, Object[], boolean) line: 288	
	DefaultListableBeanFactory(AbstractBeanFactory).getBean(String) line: 190	
	MandatoryImporterDependencyFactory.getServiceDependencies(BundleContext, ConfigurableListableBeanFactory) line: 63	
	DependencyServiceManager.doFindDependencies() line: 272	
	DependencyServiceManager.access$700(DependencyServiceManager) line: 40	
	DependencyServiceManager$1.run() line: 213	
	PrivilegedUtils.executeWithCustomTCCL(ClassLoader, PrivilegedUtils$UnprivilegedThrowableExecution) line: 124	
	DependencyServiceManager.findServiceDependencies() line: 209	
	DependencyWaiterApplicationContextExecutor.stageOne() line: 239	
	DependencyWaiterApplicationContextExecutor.refresh() line: 169	
	OsgiBundleXmlApplicationContext(AbstractDelegatedExecutionApplicationContext).refresh() line: 175	
	ContextLoaderListener$2.run() line: 716	
	ContextPropagatingTaskExecutor$2.run() line: 95	
	ThreadPoolExecutor.runWorker(ThreadPoolExecutor$Worker) line: 1110	
	ThreadPoolExecutor$Worker.run() line: 603	
	Thread.run() line: 722	

Re: Occasional start-up failure due to synchronisation in Virgo kernel [message #896123 is a reply to message #894823] Tue, 17 July 2012 10:49 Go to previous messageGo to next message
Glyn Normington is currently offline Glyn NormingtonFriend
Messages: 1222
Registered: July 2009
Senior Member
That deadlock appears to be outside the control of Virgo. It sounds similar to Equinox bug 212262. See comment 16 for a possible workaround.

You should probably plan to upgrade to Virgo 3.5.0 to pick up all the latest Equinox fixes.

[Updated on: Tue, 17 July 2012 10:50]

Report message to a moderator

Re: Occasional start-up failure due to synchronisation in Virgo kernel [message #896464 is a reply to message #896123] Wed, 18 July 2012 13:05 Go to previous messageGo to next message
Daniel McGreal is currently offline Daniel McGrealFriend
Messages: 27
Registered: April 2012
Junior Member
Thanks Glyn!
I will report back if I'm able to implement a workaround.

Dan.
Re: Occasional start-up failure due to synchronisation in Virgo kernel [message #896866 is a reply to message #896464] Fri, 20 July 2012 07:57 Go to previous messageGo to next message
Glyn Normington is currently offline Glyn NormingtonFriend
Messages: 1222
Registered: July 2009
Senior Member
Ok, please let us know either way.
Re: Occasional start-up failure due to synchronisation in Virgo kernel [message #901836 is a reply to message #896866] Tue, 14 August 2012 17:51 Go to previous messageGo to next message
Daniel McGreal is currently offline Daniel McGrealFriend
Messages: 27
Registered: April 2012
Junior Member
Hi again,
I made the upgrade to 3.5 but the symptoms remain, but I haven't had the time to figure out if the cause is still the same. I'll report back again when I have such.
Dan.
Re: Occasional start-up failure due to synchronisation in Virgo kernel [message #902340 is a reply to message #901836] Fri, 17 August 2012 07:56 Go to previous message
Glyn Normington is currently offline Glyn NormingtonFriend
Messages: 1222
Registered: July 2009
Senior Member
Thanks Dan.
Previous Topic:cxf_dosgi running under virgo
Next Topic:Roadmap for Virgo 3.6 ?
Goto Forum:
  


Current Time: Fri Nov 28 15:04:36 GMT 2014

Powered by FUDForum. Page generated in 0.02377 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software