Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Equinox » [ds] Getting a lock required more than 10000 ms
[ds] Getting a lock required more than 10000 ms [message #121913] Fri, 28 November 2008 20:11 Go to next message
Eclipse UserFriend
Originally posted by: ekkehard.gentz-software.de

I'm getting this warning -
but not every run - sometimes it runs without any problem

WARNING - 21:03:50 [B: org.eclipse.equinox.ds] - Getting a lock required
more than 10000 ms. There might be a synchronization problem in this
callstack or just the build/dispose process of some components took too
long!.

---
can I configure this timeout-value ?


thx

ekke

-------------------------------------------------------
Exception: Debug stacktrace
java.lang.Exception: Debug stacktrace
at
org.eclipse.equinox.internal.ds.InstanceProcess.getLock(Inst anceProcess.java:117)
at
org.eclipse.equinox.internal.ds.InstanceProcess.buildCompone nts(InstanceProcess.java:158)
at org.eclipse.equinox.internal.ds.Resolver.getEligible(Resolve r.java:317)
at
org.eclipse.equinox.internal.ds.SCRManager.serviceChanged(SC RManager.java:213)
at
org.eclipse.osgi.framework.internal.core.FilteredServiceList ener.serviceChanged(FilteredServiceListener.java:91)
at
org.eclipse.osgi.framework.internal.core.BundleContextImpl.d ispatchEvent(BundleContextImpl.java:1248)
at
org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEve nt(EventManager.java:211)
at
org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEv entSynchronous(ListenerQueue.java:141)
at
org.eclipse.osgi.framework.internal.core.Framework.publishSe rviceEventPrivileged(Framework.java:1563)
at
org.eclipse.osgi.framework.internal.core.Framework.publishSe rviceEvent(Framework.java:1538)
at
org.eclipse.osgi.framework.internal.core.ServiceRegistration Impl.register(ServiceRegistrationImpl.java:122)
at
org.eclipse.osgi.framework.internal.core.BundleContextImpl.c reateServiceRegistration(BundleContextImpl.java:666)
at
org.eclipse.osgi.framework.internal.core.BundleContextImpl.r egisterService(BundleContextImpl.java:617)
at
org.ow2.easybeans.osgi.component.EZBComponentServiceFactory. updateMapsAndRegisterService(EZBComponentServiceFactory.java :219)
at
org.ow2.easybeans.osgi.component.EZBComponentServiceFactory. updated(EZBComponentServiceFactory.java:198)
at
org.eclipse.equinox.internal.cm.ManagedServiceFactoryTracker $2.run(ManagedServiceFactoryTracker.java:177)
at
org.eclipse.equinox.internal.cm.SerializedTaskQueue$1.run(Se rializedTaskQueue.java:36)
Re: [ds] Getting a lock required more than 10000 ms [message #121926 is a reply to message #121913] Sat, 29 November 2008 08:35 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: ekkehard.gentz-software.de

it seems that I'm getting those warnings only using a target filter in
my DS like:

<reference name="fooJDBCPool"
interface="org.ow2.easybeans.component.jdbcpool.JDBCPoolComponent "
target="(xmlconfig=*foo_entity_data_source_hsql*)"
cardinality="1..1"
/>

from my log-output I see, that the warning appears soon after
registering the service I'm looking for

but the warning appears not every run - only from time to time

it seems to work, so the warning can be ignored, I think,
but it would be better without a warning ;-)

looking for Services from same Interface without a target filter I never
got a warning (til now):

<reference name="fooJDBCPool"
interface="org.ow2.easybeans.component.jdbcpool.JDBCPoolComponent "
cardinality="1..*"
/>

ekke

ekke schrieb:
> I'm getting this warning -
> but not every run - sometimes it runs without any problem
>
> WARNING - 21:03:50 [B: org.eclipse.equinox.ds] - Getting a lock required
> more than 10000 ms. There might be a synchronization problem in this
> callstack or just the build/dispose process of some components took too
> long!.
>
> ---
> can I configure this timeout-value ?
>
>
> thx
>
> ekke
>
> -------------------------------------------------------
> Exception: Debug stacktrace
> java.lang.Exception: Debug stacktrace
> at
> org.eclipse.equinox.internal.ds.InstanceProcess.getLock(Inst anceProcess.java:117)
>
> at
> org.eclipse.equinox.internal.ds.InstanceProcess.buildCompone nts(InstanceProcess.java:158)
>
> at
> org.eclipse.equinox.internal.ds.Resolver.getEligible(Resolve r.java:317)
> at
> org.eclipse.equinox.internal.ds.SCRManager.serviceChanged(SC RManager.java:213)
>
> at
> org.eclipse.osgi.framework.internal.core.FilteredServiceList ener.serviceChanged(FilteredServiceListener.java:91)
>
> at
> org.eclipse.osgi.framework.internal.core.BundleContextImpl.d ispatchEvent(BundleContextImpl.java:1248)
>
> at
> org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEve nt(EventManager.java:211)
>
> at
> org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEv entSynchronous(ListenerQueue.java:141)
>
> at
> org.eclipse.osgi.framework.internal.core.Framework.publishSe rviceEventPrivileged(Framework.java:1563)
>
> at
> org.eclipse.osgi.framework.internal.core.Framework.publishSe rviceEvent(Framework.java:1538)
>
> at
> org.eclipse.osgi.framework.internal.core.ServiceRegistration Impl.register(ServiceRegistrationImpl.java:122)
>
> at
> org.eclipse.osgi.framework.internal.core.BundleContextImpl.c reateServiceRegistration(BundleContextImpl.java:666)
>
> at
> org.eclipse.osgi.framework.internal.core.BundleContextImpl.r egisterService(BundleContextImpl.java:617)
>
> at
> org.ow2.easybeans.osgi.component.EZBComponentServiceFactory. updateMapsAndRegisterService(EZBComponentServiceFactory.java :219)
>
> at
> org.ow2.easybeans.osgi.component.EZBComponentServiceFactory. updated(EZBComponentServiceFactory.java:198)
>
> at
> org.eclipse.equinox.internal.cm.ManagedServiceFactoryTracker $2.run(ManagedServiceFactoryTracker.java:177)
>
> at
> org.eclipse.equinox.internal.cm.SerializedTaskQueue$1.run(Se rializedTaskQueue.java:36)
>
[ds] target filter problem [message #121939 is a reply to message #121913] Sun, 30 November 2008 13:08 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: ekkehard.gentz-software.de

perhaps an expert is reading this ;-)

just refactoring my osgi enterprise server - example to use
declarative services as most as possible instead of service tracker

I run into one problem:

there's a service registered by a 3rdparty bundle

I can detect those services using DS:

<reference name="fooEZBContainer"
interface="org.ow2.easybeans.api.EZBContainer"
cardinality="1..n"
/>

but I'm only interested into one specific service, so I tried to use:

<reference name="fooEZBContainer"
interface="org.ow2.easybeans.api.EZBContainer"
cardinality="1..1"
target="(name=org.ekkehard.foo.datamanager.bean)"
/>


now the service was not detected

if I'm listing EZBContainer services from console I get:

{org.ow2.easybeans.api.EZBContainer}={service.id=249}
Registered by bundle:
initial@reference :file:../../../ekkehard/plugins/org.ekkehard.foo.datamanager .bean_1.0.0.jar/
[62]
Bundles using service:

initial@reference :file:../../../easyBeans/bundles/easybeans-core_1.1.0-M3-SNA PSHOT.jar/
[68]

it seems that I can only look for service.id which isn't really helpful ;-)

if using the same service in a service tracker, I can easy use:

private void processEJBContainerReady(EZBContainer theService) {
logger.debug(bundleMarker,
"processEJBContainerReady - tracking service: {}", theService.getName());

getName() gives the expected "org.ekkehard.foo.datamanager.bean"

so my QUESTIONS:

is there a way to access the methods from the service interfaces
in a target filter ?

or: can I access the bundle-name registered the service in the target
filter ?

thx for any help !

otherwise I have to reference using 1..n an then in my
bind/unbind-methods see when the expected service comes and goes and
then register/unregister my service.
but of course at first I tried to delegate the work to equinox.ds ;-)

ekke
Re: [ds] target filter problem [message #121979 is a reply to message #121939] Mon, 01 December 2008 08:54 Go to previous messageGo to next message
Danail Nachev is currently offline Danail NachevFriend
Messages: 110
Registered: July 2009
Senior Member
Target attribute (filter) is using the service properties. It doesn't
have access to the service implementation and doesn't call service
methods when the filter is evaluated.

ekke wrote:
> perhaps an expert is reading this ;-)
>
> just refactoring my osgi enterprise server - example to use
> declarative services as most as possible instead of service tracker
>
> I run into one problem:
>
> there's a service registered by a 3rdparty bundle
>
> I can detect those services using DS:
>
> <reference name="fooEZBContainer"
> interface="org.ow2.easybeans.api.EZBContainer"
> cardinality="1..n"
> />
>
> but I'm only interested into one specific service, so I tried to use:
>
> <reference name="fooEZBContainer"
> interface="org.ow2.easybeans.api.EZBContainer"
> cardinality="1..1"
> target="(name=org.ekkehard.foo.datamanager.bean)"
> />
>
>
> now the service was not detected
>
> if I'm listing EZBContainer services from console I get:
>
> {org.ow2.easybeans.api.EZBContainer}={service.id=249}
> Registered by bundle:
> initial@reference :file:../../../ekkehard/plugins/org.ekkehard.foo.datamanager .bean_1.0.0.jar/
> [62]
> Bundles using service:
>
> initial@reference :file:../../../easyBeans/bundles/easybeans-core_1.1.0-M3-SNA PSHOT.jar/
> [68]
>
> it seems that I can only look for service.id which isn't really helpful ;-)
>
> if using the same service in a service tracker, I can easy use:
>
> private void processEJBContainerReady(EZBContainer theService) {
> logger.debug(bundleMarker,
> "processEJBContainerReady - tracking service: {}", theService.getName());
>
> getName() gives the expected "org.ekkehard.foo.datamanager.bean"
>
> so my QUESTIONS:
>
> is there a way to access the methods from the service interfaces
> in a target filter ?
>
> or: can I access the bundle-name registered the service in the target
> filter ?
>
> thx for any help !
>
> otherwise I have to reference using 1..n an then in my
> bind/unbind-methods see when the expected service comes and goes and
> then register/unregister my service.
> but of course at first I tried to delegate the work to equinox.ds ;-)
>
> ekke
Re: [ds] target filter problem [message #121992 is a reply to message #121979] Mon, 01 December 2008 09:17 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: ekkehard.gentz-software.de

Danail Nachev schrieb:
> Target attribute (filter) is using the service properties. It doesn't
> have access to the service implementation and doesn't call service
> methods when the filter is evaluated.
>

Danail,

thanks for verification - thats what I found out,
only wanted to ask if there's a hidden way to get more ;-)

but using DS I'm able to reduce the complexitiy from ServiceTracker and
now have a combination of DS and Tracker
(I'll report about this in a blog entry)

thx again

ekke
> ekke wrote:
>> perhaps an expert is reading this ;-)
>>
>> just refactoring my osgi enterprise server - example to use
>> declarative services as most as possible instead of service tracker
>>
>> I run into one problem:
>>
>> there's a service registered by a 3rdparty bundle
>>
>> I can detect those services using DS:
>>
>> <reference name="fooEZBContainer"
>> interface="org.ow2.easybeans.api.EZBContainer"
>> cardinality="1..n"
>> />
>>
>> but I'm only interested into one specific service, so I tried to use:
>>
>> <reference name="fooEZBContainer"
>> interface="org.ow2.easybeans.api.EZBContainer"
>> cardinality="1..1"
>> target="(name=org.ekkehard.foo.datamanager.bean)"
>> />
>>
>>
>> now the service was not detected
>>
>> if I'm listing EZBContainer services from console I get:
>>
>> {org.ow2.easybeans.api.EZBContainer}={service.id=249}
>> Registered by bundle:
>> initial@reference :file:../../../ekkehard/plugins/org.ekkehard.foo.datamanager .bean_1.0.0.jar/
>> [62]
>> Bundles using service:
>>
>> initial@reference :file:../../../easyBeans/bundles/easybeans-core_1.1.0-M3-SNA PSHOT.jar/
>> [68]
>>
>> it seems that I can only look for service.id which isn't really helpful ;-)
>>
>> if using the same service in a service tracker, I can easy use:
>>
>> private void processEJBContainerReady(EZBContainer theService) {
>> logger.debug(bundleMarker,
>> "processEJBContainerReady - tracking service: {}", theService.getName());
>>
>> getName() gives the expected "org.ekkehard.foo.datamanager.bean"
>>
>> so my QUESTIONS:
>>
>> is there a way to access the methods from the service interfaces
>> in a target filter ?
>>
>> or: can I access the bundle-name registered the service in the target
>> filter ?
>>
>> thx for any help !
>>
>> otherwise I have to reference using 1..n an then in my
>> bind/unbind-methods see when the expected service comes and goes and
>> then register/unregister my service.
>> but of course at first I tried to delegate the work to equinox.ds ;-)
>>
>> ekke
Re: [ds] Getting a lock required more than 10000 ms [message #122005 is a reply to message #121913] Mon, 01 December 2008 09:25 Go to previous messageGo to next message
Stoyan Boshev is currently offline Stoyan BoshevFriend
Messages: 3
Registered: July 2009
Junior Member
ekke wrote:
> I'm getting this warning -
> but not every run - sometimes it runs without any problem
>
> WARNING - 21:03:50 [B: org.eclipse.equinox.ds] - Getting a lock required
> more than 10000 ms. There might be a synchronization problem in this
> callstack or just the build/dispose process of some components took too
> long!.
>
> ---
> can I configure this timeout-value ?

The system property "equinox.scr.waitTimeOnBlock" configures this
timeout. The default value is 10000.
Try increasing it to higher values to see whether the warnings would
disappear. You could also turn on the performance debug to see how long
your components are being build:
equinox.ds.perf=true

The debug data will be printed in your console if you use:
equinox.ds.print=true
Otherwise it will be printed using the LogService.
Re: [ds] Getting a lock required more than 10000 ms [message #122018 is a reply to message #122005] Mon, 01 December 2008 10:01 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: ekkehard.gentz-software.de

Stoyan Boshev schrieb:
> ekke wrote:
>> I'm getting this warning -
>> but not every run - sometimes it runs without any problem
>>
>> WARNING - 21:03:50 [B: org.eclipse.equinox.ds] - Getting a lock
>> required more than 10000 ms. There might be a synchronization problem
>> in this callstack or just the build/dispose process of some components
>> took too long!.
>>
>> ---
>> can I configure this timeout-value ?
>
> The system property "equinox.scr.waitTimeOnBlock" configures this
> timeout. The default value is 10000.
> Try increasing it to higher values to see whether the warnings would
> disappear. You could also turn on the performance debug to see how long
> your components are being build:
> equinox.ds.perf=true
>
> The debug data will be printed in your console if you use:
> equinox.ds.print=true
> Otherwise it will be printed using the LogService.

thx for your worthful informations

ekke
Re: [ds] Getting a lock required more than 10000 ms [message #122031 is a reply to message #122005] Mon, 01 December 2008 12:21 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: ekkehard.gentz-software.de

Stoyan Boshev schrieb:
> ekke wrote:
>> I'm getting this warning -
>> but not every run - sometimes it runs without any problem
>>
>> WARNING - 21:03:50 [B: org.eclipse.equinox.ds] - Getting a lock
>> required more than 10000 ms. There might be a synchronization problem
>> in this callstack or just the build/dispose process of some components
>> took too long!.
>>
>> ---
>> can I configure this timeout-value ?
>
> The system property "equinox.scr.waitTimeOnBlock" configures this
> timeout. The default value is 10000.
> Try increasing it to higher values to see whether the warnings would
> disappear. You could also turn on the performance debug to see how long
> your components are being build:
> equinox.ds.perf=true
>
> The debug data will be printed in your console if you use:
> equinox.ds.print=true
> Otherwise it will be printed using the LogService.

Stoyan,

is there a documentation of all these system properties ?
I didn't found equinox.ds.xxx properties in help - platform reference
runtime-options or in equinox wiki or other documents

thx

ekke
Re: [ds] Getting a lock required more than 10000 ms [message #122057 is a reply to message #122005] Mon, 01 December 2008 14:28 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: ekkehard.gentz-software.de

Stoyan,

I did some more tests:

1. set timeout 20000ms
run A:
I got the Warning "lock required..."
[DS perf] logs 25000 for one component and 45000 for another one
stopped
without changes
run B:
[DS perf] logs for the same components something around 5000ms

2. set timeout 50000ms
still got a warning "lock required..."
now my components are still around 5000ms
but I noticed other components (from 3rdparty bundles)
need more then 50000ms

I also get another WARN before the Warning "lock required..." appears:
[SCR - WorkThread] Timeout occurred! Thread was blocked on processing
[QueuedJob] WorkPerformer:
org.eclipse.equinox.internal.ds.SCRManager@8ae950; actionType 1.

---
my DS Components are waiting for services from other components
(3rdParty) which need some time to build because per ex. it needs some
time until datasources are ready or hibernate has done the work

it seems if I depend on those components and am using target filters,I'm
running into timeout warnings

should I open a bug ?
its difficult to reproduce because its a very complex environment

ekke




Stoyan Boshev schrieb:
> ekke wrote:
>> I'm getting this warning -
>> but not every run - sometimes it runs without any problem
>>
>> WARNING - 21:03:50 [B: org.eclipse.equinox.ds] - Getting a lock
>> required more than 10000 ms. There might be a synchronization problem
>> in this callstack or just the build/dispose process of some components
>> took too long!.
>>
>> ---
>> can I configure this timeout-value ?
>
> The system property "equinox.scr.waitTimeOnBlock" configures this
> timeout. The default value is 10000.
> Try increasing it to higher values to see whether the warnings would
> disappear. You could also turn on the performance debug to see how long
> your components are being build:
> equinox.ds.perf=true
>
> The debug data will be printed in your console if you use:
> equinox.ds.print=true
> Otherwise it will be printed using the LogService.
Re: [ds] Getting a lock required more than 10000 ms [message #122069 is a reply to message #122057] Mon, 01 December 2008 15:23 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: ekkehard.gentz-software.de

BTW: I reduced logging output from DEBUG to INFO for the bundles with
'slow' DS component - builds

then it runs always without any WARNINGS
because now the 3rdparty components only need 600ms instead of >50000

ekke
ekke schrieb:
> Stoyan,
>
> I did some more tests:
>
> 1. set timeout 20000ms
> run A:
> I got the Warning "lock required..."
> [DS perf] logs 25000 for one component and 45000 for another one
> stopped
> without changes
> run B:
> [DS perf] logs for the same components something around 5000ms
>
> 2. set timeout 50000ms
> still got a warning "lock required..."
> now my components are still around 5000ms
> but I noticed other components (from 3rdparty bundles)
> need more then 50000ms
>
> I also get another WARN before the Warning "lock required..." appears:
> [SCR - WorkThread] Timeout occurred! Thread was blocked on processing
> [QueuedJob] WorkPerformer:
> org.eclipse.equinox.internal.ds.SCRManager@8ae950; actionType 1.
>
> ---
> my DS Components are waiting for services from other components
> (3rdParty) which need some time to build because per ex. it needs some
> time until datasources are ready or hibernate has done the work
>
> it seems if I depend on those components and am using target filters,I'm
> running into timeout warnings
>
> should I open a bug ?
> its difficult to reproduce because its a very complex environment
>
> ekke
>
>
>
>
> Stoyan Boshev schrieb:
>> ekke wrote:
>>> I'm getting this warning -
>>> but not every run - sometimes it runs without any problem
>>>
>>> WARNING - 21:03:50 [B: org.eclipse.equinox.ds] - Getting a lock
>>> required more than 10000 ms. There might be a synchronization problem
>>> in this callstack or just the build/dispose process of some
>>> components took too long!.
>>>
>>> ---
>>> can I configure this timeout-value ?
>>
>> The system property "equinox.scr.waitTimeOnBlock" configures this
>> timeout. The default value is 10000.
>> Try increasing it to higher values to see whether the warnings would
>> disappear. You could also turn on the performance debug to see how
>> long your components are being build:
>> equinox.ds.perf=true
>>
>> The debug data will be printed in your console if you use:
>> equinox.ds.print=true
>> Otherwise it will be printed using the LogService.
Re: [ds] Getting a lock required more than 10000 ms [message #125889 is a reply to message #122031] Tue, 17 February 2009 08:50 Go to previous message
Stoyan Boshev is currently offline Stoyan BoshevFriend
Messages: 3
Registered: July 2009
Junior Member
> is there a documentation of all these system properties ?
> I didn't found equinox.ds.xxx properties in help - platform reference
> runtime-options or in equinox wiki or other documents


Sorry for my very late answer.
See http://wiki.eclipse.org/Equinox/RuntimeOptions
Hope this might help you

Stoyan
Previous Topic:[P2] Duplicating/Cloning/Sharing a P2 profile
Next Topic:External libraries
Goto Forum:
  


Current Time: Fri Apr 19 21:11:57 GMT 2024

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

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

Back to the top