<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Thanks!<div><br></div><div>I was getting pressure from the client, so I downgraded to openzap. &nbsp;I looked at the code there, though, and it does the same thing, so it will be interesting to see if it exhibits the same issue. &nbsp;If it does, I'll get the updated freetdm in place and see if that fixes it.<div><br></div><div>Is it possible that the interrupt was just reporting something else bad, and that the messages from freetdm are just symptoms, and not the cause?<br><div></div></div><div><br></div><div>-Troy</div><div><div><br></div><div>On Nov 16, 2010, at 9:42 PM, Moises Silva wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">That is good enough. I committed a patch that should fix it, try git pull please.<div><br clear="all">Moises Silva<br>Senior Software Engineer<br>Sangoma Technologies Inc. | 100 Renfrew Drive, Suite 100, Markham ON L3R 9R6 Canada<br>
t. 1 905 474 1990 x128 | e. <a href="mailto:moy@sangoma.com" target="_blank">moy@sangoma.com</a><br>
<br><br><div class="gmail_quote">On Sun, Nov 14, 2010 at 7:10 PM, Troy Anderson <span dir="ltr">&lt;<a href="mailto:freeswitch@tlainvestments.com">freeswitch@tlainvestments.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
I've been looking deeper into this, and it seems that poll() in zt_wait ftmod_zt.c is returning EINTR, which means it was interrupted by a signal while in the system call (as the error points out). &nbsp;After STFW for a while, the advice is to immediately call poll() again if receiving an EINTR. &nbsp;I would patch the code and try it, but the only place I'm experiencing this is in a busy installation, and I don't want to risk the downtime before getting some feedback as the the viability of such an approach.<br>

<br>
In addition, I am not familiar enough with linux signals to be sure this is a good idea. &nbsp;Is there a way to find out what signal is interrupting the system call? &nbsp;That may be helpful in determining what's going on here.<br>

<br>
Here's the patch I'm considering:<br>
<br>
--- a/libs/freetdm/src/ftmod/ftmod_zt/ftmod_zt.c<br>
+++ b/libs/freetdm/src/ftmod/ftmod_zt/ftmod_zt.c<br>
@@ -885,7 +885,8 @@ static FIO_WAIT_FUNCTION(zt_wait)<br>
 &nbsp; &nbsp; &nbsp; &nbsp;memset(&amp;pfds[0], 0, sizeof(pfds[0]));<br>
 &nbsp; &nbsp; &nbsp; &nbsp;pfds[0].fd = ftdmchan-&gt;sockfd;<br>
 &nbsp; &nbsp; &nbsp; &nbsp;pfds[0].events = inflags;<br>
- &nbsp; &nbsp; &nbsp; result = poll(pfds, 1, to);<br>
+ &nbsp; &nbsp; &nbsp; while ((result = poll(pfds, 1, to)) &lt; 0 &amp;&amp; errno == EINTR)<br>
+ &nbsp; &nbsp;continue;<br>
 &nbsp; &nbsp; &nbsp; &nbsp;*flags = 0;<br>
<br>
 &nbsp; &nbsp; &nbsp; &nbsp;if (pfds[0].revents &amp; POLLERR) {<br>
<br>
Any thoughts?<br>
<div class="im"><br>
Thanks,<br>
Troy<br>
<br>
On Nov 12, 2010, at 10:26 AM, Anthony Minessale wrote:<br>
<br>
</div><div><div></div><div class="h5">&gt; sigh, another case of DAHDI issues.<br>
&gt;<br>
&gt;<br>
&gt; On Fri, Nov 12, 2010 at 10:25 AM, Troy Anderson<br>
&gt; &lt;<a href="mailto:freeswitch@tlainvestments.com">freeswitch@tlainvestments.com</a>&gt; wrote:<br>
&gt;&gt; Thanks for the code change providing additional diagnostics. &nbsp;I finally saw another call drop, but didn't have full logging on at the time. &nbsp;The additional logging provided the following:<br>
&gt;&gt;<br>
&gt;&gt; 2010-11-12 11:12:54.906656 [ERR] ftmod_zt.c:904 [s1c23][1:23] Failed to poll DAHDI device: Interrupted system call<br>
&gt;&gt; 2010-11-12 11:12:54.906656 [ERR] ftmod_zt.c:904 [s1c19][1:19] Failed to poll DAHDI device: Interrupted system call<br>
&gt;&gt; 2010-11-12 11:12:54.906656 [WARNING] mod_freetdm.c:660 failed to wait for I/O<br>
&gt;&gt; 2010-11-12 11:12:54.906656 [WARNING] mod_freetdm.c:660 failed to wait for I/O<br>
&gt;&gt; 2010-11-12 11:12:54.906656 [ERR] ftmod_zt.c:904 [s1c20][1:20] Failed to poll DAHDI device: Interrupted system call<br>
&gt;&gt; 2010-11-12 11:12:54.906656 [WARNING] mod_freetdm.c:660 failed to wait for I/O<br>
&gt;&gt; 2010-11-12 11:12:54.906656 [ERR] ftmod_zt.c:904 [s1c21][1:21] Failed to poll DAHDI device: Interrupted system call<br>
&gt;&gt; 2010-11-12 11:12:54.906656 [WARNING] mod_freetdm.c:660 failed to wait for I/O<br>
&gt;&gt;<br>
&gt;&gt; I'll turn up logging and see what shows up next time, but any ideas on what may cause this?<br>
&gt;&gt;<br>
&gt;&gt; Thanks!<br>
&gt;&gt; Troy<br>
&gt;&gt;<br>
&gt;&gt; On Nov 6, 2010, at 2:17 PM, Moises Silva wrote:<br>
&gt;&gt;<br>
&gt;&gt;&gt; On Fri, Nov 5, 2010 at 12:58 PM, Troy Anderson<br>
&gt;&gt;&gt; &lt;<a href="mailto:freeswitch@tlainvestments.com">freeswitch@tlainvestments.com</a>&gt; wrote:<br>
&gt;&gt;&gt;&gt; We have an installation with a dual PRI and lots of call volume. &nbsp;Among many successful calls each day, we have been experiencing a one or two dropped per day, and they always coincide with a "failed to wait for I/O" warning from mod_freetdm. &nbsp;I have attempted to track down the root cause in the source and by poring over the logs, but cannot figure it out. &nbsp;I have included the redacted logs here. &nbsp;The log file in question is 10MB and has lots of call data that doesn't relate - I know I risked removing something important, but I tried to put in all the data related to this call.<br>

&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; I appreciate any insights or advice on tracking this down.<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; If you update your git tree you will be able to get more information<br>
&gt;&gt;&gt; the next time it happens. I added some code to print the reason for<br>
&gt;&gt;&gt; that error to happen.<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Moises Silva<br>
&gt;&gt;&gt; Senior Software Engineer<br>
&gt;&gt;&gt; Sangoma Technologies Inc. | 100 Renfrew Drive, Suite 100, Markham ON<br>
&gt;&gt;&gt; L3R 9R6 Canada<br>
&gt;&gt;&gt; t. 1 905 474 1990 x128 | e. <a href="mailto:moy@sangoma.com">moy@sangoma.com</a><br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; _______________________________________________<br>
&gt;&gt;&gt; FreeSWITCH-users mailing list<br>
&gt;&gt;&gt; <a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br>
&gt;&gt;&gt; <a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
&gt;&gt;&gt; UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
&gt;&gt;&gt; <a href="http://www.freeswitch.org/" target="_blank">http://www.freeswitch.org</a><br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; _______________________________________________<br>
&gt;&gt; FreeSWITCH-users mailing list<br>
&gt;&gt; <a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br>
&gt;&gt; <a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
&gt;&gt; UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
&gt;&gt; <a href="http://www.freeswitch.org/" target="_blank">http://www.freeswitch.org</a><br>
&gt;&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; --<br>
&gt; Anthony Minessale II<br>
&gt;<br>
&gt; FreeSWITCH <a href="http://www.freeswitch.org/" target="_blank">http://www.freeswitch.org/</a><br>
&gt; ClueCon <a href="http://www.cluecon.com/" target="_blank">http://www.cluecon.com/</a><br>
&gt; Twitter: <a href="http://twitter.com/FreeSWITCH_wire" target="_blank">http://twitter.com/FreeSWITCH_wire</a><br>
&gt;<br>
&gt; AIM: anthm<br>
&gt; <a href="mailto:MSN%3Aanthony_minessale@hotmail.com">MSN:anthony_minessale@hotmail.com</a><br>
&gt; GTALK/JABBER/<a href="mailto:PAYPAL%3Aanthony.minessale@gmail.com">PAYPAL:anthony.minessale@gmail.com</a><br>
&gt; IRC: <a href="http://irc.freenode.net/" target="_blank">irc.freenode.net</a> #freeswitch<br>
&gt;<br>
&gt; FreeSWITCH Developer Conference<br>
&gt; <a href="mailto:sip%3A888@conference.freeswitch.org">sip:888@conference.freeswitch.org</a><br>
&gt; <a href="mailto:googletalk%3Aconf%2B888@conference.freeswitch.org">googletalk:conf+888@conference.freeswitch.org</a><br>
&gt; pstn:+19193869900<br>
&gt;<br>
&gt; _______________________________________________<br>
&gt; FreeSWITCH-users mailing list<br>
&gt; <a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br>
&gt; <a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
&gt; UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
&gt; <a href="http://www.freeswitch.org/" target="_blank">http://www.freeswitch.org</a><br>
<br>
<br>
_______________________________________________<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org/" target="_blank">http://www.freeswitch.org</a><br>
</div></div></blockquote></div><br></div>
_______________________________________________<br>FreeSWITCH-users mailing list<br><a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br>http://lists.freeswitch.org/mailman/listinfo/freeswitch-users<br>UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users<br>http://www.freeswitch.org<br></blockquote></div><br></div></body></html>