[asterisk-bugs] [JIRA] (ASTERISK-24286) Race condition in PBX core can cause missed device state changes
Matt Jordan (JIRA)
noreply at issues.asterisk.org
Wed Sep 3 09:28:29 CDT 2014
[ https://issues.asterisk.org/jira/browse/ASTERISK-24286?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Matt Jordan updated ASTERISK-24286:
-----------------------------------
Status: Open (was: Triage)
> Race condition in PBX core can cause missed device state changes
> ----------------------------------------------------------------
>
> Key: ASTERISK-24286
> URL: https://issues.asterisk.org/jira/browse/ASTERISK-24286
> Project: Asterisk
> Issue Type: Bug
> Security Level: None
> Components: PBX/General
> Affects Versions: 12.5.0, 13.0.0-beta1
> Reporter: Mark Michelson
>
> When the PBX core is notified of a device state change, instead of using the device state that is provided in the Stasis message, it instead finds hints that contain the device, then aggregates states of each of the devices in that hint using ast_device_state(). When two state changes are sent rapidly, both changes may get cached before the publishing thread calls into the PBX core to notify it of the first of the two state changes. Since both changes have been cached already, it means that the state set by the first state change is essentially "lost" since calling ast_device_state() will grab the state set by the second state change. When the PBX core handles the first state change, it ends up telling extension state watchers the state set by the second state change. When the second state change is handled by the PBX core, it does nothing since the new state is the same as the state that was last sent to watchers.
> The net result is not necessary erroneous because extension state watchers end up getting the correct final state communicated to them. Since most extension state watchers are interested in the final state, this likely will not cause issues for them. However, if there exist any extension state watchers that react to specific states occurring, and that state is the "lost" state, then this could be an issue.
--
This message was sent by Atlassian JIRA
(v6.2#6252)
More information about the asterisk-bugs
mailing list