[Freeswitch-users] failed to wait for I/O
Moises Silva
moises.silva at gmail.com
Tue Nov 16 20:42:25 PST 2010
That is good enough. I committed a patch that should fix it, try git pull
please.
Moises Silva
Senior Software Engineer
Sangoma Technologies Inc. | 100 Renfrew Drive, Suite 100, Markham ON L3R 9R6
Canada
t. 1 905 474 1990 x128 | e. moy at sangoma.com
On Sun, Nov 14, 2010 at 7:10 PM, Troy Anderson <
freeswitch at tlainvestments.com> wrote:
> 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). After STFW for a while,
> the advice is to immediately call poll() again if receiving an EINTR. 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.
>
> In addition, I am not familiar enough with linux signals to be sure this is
> a good idea. Is there a way to find out what signal is interrupting the
> system call? That may be helpful in determining what's going on here.
>
> Here's the patch I'm considering:
>
> --- a/libs/freetdm/src/ftmod/ftmod_zt/ftmod_zt.c
> +++ b/libs/freetdm/src/ftmod/ftmod_zt/ftmod_zt.c
> @@ -885,7 +885,8 @@ static FIO_WAIT_FUNCTION(zt_wait)
> memset(&pfds[0], 0, sizeof(pfds[0]));
> pfds[0].fd = ftdmchan->sockfd;
> pfds[0].events = inflags;
> - result = poll(pfds, 1, to);
> + while ((result = poll(pfds, 1, to)) < 0 && errno == EINTR)
> + continue;
> *flags = 0;
>
> if (pfds[0].revents & POLLERR) {
>
> Any thoughts?
>
> Thanks,
> Troy
>
> On Nov 12, 2010, at 10:26 AM, Anthony Minessale wrote:
>
> > sigh, another case of DAHDI issues.
> >
> >
> > On Fri, Nov 12, 2010 at 10:25 AM, Troy Anderson
> > <freeswitch at tlainvestments.com> wrote:
> >> Thanks for the code change providing additional diagnostics. I finally
> saw another call drop, but didn't have full logging on at the time. The
> additional logging provided the following:
> >>
> >> 2010-11-12 11:12:54.906656 [ERR] ftmod_zt.c:904 [s1c23][1:23] Failed to
> poll DAHDI device: Interrupted system call
> >> 2010-11-12 11:12:54.906656 [ERR] ftmod_zt.c:904 [s1c19][1:19] Failed to
> poll DAHDI device: Interrupted system call
> >> 2010-11-12 11:12:54.906656 [WARNING] mod_freetdm.c:660 failed to wait
> for I/O
> >> 2010-11-12 11:12:54.906656 [WARNING] mod_freetdm.c:660 failed to wait
> for I/O
> >> 2010-11-12 11:12:54.906656 [ERR] ftmod_zt.c:904 [s1c20][1:20] Failed to
> poll DAHDI device: Interrupted system call
> >> 2010-11-12 11:12:54.906656 [WARNING] mod_freetdm.c:660 failed to wait
> for I/O
> >> 2010-11-12 11:12:54.906656 [ERR] ftmod_zt.c:904 [s1c21][1:21] Failed to
> poll DAHDI device: Interrupted system call
> >> 2010-11-12 11:12:54.906656 [WARNING] mod_freetdm.c:660 failed to wait
> for I/O
> >>
> >> I'll turn up logging and see what shows up next time, but any ideas on
> what may cause this?
> >>
> >> Thanks!
> >> Troy
> >>
> >> On Nov 6, 2010, at 2:17 PM, Moises Silva wrote:
> >>
> >>> On Fri, Nov 5, 2010 at 12:58 PM, Troy Anderson
> >>> <freeswitch at tlainvestments.com> wrote:
> >>>> We have an installation with a dual PRI and lots of call volume.
> 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. I have attempted to track down the root
> cause in the source and by poring over the logs, but cannot figure it out.
> I have included the redacted logs here. 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.
> >>>>
> >>>> I appreciate any insights or advice on tracking this down.
> >>>>
> >>>
> >>> If you update your git tree you will be able to get more information
> >>> the next time it happens. I added some code to print the reason for
> >>> that error to happen.
> >>>
> >>> Moises Silva
> >>> Senior Software Engineer
> >>> Sangoma Technologies Inc. | 100 Renfrew Drive, Suite 100, Markham ON
> >>> L3R 9R6 Canada
> >>> t. 1 905 474 1990 x128 | e. moy at sangoma.com
> >>>
> >>> _______________________________________________
> >>> FreeSWITCH-users mailing list
> >>> FreeSWITCH-users at lists.freeswitch.org
> >>> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> >>> UNSUBSCRIBE:
> http://lists.freeswitch.org/mailman/options/freeswitch-users
> >>> http://www.freeswitch.org
> >>
> >>
> >> _______________________________________________
> >> FreeSWITCH-users mailing list
> >> FreeSWITCH-users at lists.freeswitch.org
> >> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> >> UNSUBSCRIBE:
> http://lists.freeswitch.org/mailman/options/freeswitch-users
> >> http://www.freeswitch.org
> >>
> >
> >
> >
> > --
> > Anthony Minessale II
> >
> > FreeSWITCH http://www.freeswitch.org/
> > ClueCon http://www.cluecon.com/
> > Twitter: http://twitter.com/FreeSWITCH_wire
> >
> > AIM: anthm
> > MSN:anthony_minessale at hotmail.com <MSN%3Aanthony_minessale at hotmail.com>
> > GTALK/JABBER/PAYPAL:anthony.minessale at gmail.com<PAYPAL%3Aanthony.minessale at gmail.com>
> > IRC: irc.freenode.net #freeswitch
> >
> > FreeSWITCH Developer Conference
> > sip:888 at conference.freeswitch.org <sip%3A888 at conference.freeswitch.org>
> > googletalk:conf+888 at conference.freeswitch.org<googletalk%3Aconf%2B888 at conference.freeswitch.org>
> > pstn:+19193869900
> >
> > _______________________________________________
> > FreeSWITCH-users mailing list
> > FreeSWITCH-users at lists.freeswitch.org
> > http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> > UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> > http://www.freeswitch.org
>
>
> _______________________________________________
> FreeSWITCH-users mailing list
> FreeSWITCH-users at lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> http://www.freeswitch.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20101116/4bc9fc02/attachment-0001.html
More information about the FreeSWITCH-users
mailing list