[asterisk-bugs] [Asterisk 0013738]: Event processing sometimes hangs when using res_timing_pthread

Asterisk Bug Tracker noreply at bugs.digium.com
Sat Oct 18 15:12:17 CDT 2008


The following issue has been SUBMITTED. 
====================================================================== 
http://bugs.digium.com/view.php?id=13738 
====================================================================== 
Reported By:                smurfix
Assigned To:                
====================================================================== 
Project:                    Asterisk
Issue ID:                   13738
Category:                   Resources/General
Reproducibility:            always
Severity:                   major
Priority:                   normal
Status:                     new
Asterisk Version:           SVN 
SVN Branch (only for SVN checkouts, not tarball releases): 1.6.1 
SVN Revision (number only!):  
Disclaimer on File?:        N/A 
Request Review:              
====================================================================== 
Date Submitted:             2008-10-18 15:12 CDT
Last Modified:              2008-10-18 15:12 CDT
====================================================================== 
Summary:                    Event processing sometimes hangs when using
res_timing_pthread
Description: 
There's a bug in the pthread timing code which sometimes blocks event
processing.

Triggered thus:
* queue event to channel (DTMF for instance).
  pthread_timer_enable_continuous() gets called.
* Set an explicit rate (play dial tone). State switches to
TIMER_STATE_TICKING.
* Drop the rate (stop playing). State switches to TIMER_STATE_IDLE.
* Since the continuous timeout has thus been disabled, even though
  pthread_timer_disable_continuous() has never been called, the
unprocessed
  events (digits for overlap dialing) languish in the channel.

Fix:
* Setting an explicit rate just remembers the intended rate when the
  timer state is TIMER_STATE_CONTINUOUS.
* pthread_timer_disable_continuous() restores that rate.


Patch attached, probably applicable to 1.6.0 and trunk.
====================================================================== 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2008-10-18 15:12 smurfix        Asterisk Version          => SVN             
2008-10-18 15:12 smurfix        SVN Branch (only for SVN checkouts, not tarball
releases) => 1.6.1           
======================================================================




More information about the asterisk-bugs mailing list