[asterisk-bugs] [Asterisk 0019304]: [patch] Random entire asterisk deadlock when use builtin_atxfer when use res_timing_timerfd module

Asterisk Bug Tracker noreply at bugs.digium.com
Mon May 16 13:02:35 CDT 2011


A NOTE has been added to this issue. 
====================================================================== 
https://issues.asterisk.org/view.php?id=19304 
====================================================================== 
Reported By:                microlana
Assigned To:                
====================================================================== 
Project:                    Asterisk
Issue ID:                   19304
Category:                   Resources/res_timing_timerfd
Reproducibility:            sometimes
Severity:                   block
Priority:                   normal
Status:                     new
Asterisk Version:           1.8.4 
JIRA:                        
Regression:                 No 
Reviewboard Link:            
SVN Branch (only for SVN checkouts, not tarball releases): N/A 
SVN Revision (number only!):  
Request Review:              
====================================================================== 
Date Submitted:             2011-05-16 12:55 CDT
Last Modified:              2011-05-16 13:02 CDT
====================================================================== 
Summary:                    [patch] Random entire asterisk deadlock when use
builtin_atxfer when use res_timing_timerfd module
Description: 
Random entire asterisk deadlock when use builtin_atxfer when use
res_timing_timerfd module.

In this case impossible to create new channels and/or destruct existing
channels.

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

---------------------------------------------------------------------- 
 (0134983) microlana (reporter) - 2011-05-16 13:02
 https://issues.asterisk.org/view.php?id=19304#c134983 
---------------------------------------------------------------------- 
*** res_timing_timerfd.c.original       2011-05-16 20:52:09.840854809
+0400
--- res_timing_timerfd.c        2011-05-16 21:27:11.913926072 +0400
*************** static void timerfd_timer_ack(int handle
*** 163,174 ****
--- 163,189 ----
        int read_result = 0;
  
        do {
+               struct itimerspec timer_status;
+ 
+               if(timerfd_gettime(handle,&timer_status)) {
+                       ast_log(LOG_ERROR, "Call to timerfd_gettime()
error: %s\n", strerror(errno));
+                       expirations = 0;
+                       break;
+               }
+ 
+               if((timer_status.it_value.tv_sec == 0) &&
(timer_status.it_value.tv_nsec == 0)) {
+                       ast_log(LOG_ERROR, "Call to timerfd_timer_ack()
with disarmed timer - break now to avoiding deadlock!\n");
+                       expirations = 0;
+                       break;
+               }
+ 
                read_result = read(handle, &expirations,
sizeof(expirations));
                if (read_result == -1) {
                        if (errno == EINTR || errno == EAGAIN) {
                                continue;
                        } else {
                                ast_log(LOG_ERROR, "Read error: %s\n",
strerror(errno));
+                               expirations = 0;
                                break;
                        }
                } 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2011-05-16 13:02 microlana      Note Added: 0134983                          
======================================================================




More information about the asterisk-bugs mailing list