[Home]

Summary:ASTERISK-17859: chan_sip crashes since changes in rev. 318549
Reporter:Holger Hornung (netview)Labels:
Date Opened:2011-05-14 02:44:11Date Closed:2011-05-16 07:56:57
Priority:CriticalRegression?No
Status:Closed/CompleteComponents:Channels/chan_sip/Registration
Versions:1.8.4 Frequency of
Occurrence
Related
Issues:
Environment:Attachments:
Description:I use Grandstream phones like gxp2000/2020 with hints. Now, after 318549 applied hints are rejected:

chan_sip.c:23653 handle_request_subscribe: Sending fake auth rejection for device "asterisk" <sip:gxp2000@asterisk.mydomain.de>;tag=323a74e9f74cb2ce

If 'subscribecontext=' is set under peer, chan_sip crashes if the phones requests hint-updates.

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

If I restart chan_sip with subscribecontext= the following messages where shown before the crash:

[2011-05-14 09:40:12] WARNING[3630]: chan_sip.c:2819 peer_sched_cleanup: Unable to cancel schedule ID 0.  This is probably a bug (chan_sip.c: peer_sched_cleanup, line 2819).
[2011-05-14 09:40:12] ERROR[3630]: astobj2.c:116 INTERNAL_OBJ: bad magic number 0x0 for 0xfaed40
[2011-05-14 09:40:12] WARNING[3630]: chan_sip.c:2823 peer_sched_cleanup: Unable to cancel schedule ID 0.  This is probably a bug (chan_sip.c: peer_sched_cleanup, line 2823).
[2011-05-14 09:40:12] ERROR[3630]: astobj2.c:116 INTERNAL_OBJ: bad magic number 0x0 for 0xfaed40
[2011-05-14 09:40:12] ERROR[3630]: astobj2.c:116 INTERNAL_OBJ: bad magic number 0x0 for 0xfaed40
[2011-05-14 09:40:12] WARNING[3630]: chan_sip.c:2819 peer_sched_cleanup: Unable to cancel schedule ID 65535.  This is probably a bug (chan_sip.c: peer_sched_cleanup, line 2819).
[2011-05-14 09:40:12] WARNING[3630]: chan_sip.c:2823 peer_sched_cleanup: Unable to cancel schedule ID 0.  This is probably a bug (chan_sip.c: peer_sched_cleanup, line 2823).
[2011-05-14 09:40:12] ERROR[3630]: astobj2.c:258 internal_ao2_ref: refcount -1 on object 0xfae158
Comments:By: Gregory Hinton Nietsky (irroot) 2011-05-14 03:35:48

maybe ASTERISK-17857

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

please try hack @ ASTERISK-17857 it sorted out the issue out

By: Holger Hornung (netview) 2011-05-15 11:37:54

I think patch 'chan_sip_reffix.patch' @0019293 is the solution!
Hints are working and chan_sip didn't crash anymore - thanks!

By: Gregory Hinton Nietsky (irroot) 2011-05-15 12:08:27

ok thx for the feedback i have now replaced the "hack" patch with a better solution please verify it if you could ....

basically check for null before unref this still works for me ...

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

ok this does not sort it out back to v.1

By: Holger Hornung (netview) 2011-05-15 12:27:26

The new fix 'chan_sip_reffix2.patch' is bad!

hints didn't work:
NOTICE[10469]: chan_sip.c:23653 handle_request_subscribe: Sending fake auth rejection for device "asterisk" <sip:gxp2000@asterisk.hhornung.de>;tag=677d0ae6d700b540
...

and a sip reload results in:
asterisk*CLI> sip reload
Reloading SIP
[2011-05-15 19:24:51] ERROR[10469]: astobj2.c:116 INTERNAL_OBJ: bad magic number 0x0 for 0x23c03a0
[2011-05-15 19:24:51] ERROR[10469]: astobj2.c:116 INTERNAL_OBJ: bad magic number 0x0 for 0x23c03a0
[2011-05-15 19:24:51] ERROR[10469]: astobj2.c:116 INTERNAL_OBJ: bad magic number 0x0 for 0x23c03a0
[2011-05-15 19:24:51] ERROR[10469]: astobj2.c:116 INTERNAL_OBJ: bad magic number 0x0 for 0x23c03a0
[2011-05-15 19:24:51] ERROR[10469]: astobj2.c:116 INTERNAL_OBJ: bad magic number 0x0 for 0x23c03a0
[2011-05-15 19:24:52] ERROR[10469]: astobj2.c:116 INTERNAL_OBJ: bad magic number 0x0 for 0x23c03a0

but no crash of chan_sip.

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

yeah i have gone back to V.1 thx for the help at least we now know where the problem has crept in ...