Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a big problem. I installed the bind9 nameserver to three different computer. two Ubuntu 10.04.4 LTS, and one Ubuntu 11.10

I compiled it 9.7.0, 9.7.3, 9.9.0 with this method:

./configure --prefix=/usr --sysconfdir=/etc/bind --localstatedir=/var \
--mandir=/usr/share/man --infodir=/usr/share/info \
--enable-threads --enable-largefile --with-libtool --enable-shared --enable-static \
--with-openssl=/usr --with-gssapi=/usr --with-gnu-ld \
--with-dlz-mysql=yes --with-dlz-bdb=no \
--with-dlz-filesystem=yes --with-geoip=/usr


make install

After the set up for dlz/mysql, the BIND server is working perfetctly until 5-30 minute long. Ahter i got segfault.

I resolve temporaly the problem with a simple process watchdog, and if the named is stopped, the watchdog is restart it, but this is not a good idea in long therm.

My log output is:


Apr 13 19:33:51 dnsvm kernel: [    8.088696] eth0: link up
Apr 13 19:33:58 WATCHDOG: named not running. Restarting
Apr 13 19:35:08 dnsvm kernel: [   87.082572] named[1027]: segfault at 88 ip b71c4291 sp b5adfe30 error 4 in[b714e000+1aa000]
Apr 13 19:35:08 WATCHDOG: named not running. Restarting
Apr 13 19:35:08 dnsvm kernel: [   87.457510] named[1423]: segfault at 68 ip b71d6122 sp b52f0a40 error 4 in[b7160000+1aa000]
Apr 13 19:35:09 WATCHDOG: named not running. Restarting
Apr 13 19:41:56 dnsvm kernel: [  494.838206] named[1448]: segfault at 88 ip b731c291 sp b5436e30 error 4 in[b72a6000+1aa000]
Apr 13 19:41:57 WATCHDOG: named not running. Restarting
Apr 13 19:57:26 dnsvm kernel: [ 1424.023409] named[2976]: segfault at 88 ip b72d1291 sp b6beee30 error 4 in[b725b000+1aa000]
Apr 13 19:57:26 WATCHDOG: named not running. Restarting
Apr 13 20:11:56 dnsvm kernel: [ 2294.324663] named[6441]: segfault at 88 ip b7357291 sp b6473e30 error 4 in[b72e1000+1aa000]
Apr 13 20:11:57 WATCHDOG: named not running. Restarting


the first server is a native, normal x64 server (u1004lts), the second is virtualised server (u11.10) the third is also virtualised (10.04lts) This servers is only for dns providing with mysql server db. But the problem is be with all server, and all bind version.


Can anybody help me, or any good idea?

share|improve this question

The problem: (from

The MySQL driver has one additional limitation. MySQL uses thread local storage in its C api. Thus MySQL requires that each thread of an application execute a MySQL "thread initialization" to setup the thread local storage. This is impossible to do safely while staying within the DLZ driver API. This is a limitation caused by MySQL, and not the DLZ API. Because of this BIND MUST only run with a single thread when using the MySQL driver. To ensure BIND runs with a single thread pass "-n 1" on the command line when starting BIND (named). This should not be a limitation on most UN*X systems as BIND is normally compiled single threaded (there are some exceptions). Even if BIND is compiled to support threads passing "-n 1" on the command line will cause it to use a single thread. Also, if the MySQL driver is compiled into BIND but NOT USED then "-n 1" is not required. The "-n 1" command line parameters are only required when the MySQL driver is USED.


nano /etc/defaults/bind9

and change this line:

# startup options for the server
OPTIONS="-u bind"


# startup options for the server
OPTIONS="-u bind -n 1"

restart the DNS server.

share|improve this answer
Awesome! I was really struggling with this problem, You should accept the answer as this is correct. – andrew Sep 17 '13 at 15:08

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.