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

Alex Kiernan alex.kiernan at gmail.com
Thu Sep 13 06:40:50 UTC 2007


On 12/09/2007, bert hubert <bert.hubert at netherlabs.nl> wrote:
> On Wed, Sep 12, 2007 at 09:35:27PM +0100, Alex Kiernan wrote:
>
> > I made these changes earlier today - its been running for ~6 hours
> > now, answered 5.3M queries and still hasn't hung:
>
> Cool!
>
> This is a variation on
> http://wiki.powerdns.com/cgi-bin/trac.fcgi/changeset/1059
>
> The more general fix is to include a line that makes sure we don't trust
> numevents unless ret >=0.
>

It certainly seems like you can get ret == -1, errno == ETIME and
numevents non-zero (though the docs would suggest it should always be
less than the number of events that you asked for) - certainly the
bindings explicitly handle the ETIME case whilst returning values in
*nget:

http://cvs.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/lib/libc/port/gen/event_port.c#89

> I hope to hear from you regarding the gettimeofday thing, and if this was
> not relevant as expected.
>

Indeed it looked to be bogus - taking it out, it ran for ~8 hours,
answered 8257845 queries before it ran out of queries in my test set,
no apparent problems. I've just set it off to check again, then I'll
try it in a real environment. This is the patch:

Index: pdns-recursor/portsmplexer.cc
===================================================================
RCS file: /cvsroot/upstream/pdns-recursor/portsmplexer.cc,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 portsmplexer.cc
--- pdns-recursor/portsmplexer.cc       12 Nov 2006 16:56:13 -0000      1.1.1.1
+++ pdns-recursor/portsmplexer.cc       13 Sep 2007 06:34:36 -0000
@@ -94,7 +94,7 @@
   if(ret < 0 && errno!=EINTR && errno!=ETIME)
     throw FDMultiplexerException("completion port_getn returned
error: "+stringerror());

-  if((ret < 0 && errno==ETIME) || numevents==0) // nothing
+  if((ret < 0 && errno==EINTR) || numevents==0) // nothing
     return 0;

   d_inrun=true;


-- 
Alex Kiernan


More information about the Pdns-users mailing list