felix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Bosschaert (JIRA)" <j...@apache.org>
Subject [jira] [Work started] (FELIX-4977) Concurrency issue with factory services
Date Wed, 29 Jul 2015 14:57:04 GMT

     [ https://issues.apache.org/jira/browse/FELIX-4977?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel

Work on FELIX-4977 started by David Bosschaert.
> 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.0.2
> 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

View raw message