[Home]

Summary:ASTERISK-17857: [patch] CCSS Crash introduced in new SVN [318867]
Reporter:Gregory Hinton Nietsky (irroot)Labels:
Date Opened:2011-05-13 09:13:00Date Closed:2011-05-17 09:39:21
Priority:BlockerRegression?Yes
Status:Closed/CompleteComponents:Core/CallCompletionSupplementaryServices
Versions:1.8.4 Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) chan_sip_reffix.patch
( 1) chan_sip_reffix2.patch
( 2) svn-dbg.txt
Description:Program terminated with signal 11, Segmentation fault.
#0  0x080955a5 in ast_cc_set_param (params=0xfc187c0, name=0x368 <Address 0x368 out of bounds>,
   value=0x1 <Address 0x1 out of bounds>) at ccss.c:385
385     ccss.c: No such file or directory.
       in ccss.c

****** ADDITIONAL INFORMATION ******

Ill look into it if i get a chance

Comments:By: Gregory Hinton Nietsky (irroot) 2011-05-13 09:24:41

#0  0x080955a5 in ast_cc_copy_config_params (dest=0x1072ff88, src=0x530) at ccss.c:414
414             return core_instance1->core_id == core_instance2->core_id ? CMP_MATCH | CMP_STOP : 0;
(gdb) bt
#0  0x080955a5 in ast_cc_copy_config_params (dest=0x1072ff88, src=0x530) at ccss.c:414
#1  0xb2f91e7d in check_peer_ok (p=0x1074b968, of=0xb24c2571 "0806", req=0xb24c2d1c, sipmethod=10, addr=0xb24c2c98,
   authpeer=0xb24c2898, reliable=XMIT_UNRELIABLE, calleridname=0xb24c252e "", uri2=0xb24c24e0 "sip:901@192.168.25.1:5060")
   at /mnt/x86_64/usr/src/voip/asterisk-svn/include/asterisk/netsock2.h:85
#2  0xb2f94359 in check_user_full (p=0x1074b968, req=0xb24c2d1c, sipmethod=10, uri=0xb1debcb6 "sip:901@192.168.25.1:5060",
   reliable=XMIT_UNRELIABLE, addr=0xb24c2c98, authpeer=0xb24c2898)
   at /mnt/x86_64/usr/src/voip/asterisk-svn/include/asterisk/netsock2.h:85
#3  0xb2fb85a6 in handle_request_subscribe (p=0x1074b968, req=0xb24c2d1c, addr=0xb24c2c98, seqno=24,
   e=0xb1debcb6 "sip:901@192.168.25.1:5060") at /mnt/x86_64/usr/src/voip/asterisk-svn/include/asterisk/netsock2.h:85
#4  0xb2fbacf0 in handle_incoming (p=0x1074b968, req=0xb24c2d1c, addr=0xb24c2c98, recount=0xb24c2c34, nounlock=0xb24c2c30)
   at /mnt/x86_64/usr/src/voip/asterisk-svn/include/asterisk/netsock2.h:85
ASTERISK-1  0xb2fbb5b3 in handle_request_do (req=0xb24c2d1c, addr=0xb24c2c98)
   at /mnt/x86_64/usr/src/voip/asterisk-svn/include/asterisk/netsock2.h:85
ASTERISK-2  0xb2fbb1cd in sipsock_read (id=0x106dfd18, fd=14, events=1, ignore=0x0)
   at /mnt/x86_64/usr/src/voip/asterisk-svn/include/asterisk/netsock2.h:85
ASTERISK-3  0x0810b6e4 in ast_io_wait (ioc=0xb3aef038, howlong=96) at io.c:218
ASTERISK-4  0xb2fbcb6a in do_monitor (data=0x0) at /mnt/x86_64/usr/src/voip/asterisk-svn/include/asterisk/netsock2.h:85
ASTERISK-5  0x0818736a in dummy_start (data=0xb2301908) at /mnt/x86_64/usr/src/voip/asterisk-svn/include/asterisk/time.h:45
ASTERISK-6 0xb747fafe in start_thread (arg=0xb24c3b70) at allocatestack.c:1013
ASTERISK-7 0xb676264e in clone () at fstab.c:170

By: Gregory Hinton Nietsky (irroot) 2011-05-15 06:51:46

reverting r318549 resolves

By: Gregory Hinton Nietsky (irroot) 2011-05-15 11:02:39

Suspicions were right this patch reverts a hunk in the above and solves my problem ....

By: Gregory Hinton Nietsky (irroot) 2011-05-15 11:05:57

related to 19296 AFAIK

By: Gregory Hinton Nietsky (irroot) 2011-05-15 11:14:24

perhaps this is a realtime cached peer problem ?? that this unref added should only be used on non realtime peers ??

By: Gregory Hinton Nietsky (irroot) 2011-05-15 12:09:06

ok better solution ...

By: Gregory Hinton Nietsky (irroot) 2011-05-15 12:09:54

ooops too soon it still bombs out

By: Leif Madsen (lmadsen) 2011-05-16 14:31:33

Please retest the 1.8 branch after revision 319145 (Fixes issue with peer ref-counting during handle_request_subscribe.)

It looks like your patch was really close, but was missing an important part. The issue may now be resolved. I would love to get some feedback today if possible. Thanks!

By: David Vossel (dvossel) 2011-05-16 14:32:37

Your second patch is really close, but it doesn't account for the fact that authpeer is not set to NULL a few lines up when it is unreffed during Event: dialog processing. Because of that authpeer is not NULL and gets unreffed twice.  I fixed this in 1.8 earlier today.

By: Gregory Hinton Nietsky (irroot) 2011-05-17 00:50:54

thx guys playing timezone tag ill try it out a bit latter this morning

By: Gregory Hinton Nietsky (irroot) 2011-05-17 02:48:58

Ok dedication like this only comes in dogs ... sitting at breakfast testing the office remotely ... looks great ...

Close ...

By: Leif Madsen (lmadsen) 2011-05-17 07:21:03

Awesome thanks! I think I'm going to get dvossel to update the commit msg so this issue is closed as well. Thanks!

By: Digium Subversion (svnbot) 2011-05-17 09:38:10

Repository: asterisk
Revision: 319144

U   branches/1.6.2/channels/chan_sip.c

------------------------------------------------------------------------
r319144 | dvossel | 2011-05-16 10:56:16 -0500 (Mon, 16 May 2011) | 5 lines

Fixes issue with peer ref-counting during handle_request_subscribe.

(closes issue ASTERISK-17857)
Reported by: irroot

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=319144

By: Digium Subversion (svnbot) 2011-05-17 09:38:52

Repository: asterisk
Revision: 319145

_U  branches/1.8/
U   branches/1.8/channels/chan_sip.c

------------------------------------------------------------------------
r319145 | dvossel | 2011-05-16 10:57:26 -0500 (Mon, 16 May 2011) | 12 lines

Merged revisions 319144 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.6.2

........
 r319144 | dvossel | 2011-05-16 10:56:16 -0500 (Mon, 16 May 2011) | 2 lines
 
 Fixes issue with peer ref-counting during handle_request_subscribe.

 (closes issue ASTERISK-17857)
 Reported by: irroot
........

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=319145

By: Digium Subversion (svnbot) 2011-05-17 09:39:21

Repository: asterisk
Revision: 319146

_U  trunk/
U   trunk/channels/chan_sip.c

------------------------------------------------------------------------
r319146 | dvossel | 2011-05-16 10:58:12 -0500 (Mon, 16 May 2011) | 18 lines

Merged revisions 319145 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

................
 r319145 | dvossel | 2011-05-16 10:57:26 -0500 (Mon, 16 May 2011) | 9 lines
 
 Merged revisions 319144 via svnmerge from
 https://origsvn.digium.com/svn/asterisk/branches/1.6.2
 
 ........
   r319144 | dvossel | 2011-05-16 10:56:16 -0500 (Mon, 16 May 2011) | 2 lines
   
   Fixes issue with peer ref-counting during handle_request_subscribe.
   (closes issue ASTERISK-17857)
   Reported by: irroot
 ........
................

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=319146