Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 359893 - Deadlock in StateImpl
Summary: Deadlock in StateImpl
Status: RESOLVED WONTFIX
Alias: None
Product: Equinox
Classification: Eclipse Project
Component: Framework (show other bugs)
Version: unspecified   Edit
Hardware: PC Linux
: P3 critical with 3 votes (vote)
Target Milestone: ---   Edit
Assignee: equinox.framework-inbox CLA
QA Contact:
URL:
Whiteboard: stalebug
Keywords:
Depends on:
Blocks:
 
Reported: 2011-10-04 14:34 EDT by Matt Hughes CLA
Modified: 2019-07-08 08:01 EDT (History)
3 users (show)

See Also:


Attachments
ThreadDump (41.61 KB, text/plain)
2011-10-04 14:36 EDT, Matt Hughes CLA
no flags Details
Thread Dump #2 (63.98 KB, text/plain)
2011-10-04 14:40 EDT, Matt Hughes CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Matt Hughes CLA 2011-10-04 14:34:30 EDT
Build Identifier: org.eclipse.osgi_3.7.0.v20110613.jar

Experiencing a deadlock in StateImpl on startup.

"Timer-2" daemon prio=10 tid=0x62482c00 nid=0x5db5 waiting for monitor entry [0x611ad000]
   java.lang.Thread.State: BLOCKED (on object monitor)
	at org.eclipse.osgi.internal.resolver.StateImpl.fullyLoad(StateImpl.java:1032)
	- waiting to lock <0x74165e60> (a java.lang.Object)
	at org.eclipse.osgi.internal.resolver.StateImpl.getExportedPackages(StateImpl.java:644)


"Start Level Event Dispatcher" daemon prio=10 tid=0x62f5dc00 nid=0x5d9c runnable [0x62cfe000]
   java.lang.Thread.State: RUNNABLE
	at org.eclipse.osgi.internal.module.ResolverExport.getUsesDirective(ResolverExport.java:45)
	at org.eclipse.osgi.internal.module.GroupingChecker$PackageRoots.isConsistentClassSpace(GroupingChecker.java:334)
	at org.eclipse.osgi.internal.module.GroupingChecker$PackageRoots.isConsistentClassSpace(GroupingChecker.java:351)
	at org.eclipse.osgi.internal.module.GroupingChecker$PackageRoots.isConsistentClassSpace(GroupingChecker.java:351)
	at org.eclipse.osgi.internal.module.GroupingChecker$PackageRoots.isConsistentClassSpace(GroupingChecker.java:351)
	at org.eclipse.osgi.internal.module.GroupingChecker$PackageRoots.isConsistentClassSpace(GroupingChecker.java:351)
	at org.eclipse.osgi.internal.module.GroupingChecker.isConsistentInternal(GroupingChecker.java:133)
	at org.eclipse.osgi.internal.module.GroupingChecker.isConsistent(GroupingChecker.java:103)
	at org.eclipse.osgi.internal.module.ResolverImpl.addConflicts(ResolverImpl.java:923)
	at org.eclipse.osgi.internal.module.ResolverImpl.getConflicts(ResolverImpl.java:904)
	at org.eclipse.osgi.internal.module.ResolverImpl.findBestCombination(ResolverImpl.java:824)
	at org.eclipse.osgi.internal.module.ResolverImpl.findBestCombination(ResolverImpl.java:778)
	at org.eclipse.osgi.internal.module.ResolverImpl.checkUsesConstraints(ResolverImpl.java:714)
	at org.eclipse.osgi.internal.module.ResolverImpl.resolveBundles0(ResolverImpl.java:685)
	at org.eclipse.osgi.internal.module.ResolverImpl.resolveBundles(ResolverImpl.java:547)
	at org.eclipse.osgi.internal.module.ResolverImpl.resolve(ResolverImpl.java:437)
	- locked <0x7428a190> (a org.eclipse.osgi.internal.module.ResolverImpl)
	at org.eclipse.osgi.internal.resolver.StateImpl.resolve(StateImpl.java:481)
	- locked <0x74165e60> (a java.lang.Object)
	at org.eclipse.osgi.internal.resolver.StateImpl.resolve(StateImpl.java:559)


Reproducible: Sometimes

Steps to Reproduce:
1. Start up equinox many times
2. Eventually you'll get this deadlock
Comment 1 Matt Hughes CLA 2011-10-04 14:36:41 EDT
Created attachment 204541 [details]
ThreadDump

Contains a full thread dump of what was happening at the time of the deadlock.
Comment 2 Matt Hughes CLA 2011-10-04 14:40:37 EDT
Created attachment 204543 [details]
Thread Dump #2

Another thread dump showing same problem at a different time.
Comment 3 Matt Hughes CLA 2011-10-04 14:42:38 EDT
This issue might be relevant:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=337272

Doesn't actually look like a deadlock, but the system isn't able to make progress because the GroupingChecker is taking forever.  Like the linked issue found, I just assumed the system was hung.  I waited ten minutes at least with it in this state.
Comment 4 Eclipse Genie CLA 2019-07-04 07:35:31 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.
Comment 5 Thomas Watson CLA 2019-07-08 08:01:19 EDT
I'm sure this was never looked into (sorry).  The codebase for the framework has moved off the old StateImpl resolver for many releases.  Please open a new bug if there is still an issue resolving on the latest release.