[Bug 430358] [NEW] bind9 + DLZ core dumps on AFXR request

Jon Austin jonoaustin at gmail.com
Wed Sep 16 00:26:27 BST 2009


Public bug reported:

Binary package hint: bind9

Hi there

I'm having a few problems with DLZ and BIND crashing when a slave
server requests a zone transfer (my secondary DNS host does not
support DLZ).

I've built the BIND package on Ubuntu 8.10 x86. The steps I took to
build it was

apt-get install build-essential
apt-get install libmysqlclient15-dev
apt-get build-dep bind9
mkdir /usr/src/local/bind9
cd /usr/src/local/bind9
apt-get source bind9
cd bind9-9.5.0.dfsg.P2/
vim debian/rules
change  --with-dlz-mysql=no to  --with-dlz-mysql=yes
dpkg-buildpackage -b
dpkg - install debs

I believe it built ok with some warnings. The .debs installed ok, just
a minor issue with rndc and keys.

After a bit of mucking around with configs, any normal lookup works
fine, no errors produced when running named with -d1 console output.
However, when I trigger a AFXR request (using testing host configured
as static slave zone):

14-Sep-2009 21:39:16.173
Query String: select zone from dns_records where zone = 'domainzone.com'

14-Sep-2009 21:39:16.173
Query String: select ttl, type, mx_priority, case when
lower(type)='txt' then concat('"', data, '"') when lower(type) = 'soa'
then concat_ws(' ', data, resp_person, serial, refresh, retry, expire,
minimum) else data end from dns_records where zone = 'domainzone.com'
and host = '@'

14-Sep-2009 21:39:16.173
Query String: select ttl, type, mx_priority, case when
lower(type)='txt' then concat('"', data, '"') when lower(type) = 'soa'
then concat_ws(' ', data, resp_person, serial, refresh, retry, expire,
minimum) else data end from dns_records where zone = 'domainzone.com'
and host = '@'

14-Sep-2009 21:39:17.047
Query String: select zone from dns_records where zone = 'domainzone.com'

14-Sep-2009 21:39:17.047
Query String: select zone from xfr_table where zone = 'domainzone.com'
and client = '203.x.x.x'

14-Sep-2009 21:39:17.047
Query String: select ttl, type, mx_priority, case when
lower(type)='txt' then concat('"', data, '"') when lower(type) = 'soa'
then concat_ws(' ', data, resp_person, serial, refresh, retry, expire,
minimum) else data end from dns_records where zone = 'domainzone.com'
and host = '@'

14-Sep-2009 21:39:17.047
Query String: select ttl, type, host, mx_priority, case when
lower(type)='txt' then concat('"', data, '"') else data end,
resp_person, serial, refresh, retry, expire, minimum from dns_records
where zone = 'domainzone.com'

14-Sep-2009 21:39:17.048
Query String: select ttl, type, mx_priority, case when
lower(type)='txt' then concat('"', data, '"') when lower(type) = 'soa'
then concat_ws(' ', data, resp_person, serial, refresh, retry, expire,
minimum) else data end from dns_records where zone = 'domainzone.com'
and host = '@'

14-Sep-2009 21:39:17.048 zone.c:2514: REQUIRE((((source) != ((void
*)0)) && (((const isc__magic_t *)(source))->magic == ((('Z') << 24 |
('O') << 16 | ('N') << 8 | ('E')))))) failed
14-Sep-2009 21:39:17.048 exiting (due to assertion failure)
Aborted (core dumped)

My table structure is as follows (apologies for formatting)
mysql> select * from dns_records;
+----+-------------------------+---------+-------+------------------------------+------+-------------+---------+-------+--------+---------+------------+-----------------+---------------+------------+
| id | zone                    | host    | type  | data
         | ttl  | mx_priority | refresh | retry | expire | minimum |
serial     | resp_person     | primary_ns    | data_count |
+----+-------------------------+---------+-------+------------------------------+------+-------------+---------+-------+--------+---------+------------+-----------------+---------------+------------+
|  9 | domainzone.com | staging | CNAME | www.domainzone.com. | 3600 |
       NULL |    NULL |  NULL |   NULL |    NULL |       NULL | NULL
         | NULL          |          0 |
| 11 | domainzone.com | www     | A     | 1.2.3.4                |
3600 |        NULL |    NULL |  NULL |   NULL |    NULL |       NULL |
NULL            | NULL          |          0 |
| 12 | domainzone.com | @       | MX    | ASPMX.L.GOOGLE.COM.
| 3600 |           1 |    NULL |  NULL |   NULL |    NULL |       NULL
| NULL            | NULL          |          0 |
| 13 | domainzone.com | @       | MX    | ALT1.ASPMX.L.GOOGLE.COM.
| 3600 |           5 |    NULL |  NULL |   NULL |    NULL |       NULL
| NULL            | NULL          |          0 |
| 14 | domainzone.com | @       | MX    | ALT2.ASPMX.L.GOOGLE.COM.
| 3600 |           5 |    NULL |  NULL |   NULL |    NULL |       NULL
| NULL            | NULL          |          0 |
| 15 | domainzone.com | @       | MX    | ASPMX2.GOOGLEMAIL.COM.
| 3600 |          10 |    NULL |  NULL |   NULL |    NULL |       NULL
| NULL            | NULL          |          0 |
| 16 | domainzone.com | @       | MX    | ASPMX3.GOOGLEMAIL.COM.
| 3600 |          10 |    NULL |  NULL |   NULL |    NULL |       NULL
| NULL            | NULL          |          0 |
| 17 | domainzone.com | @       | SOA   | ns1.domainzone.com.
     | 3601 |        NULL |    3602 |  3603 |  86400 |    3604 |
2008082700 | admin.domainzone.com | ns1.domainzone.com |          0 |
| 18 | domainzone.com | @       | NS    | ns1.domainzone.com.
     | 3600 |        NULL |    NULL |  NULL |   NULL |    NULL |
NULL | NULL            | NULL          |          0 |
| 20 | domainzone.com | @       | NS    | ns4.us.editdns.net.
| 3600 |        NULL |    NULL |  NULL |   NULL |    NULL |       NULL
| NULL            | NULL          |          0 |
| 21 | domainzone.com | @       | NS    | ns5.us.editdns.net.
| 3600 |        NULL |    NULL |  NULL |   NULL |    NULL |       NULL
| NULL            | NULL          |          0 |
+----+-------------------------+---------+-------+------------------------------+------+-------------+---------+-------+--------+---------+------------+-----------------+---------------+------------+

mysql> select * from xfr_table;
+-------------------------+-----------------+
| zone                    | client          |
+-------------------------+-----------------+
| domainzone.com | 96.31.74.171    |
| domainzone.com | 203.x.x.x |
+-------------------------+-----------------+

And my BIND config is as follows:

dlz "Mysql zone" {
        database "mysql
{host=127.0.0.1 dbname=bind port=3306 user=xxx pass=xxx}
{select zone from dns_records where zone = '%zone%'}
{select ttl, type, mx_priority, case when lower(type)='txt' then
concat('\"', data, '\"') when lower(type) = 'soa' then concat_ws(' ',
data, resp_person, serial, refresh, retry, expire, minimum) else data
end from dns_records where zone = '%zone%' and host = '%record%'}
{}
{select ttl, type, host, mx_priority, case when lower(type)='txt' then
concat('\"', data, '\"') else data end, resp_person, serial, refresh,
retry, expire, minimum from dns_records where zone = '%zone%'}
{select zone from xfr_table where zone = '%zone%' and client = '%client%'}";
        };

In terms of troubleshooting:

1. The source package I used was bind9-9.5.0.dfsg.P2 (from Ubuntu
repository). Is there any way to tell what revision of DLZ is applied
to this source?

2. Does my table data look correct? I had a bit of a problem early on
that I fixed by setting unused fields (such as serial in an A record)
to NULL, although this could have been fixed by me experimenting with
the queries in named config.

3. I found the following references which might be relevant

https://bugzilla.redhat.com/show_bug.cgi?id=454783

http://www.mail-archive.com/comp-protocols-dns-bind <at>
isc.org/msg00134.html

I would prefer to only use debian sources for build as it will make
deployment and maintainence much easier. Any suggestions are greatly
appreciated.

Regards

Jon

** Affects: bind9 (Ubuntu)
     Importance: Undecided
         Status: New


** Tags: bind dns

-- 
bind9 + DLZ core dumps on AFXR request
https://bugs.launchpad.net/bugs/430358
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to bind9 in ubuntu.



More information about the Ubuntu-server-bugs mailing list