[asterisk-commits] mmichelson: trunk r372092 - in /trunk: ./ apps/app_queue.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Thu Aug 30 15:54:55 CDT 2012
Author: mmichelson
Date: Thu Aug 30 15:54:51 2012
New Revision: 372092
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=372092
Log:
Prevent crash on shutdown due to refcount error on queues container.
When app_queue is unloaded, the queues container has its refcount
decremented, potentially to 0. Then the taskprocessor responsible
for handling device state changes is unreferenced. If the
taskprocessor happens to be just about to run its task, then it
will create and destroy an iterator on the queues container.
This can cause the refcount on the queues container to increase to
1 and then back to 0. Going back to 0 a second time results in
double frees.
This failure was seen periodically in the testsuite when Asterisk
would shut down.
........
Merged revisions 372089 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
Merged revisions 372090 from http://svn.asterisk.org/svn/asterisk/branches/10
........
Merged revisions 372091 from http://svn.asterisk.org/svn/asterisk/branches/11
Modified:
trunk/ (props changed)
trunk/apps/app_queue.c
Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-11-merged' - no diff available.
Modified: trunk/apps/app_queue.c
URL: http://svnview.digium.com/svn/asterisk/trunk/apps/app_queue.c?view=diff&rev=372092&r1=372091&r2=372092
==============================================================================
--- trunk/apps/app_queue.c (original)
+++ trunk/apps/app_queue.c Thu Aug 30 15:54:51 2012
@@ -9484,8 +9484,8 @@
queue_t_unref(q, "Done with iterator");
}
ao2_iterator_destroy(&q_iter);
+ devicestate_tps = ast_taskprocessor_unreference(devicestate_tps);
ao2_ref(queues, -1);
- devicestate_tps = ast_taskprocessor_unreference(devicestate_tps);
ast_unload_realtime("queue_members");
return res;
}
More information about the asterisk-commits
mailing list