Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
configadmin-1.2.0
-
None
Description
An issue reported in FELIX-1146 and presumably fixed in configadmin 1.2.0 is not really fixed: With the fix for 1.2.0 in Rev. 805668 the window for the race condition is much smaller than before, but it still exists:
Consider this:
T1. create and update configuration
ConfigurationImpl.update persists configuration and sets field
Thread preempted
T2. ManagedServiceUpdate constructor reads configuration
Uses configuration already persisted by T1 for update
Schedules task to update service with the configuration
T1. Runs again creating the UpdateConfiguration task with the
configuration persisted earlier
Schedules task to update service
UpdateTask:
updates ManagedService with configuration prepared by T2
updates ManagedService with configuration prepared by T1
In this small window a race condition occurred, which caused the ManagedService to be supplied with the same configuration twice. It would have been ok for the ManagedService to first get null (for the service registration and configuration not available yet) and in a second call to get the configuration. But it is not ok to get the same configuration twice.
Attachments
Issue Links
- is superceded by
-
FELIX-3231 Disable update counter
- Closed