<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/1423/">https://reviewboard.asterisk.org/r/1423/</a>
</td>
</tr>
</table>
<br />
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
<p style="margin-top: 0;">On September 12th, 2011, 9:55 a.m., <b>Matthew Nicholson</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;">Looks good, but is there some underlying bug that causes events with the wrong size?</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 don't think so. I think it's something weird (bug, I guess) happening down in OpenAIS. poll() says there's data that needs to be handled but then when the callback gets called to deliver an event into Asterisk, there's no data there. It happens pretty rarely compared to the amount of event traffic and there doesn't seem to be any problems if we just ignore this case.</pre>
<br />
<p>- Russell</p>
<br />
<p>On September 8th, 2011, 7:31 p.m., Russell Bryant 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.</div>
<div>By Russell Bryant.</div>
<p style="color: grey;"><i>Updated Sept. 8, 2011, 7:31 p.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 patch resolves a crash observed in a load testing environment that
involved the use of the res_ais module. I observed some crashes where
the event delivery callback would get called, but the length parameter
incidcating how much data there was to read was 0. The code assumed
(with good reason I would think) that if this callback got called, there
was an event available to read. However, if the rare case that there's
nothing there, catch it and return instead of blowing up.
More specifically, the change always ensure that the size of the received
event in the cluster is always big enough to be a real ast_event.
</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;">I ran about 120,000 calls through a couple of systems that had this patch.</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/include/asterisk/event.h <span style="color: grey">(335012)</span></li>
<li>/branches/1.8/main/event.c <span style="color: grey">(335012)</span></li>
<li>/branches/1.8/res/ais/evt.c <span style="color: grey">(335012)</span></li>
</ul>
<p><a href="https://reviewboard.asterisk.org/r/1423/diff/" style="margin-left: 3em;">View Diff</a></p>
</td>
</tr>
</table>
</div>
</body>
</html>