[
https://issues.apache.org/jira/browse/FELIX-4977?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Carsten Ziegeler closed FELIX-4977.
-----------------------------------
> Concurrency issue with factory services
> ---------------------------------------
>
> Key: FELIX-4977
> URL: https://issues.apache.org/jira/browse/FELIX-4977
> Project: Felix
> Issue Type: Bug
> Components: Framework
> Affects Versions: framework-5.0.1
> Reporter: Carsten Ziegeler
> Assignee: David Bosschaert
> Fix For: framework-5.2.0
>
>
> It seems there is a chance that a service object returned for a factory
> service is already unget. The scenario is like this:
> Two threads from the same bundle get the same service which happens to be a
> service factory.
> While the first thread calls already ungetService, the second thread is in
> the getService method. The second service gets the same object as the first
> one, but as the first one passed "successfully" through ungetService, the
> object is unget and - depending on how its implemented - not usable anymore.
> After some analysis together with David, it seems that both threads get the
> same usage count object, the ungetService thread decreases the count to zero
> before the getService thread increases it.
> Therefore the service object is unget but at the same returned to the next
> client
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)