[asterisk-bugs] [Asterisk 0013009]: [patch] dynamic thread identifiers may be duplicated
noreply at bugs.digium.com
noreply at bugs.digium.com
Mon Jul 7 11:05:41 CDT 2008
A NOTE has been added to this issue.
======================================================================
http://bugs.digium.com/view.php?id=13009
======================================================================
Reported By: jpgrayson
Assigned To:
======================================================================
Project: Asterisk
Issue ID: 13009
Category: Channels/chan_iax2
Reproducibility: always
Severity: minor
Priority: normal
Status: new
Asterisk Version: SVN
SVN Branch (only for SVN checkouts, not tarball releases): N/A
SVN Revision (number only!):
Disclaimer on File?: N/A
Request Review:
======================================================================
Date Submitted: 07-07-2008 10:58 CDT
Last Modified: 07-07-2008 11:05 CDT
======================================================================
Summary: [patch] dynamic thread identifiers may be duplicated
Description:
Currently in chan_iax2, the way that identifiers for dynamic threads
"threadnum" are assigned leads to cases where multiple co-existing threads
may have the same identifier.
When a dynamic thread is created, its threadnum identifier is set to the
global iaxdynamicthreadcount state. This iaxdynamicthreadcount is simply
the count of currently existing dynamic threads. Using
iaxdynamicthreadcount to assign threadnum provides no guarantee that each
thread will have a unique thread number.
It is actually possible to have the case where there are, for example, two
dynamic threads with threadnum => 6, four threads with dynamic threadnum =>
3, etc.
This problem does not yield any functional deficiencies, but it does
adversely impact debugging threads. It reduces the amount of information
provided by "iax2 show threads".
======================================================================
----------------------------------------------------------------------
jpgrayson - 07-07-08 11:05
----------------------------------------------------------------------
Added a simple patch to resolve this issue. Use a new variable,
iaxdynamicthreadnum, to assign dynamic threads' threadnum. This new
variable monotonically increases thereby ensuring that each dynamic
thread's threadnum is unique.
Issue History
Date Modified Username Field Change
======================================================================
07-07-08 11:05 jpgrayson Note Added: 0089828
======================================================================
More information about the asterisk-bugs
mailing list