<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Please open a jira <a href="http://jira.freeswitch.org">http://jira.freeswitch.org</a><div><br></div><div>Thanks,</div><div>Brian</div><div><br><div><div>On Feb 22, 2010, at 8:45 AM, Peter Fowler wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><span class="Apple-style-span" style="border-collapse: separate; font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><p><font size="2" face="Arial"><br class="Apple-interchange-newline">In revision 16249 I am seeing an intermittent problem as follows:</font></p><p><font size="2" face="Arial">1) conference is setup to play an alone sound and moh</font><span class="Apple-converted-space"> </span><br><font size="2" face="Arial">2) first person calls into the conference</font><span class="Apple-converted-space"> </span><br><font size="2" face="Arial">3) very intermittently the "alone" sound if not heard. Instead moh is played immediately</font></p><p><font size="2" face="Arial">I have tracked this down to a race condition in mod_conference where the line 1011 within</font><span class="Apple-converted-space"> </span><br><font size="2" face="Arial">conference_thread_run() checks the value of conference->async_fnode at the same time, on<span class="Apple-converted-space"> </span></font><br><font size="2" face="Arial">a separate thread, conference_add_member() is updating that value via conference_play_file.</font></p><p><font size="2" face="Arial">As a result, intermittently, the alone sound is enqueued but then immediately "over written"<span class="Apple-converted-space"> </span></font><br><font size="2" face="Arial">by the moh found.</font></p><p><font size="2" face="Arial">A possible solution would be to surround the if statement at 1011 with</font></p><p><font size="2" face="Arial">switch_mutex_lock(conference->mutex)</font><span class="Apple-converted-space"> </span><br><font size="2" face="Arial">…</font><span class="Apple-converted-space"> </span><br><font size="2" face="Arial">switch_mutex_unlock(conference->mutex)</font></p><p><font size="2" face="Arial">Let me know if I should go ahead and enter a Jira and post a patch.</font></p><p><font size="2" face="Arial">Peter</font></p></span><br class="Apple-interchange-newline"></blockquote></div><br></div></body></html>