Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Riena » riena.core deadlocks itself?
riena.core deadlocks itself? [message #1649860] Wed, 04 March 2015 14:48 Go to next message
Erdal Karaca is currently offline Erdal KaracaFriend
Messages: 837
Registered: July 2009
Senior Member
At client startup the following error message occurs:

!ENTRY org.eclipse.osgi 2 0 2015-03-04 15:29:01.515
!MESSAGE While loading class "org.eclipse.riena.core.util.Iter$ReverseIterable$1", thread "Thread[Worker-1,5,main]" timed out waiting (5008ms) for thread "Thread[Refresh Packages,5,main]" to finish starting bundle "org.eclipse.riena.core_6.1.0.v20150203_6_1_0_stable [3]". To avoid deadlock, thread "Thread[Worker-1,5,main]" is proceeding but "org.eclipse.riena.core.util.Iter$ReverseIterable$1" may not be fully initialized.
!STACK 0
org.osgi.framework.BundleException: State change in progress for bundle "initial@reference:file:plugins/org.eclipse.riena.core_6.1.0.v20150203_6_1_0_stable.jar" by thread "Refresh Packages".
	at org.eclipse.osgi.framework.internal.core.AbstractBundle.beginStateChange(AbstractBundle.java:1088)
	at org.eclipse.osgi.framework.internal.core.AbstractBundle.start(AbstractBundle.java:298)
	at org.eclipse.osgi.framework.util.SecureAction.start(SecureAction.java:440)
	at org.eclipse.osgi.internal.loader.BundleLoader.setLazyTrigger(BundleLoader.java:263)
	at org.eclipse.core.runtime.internal.adaptor.EclipseLazyStarter.postFindLocalClass(EclipseLazyStarter.java:107)
	at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClass(ClasspathManager.java:469)
	at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.findLocalClass(DefaultClassLoader.java:216)
	at org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass(BundleLoader.java:395)
	at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:464)
	at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:421)
	at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:412)
	at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:107)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
	at org.eclipse.riena.core.util.Iter$ReverseIterable.<init>(Iter.java:195)
	at org.eclipse.riena.core.util.Iter$ReverseIterable.<init>(Iter.java:194)
	at org.eclipse.riena.core.util.Iter.ableReverse(Iter.java:98)
	at org.eclipse.riena.core.wire.WirePuller.stop(WirePuller.java:134)
	at org.eclipse.riena.core.wire.WirePuller$1.run(WirePuller.java:70)
	at org.eclipse.riena.core.util.WeakRef$Remover.run(WeakRef.java:114)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
Caused by: org.eclipse.osgi.framework.internal.core.AbstractBundle$BundleStatusException
	... 20 more
Root exception:
org.eclipse.osgi.framework.internal.core.AbstractBundle$BundleStatusException
	at org.eclipse.osgi.framework.internal.core.AbstractBundle.beginStateChange(AbstractBundle.java:1088)
	at org.eclipse.osgi.framework.internal.core.AbstractBundle.start(AbstractBundle.java:298)
	at org.eclipse.osgi.framework.util.SecureAction.start(SecureAction.java:440)
	at org.eclipse.osgi.internal.loader.BundleLoader.setLazyTrigger(BundleLoader.java:263)
	at org.eclipse.core.runtime.internal.adaptor.EclipseLazyStarter.postFindLocalClass(EclipseLazyStarter.java:107)
	at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClass(ClasspathManager.java:469)
	at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.findLocalClass(DefaultClassLoader.java:216)
	at org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass(BundleLoader.java:395)
	at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:464)
	at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:421)
	at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:412)
	at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:107)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
	at org.eclipse.riena.core.util.Iter$ReverseIterable.<init>(Iter.java:195)
	at org.eclipse.riena.core.util.Iter$ReverseIterable.<init>(Iter.java:194)
	at org.eclipse.riena.core.util.Iter.ableReverse(Iter.java:98)
	at org.eclipse.riena.core.wire.WirePuller.stop(WirePuller.java:134)
	at org.eclipse.riena.core.wire.WirePuller$1.run(WirePuller.java:70)
	at org.eclipse.riena.core.util.WeakRef$Remover.run(WeakRef.java:114)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)


It seems that the WeakRef.Remove job is scheduled while the bundle is still being activated?
Re: riena.core deadlocks itself? [message #1649968 is a reply to message #1649860] Wed, 04 March 2015 15:51 Go to previous messageGo to next message
Christian Campo is currently offline Christian CampoFriend
Messages: 597
Registered: July 2009
Senior Member
Have you got an idea by "Refresh Packages" is in progress ? It seems that riena.core gets cancelled because it times out waiting for "Refresh Packages" thread. Do you what this thread is doing ? Is that an application thread ?
Does that happen all the time or only occassionally. What launcher are you starting ? Is it one of the Riena example clients or your own applicatons ?

Re: riena.core deadlocks itself? [message #1651304 is a reply to message #1649968] Thu, 05 March 2015 08:16 Go to previous messageGo to next message
Erdal Karaca is currently offline Erdal KaracaFriend
Messages: 837
Registered: July 2009
Senior Member
Seems to be the PackageAdmin, see:

org.eclipse.osgi.framework.internal.core.PackageAdminImpl.refreshPackages(Bundle[], boolean, FrameworkListener[])


It is a custom application and happens every time the client is started (from IDE).
Does not happen in the SCP playground client.

I think the WeakRef.Remover Job is scheduled before riena.core has been activated completeley. If I schedule the job with a delay, the deadlock does not occur:

		public Remover() {
			super("WeakRef remover"); //$NON-NLS-1$
			setSystem(true);
			schedule(10000);
		}


Christian Campo wrote on Wed, 04 March 2015 16:51
Have you got an idea by "Refresh Packages" is in progress ? It seems that riena.core gets cancelled because it times out waiting for "Refresh Packages" thread. Do you what this thread is doing ? Is that an application thread ?
Does that happen all the time or only occassionally. What launcher are you starting ? Is it one of the Riena example clients or your own applicatons ?


Re: riena.core deadlocks itself? [message #1651338 is a reply to message #1651304] Thu, 05 March 2015 08:42 Go to previous messageGo to next message
Erdal Karaca is currently offline Erdal KaracaFriend
Messages: 837
Registered: July 2009
Senior Member
When importing riena.core into the workspace (and choosing that project instead of the one in the target platform when running the application from IDE), the error message does not occur.
Maybe, the bundles resolution order is changed and matters as well.
Re: riena.core deadlocks itself? [message #1651453 is a reply to message #1651338] Thu, 05 March 2015 10:03 Go to previous message
Christian Campo is currently offline Christian CampoFriend
Messages: 597
Registered: July 2009
Senior Member
Ok can you open a bug for this and we look into it.....
Previous Topic:How to close Application correctly
Next Topic:SWT.VIRTUAL style for tables in Riena
Goto Forum:
  


Current Time: Tue Oct 24 09:33:35 GMT 2017

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

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