Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 281968 - Pretty Awesome Deadlock
Summary: Pretty Awesome Deadlock
Status: RESOLVED DUPLICATE of bug 291143
Alias: None
Product: WTP Java EE Tools
Classification: WebTools
Component: jst.j2ee (show other bugs)
Version: 3.1   Edit
Hardware: PC Linux
: P3 critical (vote)
Target Milestone: 3.1.2   Edit
Assignee: Jason Sholl CLA
QA Contact: Chuck Bridgham CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-06-30 04:52 EDT by Rob Stryker CLA
Modified: 2009-11-19 14:42 EST (History)
4 users (show)

See Also:


Attachments
First stacktrace (15.83 KB, text/plain)
2009-06-30 04:59 EDT, Rob Stryker CLA
no flags Details
Stacktrace 2 (16.95 KB, text/plain)
2009-06-30 05:00 EDT, Rob Stryker CLA
no flags Details
another trace (11.71 KB, text/plain)
2009-09-16 14:29 EDT, Rob Stryker CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Rob Stryker CLA 2009-06-30 04:52:15 EDT
Doesn't happen all the time. Seems to involve a lot of different wtp parts

Thread [Worker-0] (Suspended)	
	Object.wait(long) line: not available [native method]	
	Semaphore.acquire(long) line: 38	
	OrderedLock.doAcquire(Semaphore, long) line: 168	
	OrderedLock.acquire(long) line: 105	
	OrderedLock.acquire() line: 82	
	EMFWorkbenchEditContextFactory.createEMFContext(IProject, IEMFContextContributor) line: 79	
	WorkbenchResourceHelperBase.createEMFContext(IProject, IEMFContextContributor) line: 249	
	ModuleCoreNature(EMFNature).createEmfContext() line: 105	
	ModuleCoreNature(EMFNature).getEmfContextBase() line: 229	
	ModuleCoreNature(EditModelNature).getEmfContext() line: 61	
	ModuleCoreNature.getModuleStructuralModelForRead(Object) line: 269	
	StructureEdit.<init>(ModuleCoreNature, boolean) line: 322	
	StructureEdit.getStructureEditForRead(IProject) line: 121	
	J2EEModuleVirtualComponent(VirtualComponent).getReferences() line: 279	
	J2EEModuleVirtualComponent.getNonManifestReferences(boolean) line: 126	
	J2EEModuleVirtualComponent.getReferences(boolean, boolean) line: 100	
	J2EEComponentClasspathContainer.update() line: 158	
	J2EEComponentClasspathContainer.install(IPath, IJavaProject) line: 297	
	J2EEComponentClasspathInitializer.initialize(IPath, IJavaProject) line: 29	
	JavaModelManager.initializeContainer(IJavaProject, IPath) line: 2608	
	JavaModelManager$11.run(IProgressMonitor) line: 2514	
	Workspace.run(IWorkspaceRunnable, ISchedulingRule, int, IProgressMonitor) line: 1800	
	JavaModelManager.initializeAllContainers(IJavaProject, IPath) line: 2554	
	JavaModelManager.getClasspathContainer(IPath, IJavaProject) line: 1773	
	JavaCore.initializeAfterLoad(IProgressMonitor) line: 3410	
	InitializeAfterLoadJob$RealJob.run(IProgressMonitor) line: 35	
	Worker.run() line: 55	


Thread [Worker-3] (Suspended)	
	ModuleCoreNature.primaryContributeToContext(EMFWorkbenchContextBase) line: 545	
	EMFWorkbenchEditContextFactory(EMFWorkbenchContextFactory).initializeEMFContextFromContributors(IProject, EMFWorkbenchContextBase, IEMFContextContributor) line: 127	
	EMFWorkbenchEditContextFactory(EMFWorkbenchContextFactory).createEMFContext(IProject, IEMFContextContributor) line: 110	
	EMFWorkbenchEditContextFactory.createEMFContext(IProject, IEMFContextContributor) line: 81	
	WorkbenchResourceHelperBase.createEMFContext(IProject, IEMFContextContributor) line: 249	
	ModuleCoreNature(EMFNature).createEmfContext() line: 105	
	ModuleCoreNature(EMFNature).getEmfContextBase() line: 229	
	ModuleCoreNature(EditModelNature).getEmfContext() line: 61	
	ModuleCoreNature.getModuleStructuralModelForRead(Object) line: 269	
	StructureEdit.<init>(ModuleCoreNature, boolean) line: 322	
	StructureEdit.getStructureEditForRead(IProject) line: 121	
	J2EEModuleVirtualComponent(VirtualComponent).getReferences() line: 279	
	J2EEModuleVirtualComponent.getNonManifestReferences(boolean) line: 126	
	J2EEModuleVirtualComponent.getReferences(boolean, boolean) line: 100	
	J2EEModuleVirtualComponent.getReferences() line: 96	
	WebAppLibrariesContainer(FlexibleProjectContainer).computeClasspathEntries() line: 181	
	WebAppLibrariesContainer(FlexibleProjectContainer).<init>(IPath, IJavaProject, IProject, IPath[], FlexibleProjectContainer$PathType[]) line: 122	
	WebAppLibrariesContainer.<init>(IPath, IJavaProject) line: 48	
	WebAppLibrariesContainerInitializer.initialize(IPath, IJavaProject) line: 34	
	JavaModelManager.initializeContainer(IJavaProject, IPath) line: 2608	
	JavaModelManager.getClasspathContainer(IPath, IJavaProject) line: 1778	
	JavaCore.getClasspathContainer(IPath, IJavaProject) line: 2652	
	JavaProject.resolveClasspath(IClasspathEntry[], boolean, boolean) line: 2561	
	JavaProject.resolveClasspath(JavaModelManager$PerProjectInfo, boolean, boolean) line: 2662	
	JavaProject.getResolvedClasspath() line: 1861	
	JavaProject.isOnClasspath(IResource) line: 2164	
	BuildpathIndicatorLabelDecorator.getOverlay(Object) line: 47	
	BuildpathIndicatorLabelDecorator.decorate(Object, IDecoration) line: 34	
	LightweightDecoratorDefinition.decorate(Object, IDecoration) line: 269	
	LightweightDecoratorManager$LightweightRunnable.run() line: 81	
	SafeRunner.run(ISafeRunnable) line: 42	
	LightweightDecoratorManager.decorate(Object, DecorationBuilder, LightweightDecoratorDefinition) line: 365	
	LightweightDecoratorManager.getDecorations(Object, DecorationBuilder) line: 347	
	DecorationScheduler$1.ensureResultCached(Object, boolean, IDecorationContext) line: 371	
	DecorationScheduler$1.run(IProgressMonitor) line: 331	
	Worker.run() line: 55	


Thread [Worker-6] (Suspended)	
	ClasspathManager.findLocalClass_LockClassLoader(String, ClassLoadingStatsHook[]) line: 465	
	ClasspathManager.findLocalClass(String) line: 445	
	DefaultClassLoader.findLocalClass(String) line: 211	
	BundleLoader.findLocalClass(String) line: 376	
	BundleLoader.findClassInternal(String, boolean, ClassLoader) line: 452	
	BundleLoader.findClass(String, boolean) line: 405	
	BundleLoader.findClass(String) line: 393	
	DefaultClassLoader.loadClass(String, boolean) line: 105	
	DefaultClassLoader(ClassLoader).loadClass(String) line: 251	
	BundleLoader.loadClass(String) line: 321	
	BundleHost.loadClass(String, boolean) line: 231	
	BundleHost(AbstractBundle).loadClass(String) line: 1193	
	EquinoxRegistryStrategy(RegistryStrategyOSGI).createExecutableExtension(RegistryContributor, String, String) line: 160	
	ExtensionRegistry.createExecutableExtension(RegistryContributor, String, String) line: 874	
	ConfigurationElement.createExecutableExtension(String) line: 243	
	ConfigurationElementHandle.createExecutableExtension(String) line: 51	
	ContentType.getDescriber() line: 271	
	ContentTypeCatalog.collectMatchingByContents(int, IContentType[], List, ILazySource) line: 183	
	ContentTypeCatalog.internalFindContentTypesFor(ILazySource, IContentType[][], Comparator, Comparator) line: 357	
	ContentTypeCatalog.internalFindContentTypesFor(ContentTypeMatcher, ILazySource, String, boolean) line: 406	
	ContentTypeCatalog.getDescriptionFor(ContentTypeMatcher, ILazySource, String, QualifiedName[]) line: 303	
	ContentTypeCatalog.getDescriptionFor(ContentTypeMatcher, InputStream, String, QualifiedName[]) line: 317	
	ContentTypeManager(ContentTypeMatcher).getDescriptionFor(InputStream, String, QualifiedName[]) line: 86	
	PlatformContentHandlerImpl.contentDescription(URI, InputStream, Map<?,?>, Map<Object,Object>) line: 92	
	FileURIHandlerImpl(URIHandlerImpl).contentDescription(URI, Map<?,?>) line: 267	
	ExtensibleURIConverterImpl.contentDescription(URI, Map<?,?>) line: 313	
	ResourceFactoryRegistryImpl.getContentTypeIdentifier(URI) line: 164	
	ResourceFactoryRegistryImpl.getFactory(URI, Map<String,Object>, Map<String,Object>, Map<String,Object>, String, boolean) line: 130	
	ResourceFactoryRegistryImpl.getFactory(URI) line: 75	
	J2EEResourceFactoryRegistry(DefaultOverridableResourceFactoryRegistry).delegatedGetFactory(URI) line: 73	
	J2EEResourceFactoryRegistry.delegatedGetFactory(URI) line: 27	
	J2EEResourceFactoryRegistry(DefaultOverridableResourceFactoryRegistry).getFactory(URI, String) line: 53	
	J2EEResourceFactoryRegistry(FileNameResourceFactoryRegistry).getFactory(URI, String) line: 64	
	J2EEResourceFactoryRegistry(FileNameResourceFactoryRegistry).getFactory(URI) line: 50	
	J2EEInit.initResourceFactories() line: 247	
	J2EEInit.init(boolean) line: 101	
	ArchiveInit.invokePrereqInits(boolean) line: 65	
	ArchiveInit.init(boolean) line: 38	
	J2EEPlugin.start(BundleContext) line: 508	
	BundleContextImpl$1.run() line: 782	
	AccessController.doPrivileged(PrivilegedExceptionAction<T>) line: not available [native method]	
	BundleContextImpl.startActivator(BundleActivator) line: 773	
	BundleContextImpl.start() line: 754	
	BundleHost.startWorker(int) line: 352	
	BundleHost(AbstractBundle).start(int) line: 280	
	SecureAction.start(Bundle, int) line: 408	
	EclipseLazyStarter.postFindLocalClass(String, Class, ClasspathManager) line: 111	
	ClasspathManager.findLocalClass(String) line: 449	
	DefaultClassLoader.findLocalClass(String) line: 211	
	BundleLoader.findLocalClass(String) line: 376	
	BundleLoader.findClassInternal(String, boolean, ClassLoader) line: 452	
	BundleLoader.findClass(String, boolean) line: 405	
	BundleLoader.findClass(String) line: 393	
	DefaultClassLoader.loadClass(String, boolean) line: 105	
	DefaultClassLoader(ClassLoader).loadClass(String) line: 251	
	BundleLoader.loadClass(String) line: 321	
	BundleHost.loadClass(String, boolean) line: 231	
	BundleHost(AbstractBundle).loadClass(String) line: 1193	
	EquinoxRegistryStrategy(RegistryStrategyOSGI).createExecutableExtension(RegistryContributor, String, String) line: 160	
	ExtensionRegistry.createExecutableExtension(RegistryContributor, String, String) line: 874	
	ConfigurationElement.createExecutableExtension(String) line: 243	
	ConfigurationElementHandle.createExecutableExtension(String) line: 51	
	ModuleFactory.getDelegate(IProgressMonitor) line: 94	
	ModuleFactory.findModule(String, IProgressMonitor) line: 146	
	ServerUtil.getModule(String) line: 135	
	Server.getModules() line: 2139	
	Server.visit(IModuleVisitor, IProgressMonitor) line: 2559	
	Server.getAllModules() line: 1287	
	ServerContentProvider$4.run(IProgressMonitor) line: 254	
	Worker.run() line: 55	


Thread [Worker-7] (Suspended)	
	ContentTypeCatalog.internalGetContentType(String) line: 487	
	ContentTypeCatalog.getContentType(String) line: 298	
	ContentTypeManager.getContentType(String) line: 135	
	WTPResourceFactoryRegistry$ConfigurationResourceFactoryDescriptor.init() line: 182	
	WTPResourceFactoryRegistry$ConfigurationResourceFactoryDescriptor.<init>(WTPResourceFactoryRegistry, IConfigurationElement) line: 163	
	WTPResourceFactoryRegistry$ResourceFactoryRegistryReader$1.run() line: 285	
	SafeRunner.run(ISafeRunnable) line: 42	
	WTPResourceFactoryRegistry$ResourceFactoryRegistryReader.readElement(IConfigurationElement) line: 282	
	WTPResourceFactoryRegistry$ResourceFactoryRegistryReader(RegistryReader).internalReadElement(IConfigurationElement) line: 84	
	WTPResourceFactoryRegistry$ResourceFactoryRegistryReader(RegistryReader).readRegistry() line: 125	
	WTPResourceFactoryRegistry.<init>() line: 61	
	WTPResourceFactoryRegistry.<clinit>() line: 55	
	WTPModulesResourceFactory.registerWith(RendererFactory) line: 71	
	WTPModulesResourceFactory.register() line: 80	
	WTPModulesInit.initResourceFactories() line: 52	
	WTPModulesInit.init(boolean) line: 42	
	WTPModulesInit.init() line: 34	
	ModulecorePlugin.start(BundleContext) line: 66	
	BundleContextImpl$1.run() line: 782	
	AccessController.doPrivileged(PrivilegedExceptionAction<T>) line: not available [native method]	
	BundleContextImpl.startActivator(BundleActivator) line: 773	
	BundleContextImpl.start() line: 754	
	BundleHost.startWorker(int) line: 352	
	BundleHost(AbstractBundle).start(int) line: 280	
	SecureAction.start(Bundle, int) line: 408	
	EclipseLazyStarter.postFindLocalClass(String, Class, ClasspathManager) line: 111	
	ClasspathManager.findLocalClass(String) line: 449	
	DefaultClassLoader.findLocalClass(String) line: 211	
	BundleLoader.findLocalClass(String) line: 376	
	SingleSourcePackage.loadClass(String) line: 33	
	BundleLoader.findClassInternal(String, boolean, ClassLoader) line: 449	
	BundleLoader.findClass(String, boolean) line: 405	
	BundleLoader.findClass(String) line: 393	
	DefaultClassLoader.loadClass(String, boolean) line: 105	
	DefaultClassLoader(ClassLoader).loadClass(String) line: 251	
	DefaultClassLoader(ClassLoader).loadClassInternal(String) line: 319	
	JEEDeployableFactory.createModules(IProject) line: 53	
	JEEDeployableFactory(ProjectModuleFactoryDelegate).cacheModules() line: 90	
	JEEDeployableFactory(ProjectModuleFactoryDelegate).getModules() line: 117	
	JEEDeployableFactory(ModuleFactoryDelegate).findModule(String) line: 202	
	JEEDeployableFactory(ProjectModuleFactoryDelegate).findModule(String) line: 286	
	ModuleFactory.findModule(String, IProgressMonitor) line: 146	
	ServerUtil.getModule(String) line: 135	
	Server.getModules() line: 2139	
	Server.visit(IModuleVisitor, IProgressMonitor) line: 2559	
	Server.getAllModules() line: 1287	
	ServerContentProvider$4.run(IProgressMonitor) line: 254	
	Worker.run() line: 55	


Thread [Worker-9] (Suspended)	
	ContentTypeCatalog.internalGetContentType(String) line: 487	
	ContentTypeCatalog.getContentType(String) line: 298	
	ContentTypeManager.getContentType(String) line: 135	
	FilterRule$ContentType.<init>(String, boolean) line: 422	
	FilterRule$ContentType.createContentType(IConfigurationElement) line: 432	
	FilterRule$ContentType.access$0(IConfigurationElement) line: 426	
	FilterRule.create(IConfigurationElement) line: 57	
	ValidatorExtensionReader.processRule(IConfigurationElement) line: 287	
	ValidatorExtensionReader.createFilterGroup(IConfigurationElement) line: 273	
	ValidatorExtensionReader.processIncludeAndExcludeElement(Validator$V2, IConfigurationElement) line: 247	
	ValidatorExtensionReader.processValidator(IConfigurationElement, String, String, IProject) line: 170	
	ValidatorExtensionReader.process() line: 65	
	ExtensionValidators.<init>() line: 43	
	ExtensionValidators.instance() line: 36	
	ValManager.getV2Validators(IProject, UseProjectPreferences) line: 345	
	ValManager.getValidatorsNotCached(IProject) line: 221	
	ValManager.access$1(ValManager, IProject) line: 220	
	ValManager$ValidatorCache.getValidatorsCached(IProject) line: 1264	
	ValManager.getValidators(IProject) line: 197	
	ValManager.getValidators() line: 129	
	ValManager.getValidatorsCopy() line: 139	
	DisabledValidatorManager$DisabledValidationFinder.findDisabledValidatorsFor(IResource) line: 104	
	DisabledValidatorManager.getDisabledValidatorsFor(IResource) line: 62	
	ValidationFramework.getDisabledValidatorsFor(IResource) line: 238	
	ValidatorStrategy.reconcile(ITypedRegion, DirtyRegion) line: 193	
	StructuredRegionProcessor(DocumentRegionProcessor).process(DirtyRegion) line: 199	
	StructuredRegionProcessor.process(DirtyRegion) line: 221	
	StructuredRegionProcessor(DirtyRegionProcessor).run(IProgressMonitor) line: 641	
	Worker.run() line: 55
Comment 1 Rob Stryker CLA 2009-06-30 04:59:44 EDT
Created attachment 140467 [details]
First stacktrace
Comment 2 Rob Stryker CLA 2009-06-30 05:00:04 EDT
Created attachment 140468 [details]
Stacktrace 2
Comment 3 Rob Stryker CLA 2009-06-30 05:07:41 EDT
If the deadlock is occurring, teh symptom is that "Initializing Java Tooling" never ends, with a subtitle of "Configuring org.eclipse.jst.j2ee.internal.module.container". 

I can immediately still type in an editor, however if I attempt to click in the "navigator" view, or activate hte navigator view, the UI thread freezes in org.eclipse.wst.sse.core.internal.propertytester.testContentType(IFile, String) checking if one of the component.xml files is of content type org.eclipse.jst.jsp.core.jspsource  (small trace to follow)

ContentTypeCatalog.internalFindContentTypesFor(ContentTypeMatcher, String, Comparator) line: 416	
ContentTypeCatalog.findContentTypesFor(ContentTypeMatcher, String) line: 264	
ContentTypeManager(ContentTypeMatcher).findContentTypeFor(String) line: 48	
ContentDescriptionManager.getDescriptionFor(File, ResourceInfo) line: 327	
File.getContentDescription() line: 270	
StructuredFilePropertyTester.testContentType(IFile, String) line: 65	
Comment 4 Carl Anderson CLA 2009-06-30 16:56:55 EDT
Jasoh Sholl just fixed some deadlocks during initialization of the container- assigning this to him for the initial investigation.
Comment 5 Rob Stryker CLA 2009-07-21 13:23:47 EDT
This deadlock is becoming really hindering to my dev and testing. Sometimes even in a workspace wityh just one modulecore project it's occurring. 
Comment 6 Rob Stryker CLA 2009-07-24 15:47:19 EDT
Jason:

Is there a build where your deadlock issues have been fixed that maybe I can make use of or test out? ;)  THis is really impeding my dev time =]
Comment 7 Jason Sholl CLA 2009-07-27 11:02:38 EDT
I haven't had a chance to look at this yet.  I did make several changes to the initialization of the EAR Libraries classpath container a few weeks ago, but all these changes should already been in the builds.  If you're self hosting and have org.eclipse.jst.j2ee, then you have all the changes.
Comment 8 Rob Stryker CLA 2009-08-20 17:50:21 EDT
were these changes added to teh wtp 3.1.x maintenance branch? 
Comment 9 Jason Sholl CLA 2009-08-24 09:58:05 EDT
No, these changes I was referring to are in 3.2.
Comment 10 Carl Anderson CLA 2009-09-03 15:00:08 EDT
The fix for this would be of considerable size, and it is very late in the WTP 3.1.1 development cycle to release such a large change.  (This may be fixed by bug 287763, if that makes it into 3.1.1)
Comment 11 Rob Stryker CLA 2009-09-16 14:29:58 EDT
Created attachment 147353 [details]
another trace
Comment 12 Dani Megert CLA 2009-09-21 09:36:59 EDT
FYI: some of the deadlock stack traces are related/caused by bug 283163 in the SDK which got fixed for 3.5.1.
Comment 13 Jason Sholl CLA 2009-11-19 14:42:37 EST
I think both this bug, bug 288619, and bug 287763 may have been fixed by bug 291143 with the introduction of IJavaLite.  If you can still reproduce this with the latest 312 code (not sure if this has been released to the builds yet), please reopen with new stack traces.

*** This bug has been marked as a duplicate of bug 291143 ***