named-checkconf core dump (bind-9.3.1rc1)

Stefan Puiu stefanpuiu at itcnetworks.ro
Mon Feb 21 17:00:54 UTC 2005



I have the same problem using libisc, libdns and friends to parse a zone 
file in an application on Solaris (!) 9 on SPARC. The code crashes in 
isc_hash_calc, also inside a call to dns_zone_load (a cross platform 
bug?). I was going to say it crashed in the same place, but the line 
numbers in my trace are a little different - John, have you been editing 
the source code? I haven't. At first I thought there was something wrong 
with the way I was using the BIND libs, but since named-checkconf 
exhibits the same behaviour, I suppose it's something in libdns/libisc. 
I'll post a bug report to bind9-bugs as soon as I get a better 
understanding of this (i.e. running the code through Sun Workshop/dbx). 
The stack trace is below.

(/opt/SUNWspro/bin/../WS6U2/bin/sparcv9/dbx) where
current thread: t at 1
  [1] _lwp_kill(0x0, 0x6, 0x0, 0xfebbc000, 0x5, 0xff00), at 0xfeb9f81c
  [2] raise(0x6, 0x0, 0xffbfdcd0, 0xfebbc000, 0x58c988, 0x573edc), at 
0xfeb50a1c
  [3] abort(0x0, 0x52ff58, 0x531578, 0x17f, 0x52ff44, 0x531580), at 
0xfeb36cd8
=>[4] default_callback(file = 0x531578 "hash.c", line = 383, type = 
isc_assertiontype_insist, cond = 0x531580 "hash != 0 && ((((hash)) != 0) 
&& (((const isc__magic_t *)((hash)))->magic == ((('H') << 24 | ('a') << 
16 | ('s') << 8 | ('h')))))"), line 91 in "assertions.c"
  [5] isc_hash_calc(key = 0x575818 "^B10^Gin-addr^Darpa", keylen = 17U, 
case_sensitive = isc_boolean_false), line 383 in "hash.c"
  [6] dns_name_fullhash(name = 0x57ca98, case_sensitive = 
isc_boolean_false), line 446 in "name.c"
  [7] hash_add_node(rbt = 0x590b00, node = 0x58c988, name = 0x57ca98), 
line 1476 in "rbt.c"
  [8] hash_node(rbt = 0x590b00, node = 0x58c988, name = 0x57ca98), line 
1544 in "rbt.c"
  [9] dns_rbt_addnode(rbt = 0x590b00, name = 0x57ca98, nodep = 
0x57cb58), line 387 in "rbt.c"
  [10] dns_rbtdb_create(mctx = 0x58c908, origin = 0x57c798, type = 
dns_dbtype_zone, rdclass = 1U, argc = 0, argv = 0x573edc, driverarg = 
(nil), dbp = 0xffbfed8c), line 4944 in "rbtdb.c"
  [11] dns_db_create(mctx = 0x58c908, db_type = 0x5a6100 "rbt", origin = 
0x57c798, type = dns_dbtype_zone, rdclass = 1U, argc = 0, argv = 
0x573edc, dbp = 0xffbfed8c), line 131 in "db.c"
  [12] zone_load(zone = 0x57c738, flags = 0), line 1041 in "zone.c"
  [13] dns_zone_load(zone = 0x57c738), line 1083 in "zone.c"

uname -a yields:
SunOS opydev 5.9 Generic_117171-13 sun4u sparc SUNW,Ultra-2


John Hascall wrote:

>Any ideas on why?
>
># /usr/local/sbin/named-checkconf -t /var/chroot/named -z
>hash.c:383: INSIST(hash != 0 && ((((hash)) != 0) && \
>(((const isc__magic_t *)((hash)))->magic == \
>( (('H') << 24 | ( 'a') << 16 | ( 's') << 8 | ( 'h')))))) failed.
>Abort(core dumped)
>
>#  uname -a
>NetBSD vs-1.iastate.edu 1.6ZK NetBSD 1.6ZK (GENERIC) #2: \
>Fri Mar 26 15:27:11 CST 2004  \
>gendalia at draal.ait.iastate.edu:/usr/obj/kern/i386/GENERIC i386
>
># gdb /usr/local/sbin/named-checkconf \
>/var/chroot/named/etc/namedb/named-checkconf.core
>     :
>  (blah blah blah)
>     :
>(gdb) bt
>#0  0x48270c4b in kill () from /usr/lib/libc.so.12
>#1  0x482e4097 in abort () from /usr/lib/libc.so.12
>#2  0x0813b578 in default_callback (file=0x817fc6a "hash.c", line=383, 
>    type=isc_assertiontype_insist, 
>    cond=0x817fe80 "hash != 0 && ((((hash)) != 0) && (((const isc__magic_t *)((hash)))->magic == ( (('H') << 24 | ( 'a') << 16 | ( 's') << 8 | ( 'h')))))")
>    at assertions.c:91
>#3  0x0813dff1 in isc_hash_calc (
>    key=0x819f400 "\0010\0010\003127\ain-addr\004arpa", keylen=22, 
>    case_sensitive=isc_boolean_false) at hash.c:383
>#4  0x08055e92 in dns_name_fullhash (name=0x8198010, 
>    case_sensitive=isc_boolean_false) at name.c:445
>#5  0x08139f0d in hash_add_node (rbt=0x8193240, node=0x818c100, name=0x8198010)
>    at rbt.c:1476
>#6  0x08137c1b in hash_node (rbt=0x8193240, node=0x818c100, name=0x8198010)
>    at rbt.c:1544
>#7  0x0813550e in dns_rbt_addnode (rbt=0x8193240, name=0x8198010, 
>    nodep=0x8198064) at rbt.c:387
>#8  0x080e517d in dns_rbtdb_create (mctx=0x818c000, origin=0x819702c, 
>    type=dns_dbtype_zone, rdclass=1, argc=0, argv=0x8194f74, driverarg=0x0, 
>    dbp=0xbfbff7a8) at rbtdb.c:4943
>#9  0x080bfa6a in dns_db_create (mctx=<incomplete type>, 
>    db_type=<incomplete type>, origin=0x819702c, type=dns_dbtype_zone,
>    rdclass=1, argc=0, argv=0x8194f74, dbp=0xbfbff7a8) at db.c:129
>#10 0x080a0be3 in zone_load (zone=0x8197000, flags=0) at zone.c:1036
>#11 0x080a0da8 in dns_zone_load (zone=0x8197000) at zone.c:1083
>#12 0x0804b517 in load_zone (mctx=0x818c000, zonename=<incomplete type>, 
>    filename=<incomplete type>, classname=<incomplete type>, zonep=0x0)
>    at check-tool.c:120
>#13 0x0804aac4 in configure_zone (vclass=0x81945e0 "in", view=0x81945d0 "in", 
>    zconfig=0x819bf40, mctx=0x818c000) at ./named-checkconf.c:117
>#14 0x0804abc9 in configure_view (vclass=0x81945e0 "in", view=0x81945d0 "in", 
>    config=0x81932c0, vconfig=0x819bc00, mctx=0x818c000)
>    at ./named-checkconf.c:149
>#15 0x0804acee in load_zones_fromconfig (config=0x81932c0, mctx=0x818c000)
>    at ./named-checkconf.c:184
>#16 0x0804b0c1 in main (argc=4, argv=0xbfbffbc8) at ./named-checkconf.c:272
>#17 0x0804a670 in ___start ()
>(gdb) up 3
>#3  0x0813dff1 in isc_hash_calc (
>    key=0x819f400 "\0010\0010\003127\ain-addr\004arpa", keylen=22, 
>    case_sensitive=isc_boolean_false) at hash.c:383
>383     hash.c: No such file or directory.
>        in hash.c
>(gdb) print hash
>$1 = (isc_hash_t *) 0x0
>
>
>Even this trimmed down config file generates the error:
>
>        zone "0.0.127.in-addr.arpa" in {
>                type master;
>                file "127.db";
>        };
>
>It looks to me like isc_hash_create() isn't getting called
>and if I read the code correctly it ought to have been.
>
>
>John
>
>
>
>  
>



More information about the bind-users mailing list