summaryrefslogtreecommitdiff
path: root/main/uuid.c
diff options
context:
space:
mode:
authorMark Michelson <mmichelson@digium.com>2014-08-26 22:14:46 +0000
committerMark Michelson <mmichelson@digium.com>2014-08-26 22:14:46 +0000
commitc5ab4adf17f86a032688d36c075cb01e8fc130e1 (patch)
tree428486e5ff65d1fa67b13ebac98bb7cee4efdf92 /main/uuid.c
parentfefa6fba82e36a9dd0e1eab67c87345894cce14a (diff)
Fix race condition in the scheduler when deleting a running entry.
When scheduled tasks run, they are removed from the heap (or hashtab). When a scheduled task is deleted, if the task can't be found in the heap (or hashtab), an assertion is triggered. If DO_CRASH is enabled, this assertion causes a crash. The problem is, sometimes it just so happens that someone attempts to delete a scheduled task at the time that it is running, leading to a crash. This change corrects the issue by tracking which task is currently running. If that task is attempted to be deleted, then we mark the task, and then wait for the task to complete. This way, we can be sure to coordinate task deletion and memory freeing. ASTERISK-24212 Reported by Matt Jordan Review: https://reviewboard.asterisk.org/r/3927 ........ Merged revisions 422070 from http://svn.asterisk.org/svn/asterisk/branches/12 ........ Merged revisions 422071 from http://svn.asterisk.org/svn/asterisk/branches/13 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@422072 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'main/uuid.c')
0 files changed, 0 insertions, 0 deletions