[Pdns-users] wildcard throws signal 11

Gary W. Smith gary at primeexalia.com
Sat May 12 16:09:44 UTC 2007


Bert, 

Well, after I typed everything below I found that the affected DNS
records had no serial (as you also indicated).  I made the change and
everything seems happy now.  The serials should be inserted via script
into the database but for some reason it's not working properly right
now.

Is there a way to ramp up the logging on this?  Or better question, what
should the loglevel be to get max debug information?

BTW, thanks...

Gary Wayne Smith

> Can you be a bit more precise? What kind of request exactly?

In the database we have www.domain.tld and *.domain.tld.  When we issue
a request for www.domain.tld the world is a happy place.  A request for
foo.domain.tld results in the signal 11

> 
> From this (excellent) backtrace, I can see that your SOA record has no
> serial defined, and PowerDNS is trying to auto-calculate it, and is
> crashing
> in the progress.
> 
> Can you send me your configuration? Did you change the gsql queries?
> 
> If you fix your SOA record to contain a serial number, the problem
will
> go
> away, but the underlying crash problem is then still there.
> 
> Good luck!

Here is the config file and the corresponding DNS record, or at least
the relevant parts.  For the SOA, we build it dynamically from the
database.  As for the serial number, it should be a positive int (not
necessarily compliant but we're working on that part).

domain_id  dnsentry_id  dns_name  dns_type  dns_content  dns_ttl
dns_prio 
2000062 1083 test.local NS ns1.test.local 86400 NULL
2000062 1084 test.local NS ns2.test.local 86400 NULL 
2000062 1085 test.local SOA DYNAMIC 86400 NULL 
2000062 1086 test.local MX clientmx1.test.local 120 20 
2000062 1087 test.local MX clientmx2.test.local 120 30 
2000062 1088 test.local MX clientmx3.test.local 120 40 
2000062 1089 test.local A 10.0.16.30 120 NULL 
2000062 1090 *.test.local A 10.0.16.30 120 NULL
2000062 1091 www.test.local A 10.0.16.30 120 NULL

config-dir=/etc/pdns/      # Location of configuration directory
(pdns.conf)
launch=gmysql               # Launch this backend
module-dir=/usr/lib/pdns   # Default directory for modules

wildcards=yes 

log-dns-details=yes
logging-facility=6
loglevel=7
log-failed-updates=yes

local-address=10.0.16.13

setgid=pdns              
setuid=pdns                
socket-dir=/var/run        # Where the controlsocket will live

webserver=yes             # Start a webserver for monitoring
webserver-address=0.0.0.0
webserver-port=5353
webserver-password=ddd


gmysql-host=10.0.16.12
gmysql-socket=3306
gmysql-dbname=pdns
gmysql-user=pdnsreader
gmysql-password=pdnsreader


gmysql-basic-query=SELECT IF (domaindnsentries.dns_type='SOA', CONCAT(
CONVERT('ns1.test.local administrator at test.local ' USING utf8),
domains.dns_serial, CONVERT(' 900 600 86400 3600 ' USING utf8) ),
domaindnsentries.dns_content) as content,
domaindnsentries.dns_ttl,domaindnsentries.dns_prio,
domaindnsentries.dns_type, domaindnsentries.domain_id,
domains.domain_name \
FROM domains INNER JOIN domaindnsentries ON domains.domain_id =
domaindnsentries.domain_id \
WHERE domains.active=1 AND domaindnsentries.dns_type='%s' AND
domaindnsentries.dns_name='%s'

gmysql-id-query=SELECT IF (domaindnsentries.dns_type='SOA', CONCAT(
CONVERT('ns1.test.local administrator at test.local ' USING utf8),
domains.dns_serial, CONVERT(' 900 600 86400 3600 ' USING utf8) ),
domaindnsentries.dns_content) as content,
domaindnsentries.dns_ttl,domaindnsentries.dns_prio,
domaindnsentries.dns_type, domaindnsentries.domain_id,
domains.domain_name \
FROM domains INNER JOIN domaindnsentries ON domains.domain_id =
domaindnsentries.domain_id \
WHERE domains.active=1 AND domaindnsentries.dns_type='%s' AND
domaindnsentries.dns_name='%s' AND domains.domain_id=%d

gmysql-any-query=SELECT IF (domaindnsentries.dns_type='SOA', CONCAT(
CONVERT('ns1.test.local administrator at test.local ' USING utf8),
domains.dns_serial, CONVERT(' 900 600 86400 3600 ' USING utf8) ),
domaindnsentries.dns_content) as content,
domaindnsentries.dns_ttl,domaindnsentries.dns_prio,
domaindnsentries.dns_type, domaindnsentries.domain_id,
domains.domain_name \
FROM domains INNER JOIN domaindnsentries ON domains.domain_id =
domains.domain_id \
WHERE domains.active=1 AND domaindnsentries.dns_name='%s'

gmysql-any-id-query=SELECT IF (domaindnsentries.dns_type='SOA', CONCAT(
CONVERT('ns1.test.local administrator at test.local ' USING utf8),
domains.dns_serial, CONVERT(' 900 600 86400 3600 ' USING utf8) ),
domaindnsentries.dns_content) as content,
domaindnsentries.dns_ttl,domaindnsentries.dns_prio,
domaindnsentries.dns_type, domaindnsentries.domain_id,
domains.domain_name \
FROM domains INNER JOIN domaindnsentries ON domains.domain_id =
domaindnsentries.domain_id \
WHERE domains.active=1 AND domaindnsentries.dns_name='%s' AND
domains.domainid=%d

gmysql-list-query=SELECT IF (domaindnsentries.dns_type='SOA', CONCAT(
CONVERT('ns1.test.local administrator at test.local ' USING utf8),
domains.dns_serial, CONVERT(' 900 600 86400 3600 ' USING utf8) ),
domaindnsentries.dns_content) as content,
domaindnsentries.dns_ttl,domaindnsentries.dns_prio,
domaindnsentries.dns_type, domaindnsentries.domain_id,
domains.domain_name \
FROM domains INNER JOIN domaindnsentries ON domains.domain_id =
domaindnsentries.domain_id \
WHERE domains.active=1 AND domaindnsentries.dns_name='%s' AND
domains.domain_name=%d



gmysql-wildcard-query=SELECT IF (domaindnsentries.dns_type='SOA',
CONCAT( CONVERT('ns1.test.local administrator at test.local ' USING utf8),
domains.dns_serial, CONVERT(' 900 600 86400 3600 ' USING utf8) ),
domaindnsentries.dns_content) as content,
domaindnsentries.dns_ttl,domaindnsentries.dns_prio,
domaindnsentries.dns_type, domaindnsentries.domain_id,
domains.domain_name \
FROM domains INNER JOIN domaindnsentries ON domains.domain_id =
domaindnsentries.domain_id \
WHERE domains.active=1 AND domaindnsentries.dns_type='%s' AND
domaindnsentries.dns_name LIKE '%s'

gmysql-wildcard-id-query=SELECT IF (domaindnsentries.dns_type='SOA',
CONCAT( CONVERT('ns1.test.local administrator at test.local ' USING utf8),
domains.dns_serial, CONVERT(' 900 600 86400 3600 ' USING utf8) ),
domaindnsentries.dns_content) as content,
domaindnsentries.dns_ttl,domaindnsentries.dns_prio,
domaindnsentries.dns_type, domaindnsentries.domain_id,
domains.domain_name \
FROM domains INNER JOIN domaindnsentries ON domains.domain_id =
domaindnsentries.domain_id \
WHERE domains.active=1 AND domaindnsentries.dns_type='%s' AND
domaindnsentries.dns_name LIKE '%s' AND domains.domain_id=%d

gmysql-wildcard-any-query=SELECT IF (domaindnsentries.dns_type='SOA',
CONCAT( CONVERT('ns1.test.local administrator at test.local ' USING utf8),
domains.dns_serial, CONVERT(' 900 600 86400 3600 ' USING utf8) ),
domaindnsentries.dns_content) as content,
domaindnsentries.dns_ttl,domaindnsentries.dns_prio,
domaindnsentries.dns_type, domaindnsentries.domain_id,
domains.domain_name \
FROM domains INNER JOIN domaindnsentries ON domains.domain_id =
domaindnsentries.domain_id \
WHERE domains.active=1 AND domaindnsentries.dns_name LIKE '%s'

gmysql-wildcard-any-id-query=SELECT IF (domaindnsentries.dns_type='SOA',
CONCAT( CONVERT('ns1.test.local administrator at test.local ' USING utf8),
domains.dns_serial, CONVERT(' 900 600 86400 3600 ' USING utf8) ),
domaindnsentries.dns_content) as content,
domaindnsentries.dns_ttl,domaindnsentries.dns_prio,
domaindnsentries.dns_type, domaindnsentries.domain_id,
domains.domain_name \
FROM domains INNER JOIN domaindnsentries ON domains.domain_id =
domaindnsentries.domain_id \
WHERE domains.active=1 AND domaindnsentries.dns_name LIKE '%s' AND
domains.domain_id=%d


More information about the Pdns-users mailing list