felix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jad Naous <...@nerati.com>
Subject Re: IPOJO initialization + refresh deadlock
Date Sun, 23 Dec 2012 01:41:41 GMT
Thanks! I was building with java6. Don't know if that is the issue. Anyway,
I tested the snapshot, and looks like that fixes it.

Any idea when 4.1.0 will be released? Do you know if
http://svn.apache.org/viewvc?view=revision&revision=1421958 will apply
cleanly onto 4.0.3? Otherwise, how stable do you think is 4.1.0-SNAPSHOT?

Thanks!

Jad.



On Fri, Dec 21, 2012 at 6:49 AM, Richard S. Hall <heavy@ungoverned.org>wrote:

> It built fine for me. I'm was building with Java 7.
>
> Regardless, I deployed snapshots of framework, main, and
> main.distribution, so just grab what you want from the Apache snapshot repo
> to try it out.
>
> -> richard
>
>
> On 12/20/12 18:56 , Jad Naous wrote:
>
>> It does look like the same issue.
>>
>> Got the trunk/framework. mvn clean install gives:
>>
>> [INFO] --- maven-compiler-plugin:2.3.2:**compile (default-compile) @
>> org.apache.felix.framework ---
>> Dec 20, 2012 3:54:59 PM org.sonatype.guice.bean.**reflect.Logs$JULSink
>> warn
>> WARNING: Error injecting: org.apache.maven.plugin.**CompilerMojo
>> java.lang.**NoClassDefFoundError:
>> org/codehaus/plexus/compiler/**util/scan/**InclusionScanException
>>
>> Thanks,
>> jad.
>>
>>
>> On Thu, Dec 20, 2012 at 3:22 PM, Richard S. Hall <heavy@ungoverned.org
>> >wrote:
>>
>>  On 12/20/12 4:10 PM, Jad Naous wrote:
>>>
>>>  If a bundle undergoes a refresh while ipojo is still initializing
>>>> components, a deadlock can happen.  The issue is that if ipojo is
>>>> attempting to register a service, it will be doing it while
>>>> synchronizing
>>>> on the InstanceCreator instance. It will then try to register a service
>>>> which requires the framework's global lock.
>>>>
>>>>  Registering a service doesn't require a global, just a bundle lock. I
>>> think this could be related to:
>>>
>>>      https://issues.apache.org/****jira/browse/FELIX-3761<https://issues.apache.org/**jira/browse/FELIX-3761>
>>> <https:/**/issues.apache.org/jira/**browse/FELIX-3761<https://issues.apache.org/jira/browse/FELIX-3761>
>>> >
>>>
>>>
>>> This avoid grabbing the bundle lock when registering a service, so maybe
>>> it will help your situation. You could try to build the framework from
>>> trunk and see if it makes a difference.
>>>
>>> If you aren't able to build from trunk, let me know and I'll try to
>>> publish a snapshot build since I don't think we have a recent one (we
>>> should do this no matter what).
>>>
>>> -> richard
>>>
>>>
>>>
>>>  If a refresh is happening in another thread, the refresh will be holding
>>>> the framework's global lock, which will then call IPOJO's extender,
>>>> which
>>>> then attempts to call a method on InstanceCreator, hence leading to the
>>>> deadlock.
>>>>
>>>> Here are the stack traces:
>>>>
>>>> Daemon Thread [Thread-1] (Suspended)
>>>> Object.wait(long) line: not available [native method]
>>>> Object[](Object).wait() line: 485
>>>> Felix.acquireBundleLock(****BundleImpl, int) line: 4871
>>>> Felix.registerService(****BundleImpl, String[], Object, Dictionary)
>>>> line:
>>>> 3205
>>>> BundleContextImpl.****registerService(String[], Object, Dictionary)
>>>> line:
>>>> 346
>>>>
>>>> IPojoContext.registerService(****String[], Object, Dictionary) line:
>>>> 385
>>>> ProvidedService.****registerService() line: 362
>>>> ProvidedServiceHandler.__M_****stateChanged(int) line: 509
>>>> ProvidedServiceHandler.****stateChanged(int) line: not available
>>>>
>>>> InstanceManager.setState(int) line: 536
>>>> InstanceManager.start() line: 418
>>>> ComponentFactory.****createInstance(Dictionary, IPojoContext,
>>>> HandlerManager[])
>>>> line: 179
>>>>
>>>> ComponentFactory(IPojoFactory)****.createComponentInstance(****
>>>> Dictionary,
>>>> ServiceContext) line: 310
>>>> ComponentFactory(IPojoFactory)****.createComponentInstance(****
>>>> Dictionary)
>>>> line: 239
>>>> InstanceCreator$****ManagedInstance.create(****IPojoFactory) line: 355
>>>> InstanceCreator.addInstance(****Dictionary, long) line: 89
>>>> Extender.parse(Bundle, String) line: 306
>>>> Extender.startManagementFor(****Bundle) line: 237
>>>>
>>>> Extender.access$600(Extender, Bundle) line: 52
>>>> Extender$CreatorThread.run() line: 769
>>>> Thread.run() line: 662
>>>>
>>>> Daemon Thread [FelixFrameworkWiring] (Suspended)
>>>> InstanceCreator.****removeInstancesFromBundle(****long) line: 116
>>>> Extender.closeManagementFor(****Bundle) line: 171
>>>> Extender.bundleChanged(****BundleEvent) line: 153
>>>> EventDispatcher.****invokeBundleListenerCallback(****Bundle,
>>>> EventListener,
>>>> EventObject) line: 868
>>>> EventDispatcher.****fireEventImmediately(****EventDispatcher, int, Map,
>>>> EventObject, Dictionary) line: 789
>>>> EventDispatcher.****fireBundleEvent(BundleEvent, Framework) line: 514
>>>>
>>>> Felix.fireBundleEvent(int, Bundle) line: 4244
>>>> Felix.stopBundle(BundleImpl, boolean) line: 2351
>>>> Felix$RefreshHelper.stop() line: 4629
>>>> Felix.refreshPackages(****Collection, FrameworkListener[]) line: 3951
>>>>
>>>> FrameworkWiringImpl.run() line: 172
>>>> Thread.run() line: 662
>>>>
>>>>
>>>>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message