Summary: | ASTERISK-14904: [patch] Segmentation fault in queue_cmp_cb | ||
Reporter: | Atis Lezdins (atis) | Labels: | |
Date Opened: | 2009-09-29 06:33:23 | Date Closed: | 2009-12-04 08:11:56.000-0600 |
Priority: | Critical | Regression? | No |
Status: | Closed/Complete | Components: | Applications/app_queue |
Versions: | Frequency of Occurrence | ||
Related Issues: | |||
Environment: | Attachments: | ( 0) 20091105__issue15982.diff.txt ( 1) 20091111__issue15982.diff.txt ( 2) bt.asterisk-dev-mc-2009-09-28T09:18:45-0700.32449.txt ( 3) bt.asterisk-dev-mc-2009-11-06T14:36:54+0200.28272.txt ( 4) queue_strcmp.patch | |
Description: | I had this crash once, i'm not sure what's the cause of it, but maybe it's good to add check for ast_strlen_zero within queue_cmp_cb? ****** ADDITIONAL INFORMATION ****** # 1 0x00002aaabc83058b in queue_cmp_cb (obj=0xa27d90, arg=0x40d87c40, flags=8) at app_queue.c:600 # 2 0x0000000000442601 in __ao2_callback (c=0x9c38e0, flags=OBJ_POINTER, cb_fn=0x2aaabc830553 <queue_cmp_cb>, arg=0x40d87c40, tag=0x0, file=0x0, line=0, funcname=0x0) at astobj2.c:636 # 3 0x0000000000442960 in _ao2_callback (c=0x9c38e0, flags=OBJ_POINTER, cb_fn=0x2aaabc830553 <queue_cmp_cb>, arg=0x40d87c40) at astobj2.c:712 # 4 0x00000000004429ee in _ao2_find (c=0x9c38e0, arg=0x40d87c40, flags=OBJ_POINTER) at astobj2.c:725 # 5 0x00002aaabc8372cb in load_realtime_queue (queuename=0x40d87f13 "22901") at app_queue.c:1602 | ||
Comments: | By: Tilghman Lesher (tilghman) 2009-11-05 15:10:27.000-0600 While you're correct that the string comparison would fix this particular crash, what that patch does is to mask the actual problem, which is likely incorrect reference counts. While inserting debugging statements, I found a few likely candidates, which are now fixed in this patch. Please test and report back results. By: Atis Lezdins (atis) 2009-11-06 09:37:25.000-0600 I think latest backtrace is related to this. Running r228147 + 20091105__issue16013.diff.txt + 20091105__issue15982.diff.txt # 0 0x0000003a41e42ed8 in _IO_vfprintf_internal (s=0x2aaac42f6510, format=0x575210 "%p %s%d %s:%d:%s (%s) [@%d]\n", ap=0x40c90a60) at vfprintf.c:1298 # 1 0x0000003a41e4c9f8 in __fprintf (stream=0x40c90930, format=0x3a42a0e4f0 "H\213\227\210") at fprintf.c:33 # 2 0x00000000004416c4 in _ao2_ref_debug (user_data=0x2aaaad966330, delta=1, tag=0x2aaabc84e924 "", file=0x2aaabc84cd34 "app_queue.c", line=2107, funcname=0x2aaabc84f9b0 "num_available_members") at astobj2.c:233 By: Tilghman Lesher (tilghman) 2009-11-06 10:33:26.000-0600 Please attach the /tmp/refs file. By: Tilghman Lesher (tilghman) 2009-11-11 11:02:13.000-0600 Okay, new patch uploaded. This should hopefully filter out all the member counts, which are not germane to the issue here and make the resulting refs file much smaller. By: Tilghman Lesher (tilghman) 2009-11-24 10:09:01.000-0600 Given the lack of response, sounds like this patch has solved the issue. By: Digium Subversion (svnbot) 2009-11-24 14:38:27.000-0600 Repository: asterisk Revision: 231134 U trunk/apps/app_queue.c ------------------------------------------------------------------------ r231134 | tilghman | 2009-11-24 14:38:27 -0600 (Tue, 24 Nov 2009) | 7 lines Found a few places where queue refcounts were counted incorrectly. Also add debug statements. (closes issue ASTERISK-14904, closes issue ASTERISK-14906) Reported by: atis Patches: 20091111__issue15982.diff.txt uploaded by tilghman (license 14) Tested by: atis ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=231134 By: Digium Subversion (svnbot) 2009-11-24 14:42:02.000-0600 Repository: asterisk Revision: 231135 _U branches/1.6.1/ U branches/1.6.1/apps/app_queue.c ------------------------------------------------------------------------ r231135 | tilghman | 2009-11-24 14:42:01 -0600 (Tue, 24 Nov 2009) | 14 lines Merged revisions 231134 via svnmerge from https://origsvn.digium.com/svn/asterisk/trunk ........ r231134 | tilghman | 2009-11-24 14:31:28 -0600 (Tue, 24 Nov 2009) | 7 lines Found a few places where queue refcounts were counted incorrectly. Also add debug statements. (closes issue ASTERISK-14904, closes issue ASTERISK-14906) Reported by: atis Patches: 20091111__issue15982.diff.txt uploaded by tilghman (license 14) Tested by: atis ........ ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=231135 By: Digium Subversion (svnbot) 2009-11-24 14:43:00.000-0600 Repository: asterisk Revision: 231136 _U branches/1.6.2/ U branches/1.6.2/apps/app_queue.c ------------------------------------------------------------------------ r231136 | tilghman | 2009-11-24 14:43:00 -0600 (Tue, 24 Nov 2009) | 14 lines Merged revisions 231134 via svnmerge from https://origsvn.digium.com/svn/asterisk/trunk ........ r231134 | tilghman | 2009-11-24 14:31:28 -0600 (Tue, 24 Nov 2009) | 7 lines Found a few places where queue refcounts were counted incorrectly. Also add debug statements. (closes issue ASTERISK-14904, closes issue ASTERISK-14906) Reported by: atis Patches: 20091111__issue15982.diff.txt uploaded by tilghman (license 14) Tested by: atis ........ ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=231136 |