[asterisk-bugs] [Asterisk 0015349]: Deadlock in do_monitor() of chan_sip

Asterisk Bug Tracker noreply at bugs.digium.com
Mon Jun 22 09:35:38 CDT 2009


A NOTE has been added to this issue. 
====================================================================== 
https://issues.asterisk.org/view.php?id=15349 
====================================================================== 
Reported By:                samy
Assigned To:                mmichelson
====================================================================== 
Project:                    Asterisk
Issue ID:                   15349
Category:                   Channels/chan_sip/General
Reproducibility:            have not tried
Severity:                   major
Priority:                   normal
Status:                     closed
Asterisk Version:           1.6.0.10 
Regression:                 No 
SVN Branch (only for SVN checkouts, not tarball releases): N/A 
SVN Revision (number only!):  
Request Review:              
Resolution:                 fixed
Fixed in Version:           
====================================================================== 
Date Submitted:             2009-06-17 22:08 CDT
Last Modified:              2009-06-22 09:35 CDT
====================================================================== 
Summary:                    Deadlock in do_monitor() of chan_sip
Description: 
Unfortunately I have no steps to reproduce this. Had about 30 calls going
through, all calls are SIP, and randomly ran into a SIP deadlock (`sip show
channels` would cause console to hang, no new SIP calls would begin).

It sort of looks like `dialoglist` is an infinite loop (every member
points to at least one other member, there is never a ->next that points to
null), but I don't see how that could happen in the code so I'm not sure.

I did get `core show locks` output a few times, and I have a modified
version that provides the time of the last time each lock was
locked/unlocked. This is interesting because we can see lock
https://issues.asterisk.org/view.php?id=0 never
changes and is held for multiple minutes before I restart, but lock
https://issues.asterisk.org/view.php?id=1
changes constantly.

The fact that lock https://issues.asterisk.org/view.php?id=1 (lock on
dialog->sip_pvt) is constantly changing in
do_monitor makes me think `dialoglist` is an infinite loop.
====================================================================== 

---------------------------------------------------------------------- 
 (0106799) svnbot (reporter) - 2009-06-22 09:35
 https://issues.asterisk.org/view.php?id=15349#c106799 
---------------------------------------------------------------------- 
Repository: asterisk
Revision: 202338

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

------------------------------------------------------------------------
r202338 | mmichelson | 2009-06-22 09:35:35 -0500 (Mon, 22 Jun 2009) | 38
lines

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

................
  r202337 | mmichelson | 2009-06-22 09:35:09 -0500 (Mon, 22 Jun 2009) | 31
lines
  
  Merged revisions 202336 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.4
  
  ........
    r202336 | mmichelson | 2009-06-22 09:34:05 -0500 (Mon, 22 Jun 2009) |
25 lines
    
    Fix a possible infinite loop in SDP parsing during glare situation.
    
    There was a while loop in get_ip_and_port_from_sdp which was
controlled
    by a call to get_sdp_iterate. The loop would exit either if what we
were
    searching for was found or if the return was NULL. The problem is that
    get_sdp_iterate never returns NULL. This means that if what we were
searching
    for was not present, the loop would run infinitely. This modification
of the
    loop fixes the problem.
    
    (closes issue https://issues.asterisk.org/view.php?id=15213)
    Reported by: schmidts
    
    (closes issue https://issues.asterisk.org/view.php?id=15349)
    Reported by: samy
    
    (closes issue https://issues.asterisk.org/view.php?id=14464)
    Reported by: pj
    
    (closes issue https://issues.asterisk.org/view.php?id=15345)
    Reported by: aragon
    Patches:
          sip_inf_loop.patch uploaded by mmichelson (license 60)
    Tested by: aragon
  ........
................

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

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

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2009-06-22 09:35 svnbot         Checkin                                      
2009-06-22 09:35 svnbot         Note Added: 0106799                          
======================================================================




More information about the asterisk-bugs mailing list