[Unbound-users] FreeBSD + Unbound 1.0.2 error: too many file descriptors requested

Wouter Wijngaards wouter at NLnetLabs.nl
Mon Aug 18 13:19:19 UTC 2008


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Norbert Tretkowski wrote:
> Am Montag, den 18.08.2008, 12:26 +0200 schrieb Norbert Tretkowski:
>> Dmitriy Demidov wrote:
>>> Abount unbound+libevent 1.3e problems. When unbound is linked with 
>>> it, is freezes randomly, it may do core dumps, and, if for example, it
>>> is configured with 8 threads - only 2 or 3 of them are used and 
>>> remaining threads are not used at all (unbound statistics shows
>>> that). :(
>> I saw the same problem on Linux 2.6, using unbound 1.0.2 with libevent
>> 1.3e. Upgrading libevent to 1.4.6 seems to have fixed the problem.
> 
> Unfortunately, I was wrong. Using libevent 1.4.6 does not fix the
> problem, unbound still freezes randomly, uses 100% CPU and does not
> answer queries.
> 
> 	Norbert


Which backend is libevent using? unbound at high verbosity(4) will print
the backend that libevent is using at startup, like:

[1219063086] unbound[21633:0] debug: libevent 1.4.5 uses select method.

On linux it defaults to epoll. That must have the bug. You can disable
the libevent EPOLL backend with:
         EVENT_NOEPOLL=yes; export EVENT_NOEPOLL
set this environment variable in the shell before you start unbound.
Then it will use poll(2), which is slower, but much simpler. That could
make your bugs go away.

If this is a libevent problem, I am not sure how I can help?

For the record (and for Solaris users) the other libevent backends can
be disabled as well (you can define multiple environment variables)
         EVENT_NOKQUEUE=yes; export EVENT_NOKQUEUE
         EVENT_NODEVPOLL=yes; export EVENT_NODEVPOLL
         EVENT_NOPOLL=yes; export EVENT_NOPOLL
         EVENT_NOSELECT=yes; export EVENT_NOSELECT
         EVENT_NOEPOLL=yes; export EVENT_NOEPOLL
         EVENT_NOEVPORT=yes; export EVENT_NOEVPORT

There is also libev (http://dist.schmorp.de/libev/libev-3.43.tar.gz),
that aims to provide an alternative libevent-API implementation (author
says it is faster). Quick compile test on a linux machine: ./configure;
make on libev-3.43, then ./configure --with-libevent=<thelibevbuilddir>
and that seems to work fine. It can be an alternative.

Best regards,
   Wouter
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)

iEYEARECAAYFAkipdtYACgkQkDLqNwOhpPiG6QCcDkPOVoRj3bu8+FJhNtKUr4Rr
CEwAoKznbzGAFsLNnOHjnkM5Bb7LivBF
=MnWI
-----END PGP SIGNATURE-----



More information about the Unbound-users mailing list