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

Asterisk Bug Tracker noreply at bugs.digium.com
Thu Dec 11 14:44:41 CST 2008


The following issue has been ASSIGNED. 
====================================================================== 
http://bugs.digium.com/view.php?id=13738 
====================================================================== 
Reported By:                smurfix
Assigned To:                russell
====================================================================== 
Project:                    Asterisk
Issue ID:                   13738
Category:                   Resources/General
Reproducibility:            always
Severity:                   major
Priority:                   normal
Status:                     assigned
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-12-11 14:44 CST
====================================================================== 
Summary:                    [patch] 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-12-11 14:44 file           Status                   confirmed => assigned
2008-12-11 14:44 file           Assigned To               => russell         
======================================================================




More information about the asterisk-bugs mailing list