[asterisk-bugs] [Asterisk 0014697]: race condition in res/timing_* interfaces

Asterisk Bug Tracker noreply at bugs.digium.com
Fri Mar 27 14:17:24 CDT 2009


A NOTE has been added to this issue. 
====================================================================== 
http://bugs.digium.com/view.php?id=14697 
====================================================================== 
Reported By:                moy
Assigned To:                kpfleming
====================================================================== 
Project:                    Asterisk
Issue ID:                   14697
Category:                   Resources/General
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     closed
Asterisk Version:           SVN 
Regression:                 No 
SVN Branch (only for SVN checkouts, not tarball releases):  trunk 
SVN Revision (number only!): 183101 
Request Review:              
Resolution:                 fixed
Fixed in Version:           
====================================================================== 
Date Submitted:             2009-03-18 23:12 CDT
Last Modified:              2009-03-27 14:17 CDT
====================================================================== 
Summary:                    race condition in res/timing_* interfaces
Description: 
While doing some testing with trunk it seems I hit a race condition where
ast_timer_open() is being called and handled by the DAHDI timing interface,
but then before ast_timer_ack gets called, another timing interface gets
registered and when ast_timer_ack gets called the timerfd interface handles
the call and the file descriptor is therefore not valid for that module (in
this case the resulting error is invalid argument.
====================================================================== 

---------------------------------------------------------------------- 
 (0102308) svnbot (reporter) - 2009-03-27 14:17
 http://bugs.digium.com/view.php?id=14697#c102308 
---------------------------------------------------------------------- 
Repository: asterisk
Revision: 184765

_U  branches/1.6.1/
U   branches/1.6.1/channels/chan_iax2.c
U   branches/1.6.1/include/asterisk/channel.h
U   branches/1.6.1/include/asterisk/timing.h
U   branches/1.6.1/main/channel.c
U   branches/1.6.1/main/timing.c

------------------------------------------------------------------------
r184765 | kpfleming | 2009-03-27 14:17:24 -0500 (Fri, 27 Mar 2009) | 18
lines

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

........
  r184762 | kpfleming | 2009-03-27 14:10:32 -0500 (Fri, 27 Mar 2009) | 12
lines
  
  Improve timing interface to remember which provider provided a timer
  
  The ability to load/unload timing interfaces is nice, but it means that
when a timer is allocated, it may come from provider A, but later provider
B becomes the 'preferred' provider. If this happens, all timer API calls on
the timer that was provided by provider A will actually be handed to
provider B, which will say WTF and return an error.
  
  This patch changes the timer API to include a pointer to the provider of
the timer handle so that future operations on the timer will be forwarded
to the proper provider.
  
  (closes issue http://bugs.digium.com/view.php?id=14697)
  Reported by: moy
  
  Review: http://reviewboard.digium.com/r/211/
........

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

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

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2009-03-27 14:17 svnbot         Checkin                                      
2009-03-27 14:17 svnbot         Note Added: 0102308                          
======================================================================




More information about the asterisk-bugs mailing list