Comments (7)
Hi,
I've been able to reproduce the bug.
Does it happen from scratch or just when (re)starting the app/component with an existing configuration ?
The issue doesn't seem directly connected to ConfigAdmin: it's more likely a reentry in a service event handler that causes the lock.
The issue only occurs if ConfigAdmin is started after the managed services, seems like an internal dead lock there.
from ipopo.
So the issue is in ConfigurationAdmin._update
, when we wait for all notifications to have been sent.
If this occurs at the moment when ConfigurationAdmin is called by iPOPO in an event that starts it (validation, binding of a required service), then:
- iPOPO is locked until ConfigAdmin returns
- ConfigAdmin won't return until all managed services have been updated, knowing that updated occur in a separate thead.
But in this case, the managed service updates a property of a registered service, which means iPOPO will have to send events to notify listeners (from the thread start by ConfigAdmin).
And here is the lock: iPOPO is waiting for the ConfigAdmin instance to be available, which waits for its managed service to be updated.
The quick fix is to stop configadmin from waiting, but that could remove the ordering of update notifications in some cases.
from ipopo.
I've made an issue_114
branch that avoids this deadlock by calling the initial update in the iPOPO thread.
Could you try with that version?
from ipopo.
The branch issue_114
solves the problem. Also starting ConfigAdmin before managed services does work.
Thanks a lot!
from ipopo.
OK thanks for the feedback.
The preferred way is to start config admin first (I'll add a note in the doc).
I'll make the behaviour of the issue_114
branch configurable via a framework property to ensure retro-compatibility.
from ipopo.
I just realized this issue does still exist (deadlock in updated() method). Somehow occuring very rarely when accessing config-admin in the component validate function and setting the self._name property. Yes I am using the isse_114 branch.
I think there is some race condition still existing.
BR
from ipopo.
OK, I'll take a look into it this week
from ipopo.
Related Issues (20)
- Fix deadlock when stopping the core RSA service HOT 5
- Retry validation if it fails HOT 5
- AttributeError: 'Rest_API' object has no attribute '_RestDispatcher__routes' HOT 1
- RSA Xml-RCP Client not working HOT 4
- Always active Publisher bundle question HOT 4
- Error in when normalizing path of some modules
- Improvement HOT 16
- iPOPOv2 development HOT 16
- Autodoc not working on RtD ? HOT 1
- Add support for stdlib LogFormatter in LogService
- Manage components with ConfigurationAdmin HOT 1
- Cannot avoid creating configadmin 'conf' folder HOT 3
- i got an error, help me,how to HOT 1
- Replace Travis-CI by GitHub Actions HOT 1
- "No iPOPO service available" when running example from the doc HOT 1
- org.osgi.framework.uuid should be set on framework construction HOT 4
- Add ipopo decorator for dynamic validation HOT 17
- Finalize tests with RSA HOT 34
- @Requires decorator can be inherit HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ipopo.