Subject: Workaround: bind9 compiles fine on macppc/NetBSD-2.0_STABLE but does
To: None <port-macppc@netbsd.org>
From: Mathias Breuninger <mathias@espace29.asso.fr>
List: port-macppc
Date: 02/22/2005 17:49:43
Hi all,

I've got exactly the same problem that John Klos reported:

 >Subject: 2.0 and BIND 9.3.0
 >To: None <port-macppc@netbsd.org>
 >From: John Klos <john@klos.com>
 >List: port-macppc
 >Date: 12/07/2004 16:48:55
 >
 >Hi,

 >Is anyone running BIND 9.3.0 on NetBSD 2.0? Until I have a spare local 
 >2.0
 >macppc machine that's local, I can't diagnose my problems very easily,
 >but it seems there are problems with certain setups where I get this:
 >
 >Nov 30 17:00:59 lain named[368]: rbt.c:1584: INSIST(child != (void 
*)0) >failed
 >Nov 30 17:00:59 lain named[368]: exiting (due to assertion failure)
 >
 >Dec  6 03:00:00 winona named[21936]: rbt.c:1584: INSIST(child != (void 
 >*)0) failed
 >Dec  6 03:00:00 winona named[21936]: exiting (due to assertion failure)
 >
 >(both of these machines are colocated, so I've had to revert to 9.2.3)
 >
 >This doesn't happen on 2.0 on other architectures, or with 9.3.0 on >1.6.2
 >on PowerPC.
 >
 >Does anyone have the time / wherewithal to look into this?
 >
 >Thanks,
 >John Klos
 >--
 >Quidquid latine dictum sit, altum viditur.

Bind 9.3.0 was running fine on NetBSD-1.6.1-macppc.

Bind 9.3.0 is running here fine on NetBSD-2.0_STABLE-i386.
I found a workaround on the debian mailing list:

 >Package: gcc-3.3
 >Version: 3.3.5-6
 >Severity: normal
 >
 >gcc 3.3 apparently does not compile correctly lib/dns/rbt.c from
 >BIND 9.3, which then will die on startup with an assertion failure.
 >
 >Workarounds known to fix this:
 >- compiling rbt.c without -O2
 >- removing "inline" from rotate_left() and rotate_right()
 >- using gcc 3.4
 >
 >Let me know if you need assistance debugging this.
 >I can also provide a set of BIND configuration files which can reliably
 >trigger the bug.
 >
 >-- System Information:
 >Debian Release: 3.1
 >  APT prefers unstable
 >  APT policy: (500, 'unstable')
 >Architecture: powerpc (ppc)
 >Kernel: Linux 2.6.6-b50
 >Locale: LANG=it_IT@euro, LC_CTYPE=it_IT@euro
 >
 >--
 >ciao,
 >Marco


As a matter of fact, I suppress the "inline" directives for the 
rotate_left() and rotate_right() function in rbt.c and now it works like 
a charm.

I don't know who is the bind9 package maintainer nor if it is the proper 
way to correct the bug but it works.

Sorry for my english. I hope it helps.

Mathias Breuninger
Quimper
Bretagne