[nsd-users] NSD 4.5.0rc1 pre-release

Wouter Wijngaards wouter at nlnetlabs.nl
Fri May 13 14:20:24 UTC 2022


Hi Andreas,

On 13/05/22 14:32, A. Schulze wrote:
> Hello Wouter,
> 
> thanks for having a look into my trouble. I wonder about your "could not
> reproduce"
> Did you build both containers with the Dockerfiles I send?

The build process that I used looks like you put these lines in the
Docker scripts, after the WORKDIR line,
ADD http://dist.schmorp.de/libev/libev-4.33.tar.gz
RUN tar xzf libev-4.33.tar.gz
RUN cd /tmp/libev-4.33
RUN ./configure --prefix=/tmp/libev-4.33/install
RUN make
RUN make install
RUN cd ..
... and then for the ./configure line for nsd
RUN ./configure --with-libevent=/tmp/libev-4.33/install

It is different in that it does not use the compatibility header files
and mode, but uses libev straight up, and detects that. I think NSD then
continues to use some libev calls and some libev-libevent-compatibility
calls.

> 
> I've two servers receiving AXFF from a BIND master (no version known)
> where I see the segfault messages constantly after AXFR.
> I also could not reproduce any segfault on AXFR in a lab. I tried
> NSD-provider -> AXFR -> NSD-consumer
> and used even the same zone. That makes the segfaults something strage
> to me, too.
> They really did only happen on my prod servers.
> Using the Dockerfiles was the first time I could trigger a similar error
> but yes, the setup is not the same.
> 
> I now switched on server to a version built with libevent instead of libev
> and the segfaults no longer happen!
> 
> In both cases the error happen very late when a process terminate.
> So maybe it's related.
> 
> I plan to replace libev by libevent on /all/ of my numerous NSD instances.
> That would solve this issues for me.

That is good to hear, the plan is to have the issues resolved.

> 
> Could you describe the differences between libevent and libev?

libev does a socket event notification API, and libevent has that too,
but libevent also provides other building blocks, like buffers, and
https. NSD uses the event notification API. libev provides an API that
is similar to libevent's event notification API.

> What was the reason you implemented NSD in a way to use one OR the other
> library?

No real reason. Could be, small, speed differences, but mainly they use
the same system back end, so not really that important. Different code
allows for change when there are bugs. Like we have here.

> What may I expect when switching from libev back to libevent?
> More load? Latency? Memory usage? Watever?

Nothing really. The libevent build is the default build option for NSD.

For completeness, it is also possible to build NSD without libevent, and
then it uses a builtin event loop. This one is limited to 1024 sockets.

Best regards, Wouter


More information about the nsd-users mailing list