[Home]

Summary:ASTERISK-14533: [patch] crash in chanspy on hangup - locked mutex '&chanspy_ds.lock'
Reporter:Alan Graham (zerohalo)Labels:
Date Opened:2009-07-27 11:24:53Date Closed:2009-11-10 16:15:20.000-0600
Priority:CriticalRegression?No
Status:Closed/CompleteComponents:Applications/app_chanspy
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) 20090820__issue15588.diff.txt
( 1) bt_scrubbed.txt
Description:random crash in 1.4.24.1 CLI below, bt attached.

-- Packet2Packet bridging SIP/XXXX-XXXX-0a39f098 and
SIP/gateway1-0949da50
-- <SIP/XX.XX.XX.XX-b7c008f8> Playing 'digits/6' (language
'en')
-- <SIP/XX.XX.XX.XX-b7dbcb80> Playing 'beep' (language
'en')
-- Nobody picked up in 25000 ms
== Done Spying on channel SIP/XXXX-XXXX-0957f6b8
[Jul 27 10:36:21] ERROR[7010]:
/usr/src/asterisk/asterisk-1.4.24/include/asterisk/lock.h:320
__ast_pthread_mutex_destroy: app_chanspy.c line 683 (common_exec):
Error: attempt to destroy locked mutex '&chanspy_ds.lock'.
Comments:By: Leif Madsen (lmadsen) 2009-08-20 15:01:34

Assigned to Tilghman to review the backtrace in the hopes this may be a simple issue to resolve. Thanks!

By: Alan Graham (zerohalo) 2009-08-24 08:38:31

will test this patch this evening.

By: Leif Madsen (lmadsen) 2009-08-25 11:35:33

Trying to reproduce this issue. Can you provide the sip.conf and dialplan? Also, the call flow could be handy here.

Although if you can test this issue yourself and report back, that'd be even better :)

By: Alan Graham (zerohalo) 2009-08-31 09:23:46

I'm unable to reproduce the issue with or without the patch. This was a call delivered from a queue and ChanSpy(FULLPEERNAME,q) - it appears that the channel was spied twice and spy ended before channel was hung up. I'm still trying to find a way to reproduce this.

By: Alan Graham (zerohalo) 2009-09-08 11:54:48

Unable to reproduce this with the patch. Had one crash without the patch after a few weeks of uptime, so I think this can be considered fixed.

By: Leif Madsen (lmadsen) 2009-09-08 12:24:50

Marking this as Ready for Review so Tilghman can determine what he wishes to do with this. I can't seem to reproduce (and either can the reporter) -- but he isn't getting the issue anymore with the patch.

By: Digium Subversion (svnbot) 2009-11-09 08:21:54.000-0600

Repository: asterisk
Revision: 228827

U   branches/1.4/include/asterisk/lock.h

------------------------------------------------------------------------
r228827 | mnicholson | 2009-11-09 08:21:53 -0600 (Mon, 09 Nov 2009) | 8 lines

Perform limited bounds checking when destroying ast_mutex_t structures to make sure we don't try to use negative indices.

(closes issue ASTERISK-14533)
Reported by: zerohalo
Patches:
     20090820__issue15588.diff.txt uploaded by tilghman (license 14)
Tested by: zerohalo

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

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

By: Digium Subversion (svnbot) 2009-11-09 08:42:57.000-0600

Repository: asterisk
Revision: 228858

_U  trunk/
U   trunk/include/asterisk/lock.h

------------------------------------------------------------------------
r228858 | mnicholson | 2009-11-09 08:42:56 -0600 (Mon, 09 Nov 2009) | 15 lines

Merged revisions 228827 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
 r228827 | mnicholson | 2009-11-09 08:16:03 -0600 (Mon, 09 Nov 2009) | 8 lines
 
 Perform limited bounds checking when destroying ast_mutex_t structures to make sure we don't try to use negative indices.
 
 (closes issue ASTERISK-14533)
 Reported by: zerohalo
 Patches:
       20090820__issue15588.diff.txt uploaded by tilghman (license 14)
 Tested by: zerohalo
........

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

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

By: Digium Subversion (svnbot) 2009-11-09 08:54:45.000-0600

Repository: asterisk
Revision: 228859

_U  branches/1.6.2/
U   branches/1.6.2/include/asterisk/lock.h

------------------------------------------------------------------------
r228859 | mnicholson | 2009-11-09 08:54:45 -0600 (Mon, 09 Nov 2009) | 22 lines

Merged revisions 228858 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

................
 r228858 | mnicholson | 2009-11-09 08:37:07 -0600 (Mon, 09 Nov 2009) | 15 lines
 
 Merged revisions 228827 via svnmerge from
 https://origsvn.digium.com/svn/asterisk/branches/1.4
 
 ........
   r228827 | mnicholson | 2009-11-09 08:16:03 -0600 (Mon, 09 Nov 2009) | 8 lines
   
   Perform limited bounds checking when destroying ast_mutex_t structures to make sure we don't try to use negative indices.
   
   (closes issue ASTERISK-14533)
   Reported by: zerohalo
   Patches:
         20090820__issue15588.diff.txt uploaded by tilghman (license 14)
   Tested by: zerohalo
 ........
................

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

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

By: Digium Subversion (svnbot) 2009-11-09 09:00:15.000-0600

Repository: asterisk
Revision: 228860

_U  branches/1.6.1/
U   branches/1.6.1/include/asterisk/lock.h

------------------------------------------------------------------------
r228860 | mnicholson | 2009-11-09 09:00:14 -0600 (Mon, 09 Nov 2009) | 22 lines

Merged revisions 228858 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

................
 r228858 | mnicholson | 2009-11-09 08:37:07 -0600 (Mon, 09 Nov 2009) | 15 lines
 
 Merged revisions 228827 via svnmerge from
 https://origsvn.digium.com/svn/asterisk/branches/1.4
 
 ........
   r228827 | mnicholson | 2009-11-09 08:16:03 -0600 (Mon, 09 Nov 2009) | 8 lines
   
   Perform limited bounds checking when destroying ast_mutex_t structures to make sure we don't try to use negative indices.
   
   (closes issue ASTERISK-14533)
   Reported by: zerohalo
   Patches:
         20090820__issue15588.diff.txt uploaded by tilghman (license 14)
   Tested by: zerohalo
 ........
................

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

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

By: Digium Subversion (svnbot) 2009-11-09 09:04:32.000-0600

Repository: asterisk
Revision: 228861

_U  branches/1.6.0/
U   branches/1.6.0/include/asterisk/lock.h

------------------------------------------------------------------------
r228861 | mnicholson | 2009-11-09 09:04:32 -0600 (Mon, 09 Nov 2009) | 22 lines

Merged revisions 228858 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

................
 r228858 | mnicholson | 2009-11-09 08:37:07 -0600 (Mon, 09 Nov 2009) | 15 lines
 
 Merged revisions 228827 via svnmerge from
 https://origsvn.digium.com/svn/asterisk/branches/1.4
 
 ........
   r228827 | mnicholson | 2009-11-09 08:16:03 -0600 (Mon, 09 Nov 2009) | 8 lines
   
   Perform limited bounds checking when destroying ast_mutex_t structures to make sure we don't try to use negative indices.
   
   (closes issue ASTERISK-14533)
   Reported by: zerohalo
   Patches:
         20090820__issue15588.diff.txt uploaded by tilghman (license 14)
   Tested by: zerohalo
 ........
................

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

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