<html>
<body>
<div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
<table bgcolor="#f9f3c9" width="100%" cellpadding="8" style="border: 1px #c9c399 solid;">
<tr>
<td>
This is an automatically generated e-mail. To reply, visit:
<a href="https://reviewboard.asterisk.org/r/1361/">https://reviewboard.asterisk.org/r/1361/</a>
</td>
</tr>
</table>
<br />
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
<p style="margin-top: 0;">On August 12th, 2011, 9:44 a.m., <b>kobaz</b> wrote:</p>
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Would any of the take 2 changes be a fix for ASTERISK-18250</pre>
</blockquote>
<p>On August 12th, 2011, 9:48 a.m., <b>Terry Wilson</b> wrote:</p>
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Yes. The pervious patch leaked a reference to the timer, so it would never be deleted.</pre>
</blockquote>
</blockquote>
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">I found a very very consistent reproduction of the problem.
Dual span sangoma t1 card, set up master/slave net/cpe crossover cable
chan_dahdi.conf
------------------
[trunkgroups]
[channels]
context=default
usecallerid=yes
hidecallerid=no
callwaiting=yes
usecallingpres=yes
callwaitingcallerid=yes
threewaycalling=yes
transfer=yes
canpark=yes
cancallforward=yes
callreturn=yes
;echocancel=yes
;echocancelwhenbridged=yes
relaxdtmf=yes
rxgain=0.0
txgain=0.0
group=1
callgroup=1
pickupgroup=1
immediate=no
;Sangoma A102 port 1 [slot:7 bus:3 span:1] <wanpipe1>
switchtype=national
context=from-pstn
group=0
echocancel=no
signalling=pri_net
channel =>1-23
;Sangoma A102 port 2 [slot:7 bus:3 span:2] <wanpipe2>
switchtype=national
context=from-pstn
group=0
echocancel=no
signalling=pri_cpe
channel =>25-47
------------------
wanpipe1
-----------
FE_MEDIA = T1
FE_LCODE = B8ZS
FE_FRAME = ESF
FE_LINE = 1
TE_CLOCK = MASTER
TE_REF_CLOCK = 0
--------
wanpipe2
-----------
FE_MEDIA = T1
FE_LCODE = B8ZS
FE_FRAME = ESF
FE_LINE = 2
TE_CLOCK = NORMAL
TE_REF_CLOCK = 2
-------------
[Aug 22 12:29:28] VERBOSE[8409] pbx.c: -- <SIP/201-00000001> Executing [81234@_cos_internal+local+ld+intl:1] Dial(DAHDI/g0/1234)
[Aug 22 12:29:28] VERBOSE[8409] app_dial.c: -- <SIP/201-00000001> calling DAHDI/i1/1234-2 (callee proceeding, passing it to caller)
[Aug 22 12:29:28] VERBOSE[8409] app_dial.c: -- <SIP/201-00000001> calling DAHDI/i1/1234-2 (callee answered)
[Aug 22 12:29:28] WARNING[8410] res_timing_timerfd.c: Reading attempt on idle timerfd. This would have caused a deadlock.
[Aug 22 12:29:28] WARNING[8410] res_timing_timerfd.c: Reading attempt on idle timerfd. This would have caused a deadlock.
[Aug 22 12:29:28] WARNING[8410] res_timing_timerfd.c: Reading attempt on idle timerfd. This would have caused a deadlock.
[Aug 22 12:29:28] WARNING[8410] res_timing_timerfd.c: Reading attempt on idle timerfd. This would have caused a deadlock.
[Aug 22 12:29:28] WARNING[8410] res_timing_timerfd.c: Reading attempt on idle timerfd. This would have caused a deadlock.
....repeating</pre>
<br />
<p>- kobaz</p>
<br />
<p>On August 12th, 2011, 9:41 a.m., Terry Wilson wrote:</p>
<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" style="background-image: url('https://reviewboard.asterisk.org/media/rb/images/review_request_box_top_bg.png'); background-position: left top; background-repeat: repeat-x; border: 1px black solid;">
<tr>
<td>
<div>Review request for Asterisk Developers, David Vossel, kobaz, irroot, and jrose.</div>
<div>By Terry Wilson.</div>
<p style="color: grey;"><i>Updated Aug. 12, 2011, 9:41 a.m.</i></p>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Description </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid #b8b5a0">
<tr>
<td>
<pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">This was originally reviewed as https://reviewboard.asterisk.org/r/1255 and then committed and reverted when a performance issue was found.
There were three problems with this patch. 1) There was no locking done around the timer, 2) We never released the reference to our_timer, and 3) The saved_timer values do not necessarily equal the actual timer value--it exists solely for setting things back the way they were after enabling/disabling continuous mode. We should not be using it to decide whether or not to do a read().
This patch adds locking, releases the reference from the ao2_find(), and removes the troublesome if() block, and uses ast_debug instead of ast_log(LOG_DEBUG, ...). In all other ways it is identical to the patch that was originally committed.</pre>
</td>
</tr>
</table>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Testing </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid #b8b5a0">
<tr>
<td>
<pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">None, yet. The other patch worked, but caused a regression with analog phones. jrose, if you still have a setup available to test this patch to see if the regression is gone, the patch is very much like the original so it should work. If anyone has a good example of how to reliably reproduce the original issue I would be happy to test that as well.</pre>
</td>
</tr>
</table>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> </h1>
<ul style="margin-left: 3em; padding-left: 0;">
<li>/branches/1.8/res/res_timing_timerfd.c <span style="color: grey">(331573)</span></li>
</ul>
<p><a href="https://reviewboard.asterisk.org/r/1361/diff/" style="margin-left: 3em;">View Diff</a></p>
</td>
</tr>
</table>
</div>
</body>
</html>