[Pdns-dev] bind backend as slave segfaults on OpenBSD 3.3

Joost van Baal joostvb-pdns-dev at mdcc.cx
Thu Aug 28 15:27:47 CEST 2003


Hi,

Using the bind backend as a slave on OpenBSD 3.3, with gcc 2.95.3, causes
pdns_server to segfault in ZoneParser::eatLine at
backends/bind/zoneparser2.cc:236 .  Any clue on how to get this fixed
would be greatly appreciated.

Here are the details:

 root at schilow.mdcc.cx:~# /usr/local/sbin/pdns_server --config-name=ext
 Aug 28 13:34:44 schilow [3867]: [BindBackend] This is the bind backend version 2.9.11 (Aug 28 2003, 12:54:51) reporting
 Aug 28 13:34:44 schilow [3867]: [Bind2Backend] This is the bind backend version 2.9.11 (Aug 28 2003, 12:52:16) reporting
 Aug 28 13:34:44 This is a standalone pdns
 Aug 28 13:34:45 schilow pdns-ext[3867]: This is a standalone pdns
 Aug 28 13:34:45 Listening on controlsocket in '/var/run/pdns-ext.controlsocket'
 Aug 28 13:34:45 schilow pdns-ext[3867]: Listening on controlsocket in '/var/run/pdns-ext.controlsocket'
 Aug 28 13:34:45 Opened file '/usr/local/etc/pdns-ext.conf' for configuration
 Aug 28 13:34:45 UDP server bound to 80.126.189.155:53
 Aug 28 13:34:45 TCP server bound to 80.126.189.155:53
 Aug 28 13:34:45 schilow pdns[3867]: UDP server bound to 80.126.189.155:53
 Aug 28 13:34:45 schilow pdns[3867]: UDP server bound to 80.126.189.155:53
 Aug 28 13:34:45 schilow pdns[3867]: TCP server bound to 80.126.189.155:53
 Aug 28 13:34:45 schilow pdns[3867]: TCP server bound to 80.126.189.155:53
 Aug 28 13:34:45 PowerDNS 2.9.11 (C) 2001-2003 PowerDNS.COM BV (Aug 28 2003, 12:47:14) starting up
 Aug 28 13:34:45 schilow pdns[3867]: PowerDNS 2.9.11 (C) 2001-2003 PowerDNS.COM BV (Aug 28 2003, 12:47:14) starting up
 Aug 28 13:34:45 PowerDNS comes with ABSOLUTELY NO WARRANTY. This is free software, and you are welcome to redistribute it according to the terms of the GPL version 2.
 Aug 28 13:34:45 schilow pdns[3867]: PowerDNS comes with ABSOLUTELY NO WARRANTY. This is free software, and you are welcome to redistribute it according to the terms of the GPL version 2.
 Aug 28 13:34:45 Creating backend connection for TCP
 Aug 28 13:34:45 schilow pdns[3867]: Creating backend connection for TCP
 Aug 28 13:34:45 schilow pdns[3867]: Creating backend connection for TCP
 Aug 28 13:34:45 [bindbackend] Parsing 1 domain(s), will report when done
 Aug 28 13:34:45 schilow pdns[3867]: [bindbackend] Parsing 1 domain(s), will report when done
 Aug 28 13:34:45 [bindbackend] parsing 'mdcc.cx' from file '/usr/local/var/named/slave/mdcc.cx'
 Aug 28 13:34:46 Master/slave communicator launching
 Aug 28 13:34:46 schilow pdns[3867]: Master/slave communicator launching
 Aug 28 13:34:46 schilow pdns[3867]: Master/slave communicator launching
 zsh: segmentation fault (core dumped)  /usr/local/sbin/pdns_server --config-name=ext

This is with

 joostvb at schilow.mdcc.cx:~% egrep -v '^#|^$' /usr/local/etc/pdns-ext.conf
 local-address=80.126.189.155
 bind-config=/usr/local/etc/bind/ext/named.conf
 slave=yes
 bind-check-interval=0
 disable-axfr=yes
 launch=bind
 log-dns-details=yes
 log-failed-updates=yes
 logging-facility=4
 loglevel=9

 joostvb at schilow.mdcc.cx:~% cat /usr/local/etc/bind/ext/named.conf
 zone "mdcc.cx" {
  type slave;
  file "/usr/local/var/named/slave/mdcc.cx";
  masters {
    212.204.230.141;
  };
 };

 joostvb at schilow.mdcc.cx:~% cat /usr/local/var/named/slave/mdcc.cx
 mdcc.cx.                2560    IN      SOA     a.ns.ad1810.com. hostmaster.mdcc.cx. 1062013648 16384 2048 1048576 2560
 mdcc.cx.                259200  IN      NS      a.ns.ad1810.com.
 mdcc.cx.                259200  IN      NS      b.ns.ad1810.com.
 mdcc.cx.                259200  IN      NS      c.ns.ad1810.com.
 mdcc.cx.                86400   IN      A       212.204.230.141
 schilow.mdcc.cx.        86400   IN      A       80.126.189.155
 yosida.mdcc.cx.         86400   IN      A       62.163.25.11
 mdcc.cx.                86400   IN      MX      4 a.mx.ad1810.com.

Inspecting the core (I've build pdns-2.9.11.tar.gz, with a tiny patch
to pdns/common_startup.cc (see yesterday's post by me), with

 gmake CXXFLAGS='-pthread -Wall -O0 -g -fno-default-inline'

) yields:


joostvb at schilow.mdcc.cx:~% gdb /usr/local/sbin/pdns_server ~/tmp/pdns_server.core
GNU gdb 4.16.1
Copyright 1996 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i386-unknown-openbsd3.3"...
Core was generated by `pdns_server'.
Program terminated with signal 11, Segmentation fault.
Reading symbols from /usr/libexec/ld.so...done.
Reading symbols from /usr/lib/libstdc++.so.31.0...done.
Reading symbols from /usr/lib/libm.so.1.0...done.
Reading symbols from /usr/lib/libpthread.so.1.0...done.
Reading symbols from /usr/lib/libc.so.29.0...done.
#0  0x13b162 in ZoneParser::eatLine (this=0xcfbfc314, line=@0xcfbfb6a4, rec=@0xcfbfb634) at backends/bind/zoneparser2.cc:236
236       return parseLine(parts,rec);
(gdb) bt
#0  0x13b162 in ZoneParser::eatLine (this=0xcfbfc314, line=@0xcfbfb6a4, rec=@0xcfbfb634) at backends/bind/zoneparser2.cc:236
#1  0x1390a1 in ZoneParser::parse (this=0xcfbfc314, fname=@0x283bc4, origin=@0x283bc0, domain_id=1) at backends/bind/zoneparser2.cc:96
#2  0x16b2e8 in BindBackend::loadConfig (this=0x26e420, status=0x0) at backends/bind/bindbackend.cc:551
#3  0x16a03f in BindBackend::BindBackend (this=0x26e420, suffix=@0x272df4) at backends/bind/bindbackend.cc:474
#4  0x1803f8 in BindFactory::make (this=0x271040, suffix=@0x272df4) at backends/bind/bindbackend.cc:833
#5  0x79a0a in BackendMakerClass::all (this=0x26d900) at dnsbackend.cc:178
#6  0xb421a in UeberBackend::UeberBackend (this=0x27f408, pname=@0x26ccc0) at ueberbackend.cc:210
#7  0x33f22 in PacketHandler::PacketHandler (this=0x27f400) at packethandler.cc:45
#8  0x492dd in TCPNameserver::go (this=0x274440) at tcpreceiver.cc:72
#9  0x1116dc in mainthread () at common_startup.cc:267
#10 0xa8dfc in main (argc=2, argv=0xcfbfd6e4) at receiver.cc:555
(gdb) quit

Anybody has a clue on how to get this fixed?  Would it be of any use
if I build with a more recent gcc?  Or is something else wrong here?
Should I give more information?

FYI: When running with

 zone "mdcc.cx" {
  type master;
  file "/usr/local/etc/bind/mdcc.cx";
 };

in named.conf and no slave setting in pdns.conf, things work
reasonably smooth.

Any help would be greatly appreciated.

Bye,

Joost

-- 
                               . .                  http://mdcc.cx/
Joost van Baal                .   .
                              .   .           http://banach.uvt.nl/
                               . .            http://logreport.org/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://mailman.powerdns.com/pipermail/pdns-dev/attachments/20030828/fac1a036/attachment.bin


More information about the Pdns-dev mailing list