[Pdns-users] pdns_recursor stops getting queries on Solaris 10 sparc

Alex Kiernan alex.kiernan at gmail.com
Fri Sep 14 13:26:59 UTC 2007


On 14/09/2007, Alex Kiernan <alex.kiernan at gmail.com> wrote:
> On 14/09/2007, bert hubert <bert.hubert at netherlabs.nl> wrote:
> > On Fri, Sep 14, 2007 at 01:51:19PM +0100, Alex Kiernan wrote:
> >
> > > Prepare to be surprised... I added instrumention so the code looked like this:
> >
> > Very cool you discovered this!
> >
> > This is pretty amazing. However, what I don't get is how this actually
> > causes problems - we should get ret=0 on the next call to run() and hence
> > port_getn.
> >
> > Or am I missing something?
> >
>
> I think the state machine in portfs says you've been told about these
> events (edge vs. level) and doesn't bother telling you again until you
> reset it by doing something with the event (which we'll never do).
>
> I've just changed the code so it looks like this, which I'm testing w/
> know (whilst leaving all the extra logging in):
>
>  if(ret < 0) {
>    if(errno!=EINTR && errno!=ETIME)
>      throw FDMultiplexerException("completion port_getn returned
> error: "+stringerror());
>    // EINTR and ETIME are not really errors
>    if (errno==EINTR)
>      return 0;
>  }
>
>

Which works again - I just got logged

Sep 14 13:17:05 1:ret=-1,errno=62,numevents=0
Sep 14 13:17:05 2:ret=-1,errno=62,numevents=0
Sep 14 13:17:06 1:ret=-1,errno=62,numevents=0
Sep 14 13:17:06 2:ret=-1,errno=62,numevents=0
Sep 14 13:19:49 1:ret=-1,errno=62,numevents=4
Sep 14 13:19:49 2:ret=-1,errno=62,numevents=4

and then nothing further logged (i.e. its still answering queries), so
it certainly seems like when you get ETIME from port_getn you must
process any events it returned.

-- 
Alex Kiernan


More information about the Pdns-users mailing list