bind9 dlz / mysql no ubuntu segfault libmysqlclient.so

1

Eu tenho um grande problema. Eu instalei o servidor de nomes bind9 para três computadores diferentes. dois Ubuntu 10.04.4 LTS e um Ubuntu 11.10

Eu compilei 9.7.0, 9.7.3, 9.9.0 com este método:

./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

make install

Após a configuração para dlz / mysql, o servidor BIND está funcionando perfeitamente até 5-30 minutos de duração. Ahter eu tenho segfault.

Eu resolvo temporariamente o problema com um watchdog de processo simples, e se o named está parado, o watchdog é reiniciado, mas isso não é uma boa idéia em um longo termo.

Minha saída de log é:

mensagens:

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 libmysqlclient.so.16.0.0[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 libmysqlclient.so.16.0.0[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 libmysqlclient.so.16.0.0[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 libmysqlclient.so.16.0.0[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 libmysqlclient.so.16.0.0[b72e1000+1aa000]
Apr 13 20:11:57 WATCHDOG: named not running. Restarting

syslog: link

o primeiro servidor é nativo, servidor x64 normal (u1004lts), o segundo é servidor virtualizado (u11.10) o terceiro também é virtualizado (10.04lts) Este servidor é somente para dns fornecendo com mysql server db. Mas o problema é estar com todo servidor, e toda versão de bind.

named.conf: link

Alguém pode me ajudar, ou alguma boa ideia?

    
por Theos 13.04.2012 / 20:49

1 resposta

4

O problema: (de link )

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.

RESOLVE:

nano /etc/defaults/bind9

e altere esta linha:

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

para:

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

reinicie o servidor DNS.

    
por 14.04.2012 / 10:10