Summary: | ASTERISK-15494: [patch] deadlock in app_queue with use_weight during reload | ||
Reporter: | Tim Ringenbach at Asteria Solutions Group (tim_ringenbach) | Labels: | |
Date Opened: | 2010-01-22 17:47:51.000-0600 | Date Closed: | 2010-03-11 09:34:26.000-0600 |
Priority: | Minor | Regression? | No |
Status: | Closed/Complete | Components: | Applications/app_queue |
Versions: | Frequency of Occurrence | ||
Related Issues: | |||
Environment: | Attachments: | ( 0) app_queue_use_weight_deadlock.diff | |
Description: | There's a deadlock possible in app_queue if the use_weight global variable is set, and someone reloads app_queue at the right point in time while a call is coming in. The call's thread locks the queue list lock, but doesn't unlock it, resulting in a dead lock when other threads try to do anything with the queue list. To reproduce easily, add a sleep() between the first if (use_weight) and grabbing the lock. I'll attach a patch that fixes the problem by using a local variable to store a copy of use_weight. | ||
Comments: | By: Digium Subversion (svnbot) 2010-02-10 11:44:21.000-0600 Repository: asterisk Revision: 246115 U branches/1.4/apps/app_queue.c ------------------------------------------------------------------------ r246115 | dvossel | 2010-02-10 11:44:20 -0600 (Wed, 10 Feb 2010) | 8 lines fixes random deadlock in app_queue with use_weight during reload (closes issue ASTERISK-15494) Reported by: tim_ringenbach Patches: app_queue_use_weight_deadlock.diff uploaded by tim ringenbach (license 540) ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=246115 By: Digium Subversion (svnbot) 2010-02-10 11:49:35.000-0600 Repository: asterisk Revision: 246116 _U trunk/ U trunk/apps/app_queue.c ------------------------------------------------------------------------ r246116 | dvossel | 2010-02-10 11:49:35 -0600 (Wed, 10 Feb 2010) | 14 lines Merged revisions 246115 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r246115 | dvossel | 2010-02-10 11:44:20 -0600 (Wed, 10 Feb 2010) | 8 lines fixes random deadlock in app_queue with use_weight during reload (closes issue ASTERISK-15494) Reported by: tim_ringenbach Patches: app_queue_use_weight_deadlock.diff uploaded by tim ringenbach (license 540) ........ ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=246116 By: Digium Subversion (svnbot) 2010-02-10 11:51:35.000-0600 Repository: asterisk Revision: 246117 _U branches/1.6.2/ U branches/1.6.2/apps/app_queue.c ------------------------------------------------------------------------ r246117 | dvossel | 2010-02-10 11:51:34 -0600 (Wed, 10 Feb 2010) | 21 lines Merged revisions 246116 via svnmerge from https://origsvn.digium.com/svn/asterisk/trunk ................ r246116 | dvossel | 2010-02-10 11:49:34 -0600 (Wed, 10 Feb 2010) | 14 lines Merged revisions 246115 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r246115 | dvossel | 2010-02-10 11:44:20 -0600 (Wed, 10 Feb 2010) | 8 lines fixes random deadlock in app_queue with use_weight during reload (closes issue ASTERISK-15494) Reported by: tim_ringenbach Patches: app_queue_use_weight_deadlock.diff uploaded by tim ringenbach (license 540) ........ ................ ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=246117 By: Digium Subversion (svnbot) 2010-02-10 11:52:49.000-0600 Repository: asterisk Revision: 246119 _U branches/1.6.1/ U branches/1.6.1/apps/app_queue.c ------------------------------------------------------------------------ r246119 | dvossel | 2010-02-10 11:52:49 -0600 (Wed, 10 Feb 2010) | 21 lines Merged revisions 246116 via svnmerge from https://origsvn.digium.com/svn/asterisk/trunk ................ r246116 | dvossel | 2010-02-10 11:49:34 -0600 (Wed, 10 Feb 2010) | 14 lines Merged revisions 246115 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r246115 | dvossel | 2010-02-10 11:44:20 -0600 (Wed, 10 Feb 2010) | 8 lines fixes random deadlock in app_queue with use_weight during reload (closes issue ASTERISK-15494) Reported by: tim_ringenbach Patches: app_queue_use_weight_deadlock.diff uploaded by tim ringenbach (license 540) ........ ................ ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=246119 By: Digium Subversion (svnbot) 2010-02-10 11:56:13.000-0600 Repository: asterisk Revision: 246122 _U branches/1.6.0/ U branches/1.6.0/apps/app_queue.c ------------------------------------------------------------------------ r246122 | dvossel | 2010-02-10 11:56:12 -0600 (Wed, 10 Feb 2010) | 21 lines Merged revisions 246116 via svnmerge from https://origsvn.digium.com/svn/asterisk/trunk ................ r246116 | dvossel | 2010-02-10 11:49:34 -0600 (Wed, 10 Feb 2010) | 14 lines Merged revisions 246115 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r246115 | dvossel | 2010-02-10 11:44:20 -0600 (Wed, 10 Feb 2010) | 8 lines fixes random deadlock in app_queue with use_weight during reload (closes issue ASTERISK-15494) Reported by: tim_ringenbach Patches: app_queue_use_weight_deadlock.diff uploaded by tim ringenbach (license 540) ........ ................ ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=246122 |