[asterisk-bugs] [Asterisk 0015014]: Asterisk loses SIP phones, possible deadlock, 1.6.1.0

Asterisk Bug Tracker noreply at bugs.digium.com
Fri May 1 16:16:13 CDT 2009


A NOTE has been added to this issue. 
====================================================================== 
http://bugs.digium.com/view.php?id=15014 
====================================================================== 
Reported By:                madkins
Assigned To:                
====================================================================== 
Project:                    Asterisk
Issue ID:                   15014
Category:                   Channels/chan_sip/Interoperability
Reproducibility:            always
Severity:                   major
Priority:                   normal
Status:                     new
Asterisk Version:           1.6.1.0 
Regression:                 No 
SVN Branch (only for SVN checkouts, not tarball releases): N/A 
SVN Revision (number only!):  
Request Review:              
====================================================================== 
Date Submitted:             2009-05-01 11:03 CDT
Last Modified:              2009-05-01 16:16 CDT
====================================================================== 
Summary:                    Asterisk loses SIP phones, possible deadlock,
1.6.1.0
Description: 
I have two Cisco 7905g SIP phones connected to an Asterisk 1.6.1.0 instance
running on a 64 bit Xen instance of Debian 4.0.  My initial configuration
was more complex, but I've removed a lot of the complexity searching for
the problem.

Basically, I can start the Asterisk server and pick up a SIP phone and
call either a test extension or the other phone.  Works fine.  If I leave
it alone for a time ... say over a long lunch or overnight ... I come back
and the phones won't connect to Asterisk.

This repeats reliably but at unknown intervals.

====================================================================== 

---------------------------------------------------------------------- 
 (0104041) madkins (reporter) - 2009-05-01 16:16
 http://bugs.digium.com/view.php?id=15014#c104041 
---------------------------------------------------------------------- 
timing thread

  init_timing_thread starts do_timing as separate thread
  do_timing calls ao2_callback with run_timer as argument
> __ao2_callback locks pthread_timers container
  run_timer is called from __ao2_callback
> run_timer locks specific timer from pthread_timers container
  tries to write byte to timer pipe
  ...and hangs..

monitor thread

  sip_request_call and sip_reload invoke restart_monitor
  restart_monitor starts do_monitor if necessary
  do_monitor calls ast_io_wait with an io context
  ast_io_wait calls back to sipsock_read
  sipsock_read calls handle_request_do
> handle_request_do locks netlock
  handle_request_do calls handle_incoming
  handle_incoming calls handle_request_invite
  handle_request_invite calls sip_new
  sip_new calls ast_channel_alloc
  ast_channel_alloc calls ast_timer_open
> ast_timer_open locks timing_interfaces
  ast_timer_open invokes a callback on a data structure
    which (eventually) invokes pthread_timer_open
> pthread_timer_open attempts to lock pthread_timers
  ...and there we go...

i haven't been able to figure out why the pipe is not read ... i'm going
to instrument the code some and do more testing ... appreciate any comments 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2009-05-01 16:16 madkins        Note Added: 0104041                          
======================================================================




More information about the asterisk-bugs mailing list