Attempting to run bind 9.2.2-p1 causes a segfault. Standard configuration is used. GDB output is attached to the bug. Reproducible: Always Steps to Reproduce: 1. run named -g Actual Results: Version is printed and then named segfaults Expected Results: named starts Gentoo Base System version 1.4.15 Portage 2.0.50-r7 (default-ppc-2004.1, gcc-3.3.3, glibc-2.3.3_pre20040420-r1, 2.6.5-gentoo-r1) =============================================================== == System uname: 2.6.5-gentoo-r1 ppc PPC970, altivec supported Autoconf: sys-devel/autoconf-2.58-r1 Automake: sys-devel/automake-1.8.3 ACCEPT_KEYWORDS="ppc" AUTOCLEAN="yes" CFLAGS="-O3 -mcpu=powerpc -pipe -g" CHOST="powerpc-unknown-linux-gnu" COMPILER="gcc3" CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config /usr/share/config /var/ qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d" CXXFLAGS="-O3 -mcpu=powerpc -pipe -g" DISTDIR="/usr/portage/distfiles" FEATURES="ccache nostrip" GENTOO_MIRRORS="http://gentoo.oregonstate.edu http://www.ibiblio.org/pub/Linux/distributions/ gentoo" MAKEOPTS="-j3" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="altivec berkdb gdbm ldap libwww mitshm nls pam perl ppc python readline sasl ssl zlib"
Created attachment 32667 [details] GDB output for segfault
I am using gentoo-dev-sources on a DP 2Ghz G5. I am running the same version of BIND on a DP 1Ghz G4 Xserve perfectly fine. The Xserve is running ppc-sources however.
This appears to be related to bug 50705. I looked through the source and it appears that parameters being passed NULL were becoming 0x1. This obviously isn't right and appears to be a compiler bug. I'm reverted to gcc 3.2.3 and will see if it is fixed.
Reverting to 3.2.3 fixes the issue.
testing with gcc-3.4.0
builds fine with gcc-3.4.0. Have made a newer version available too which provides mysql linking support. pvdabeel@dual-g5 bind $ /usr/sbin/named -g Aug 19 22:09:42.370 starting BIND 9.2.2-P1 -g Aug 19 22:09:42.371 using 2 CPUs Aug 19 22:09:42.375 loading configuration from '/etc/bind/named.conf' Aug 19 22:09:42.376 listening on IPv4 interface lo, 127.0.0.1#53 Aug 19 22:09:42.376 could not listen on UDP socket: permission denied Aug 19 22:09:42.376 creating IPv4 interface lo failed; interface ignored Aug 19 22:09:42.376 not listening on any interfaces Aug 19 22:09:42.379 none:0: open: /etc/bind/rndc.key: permission denied Aug 19 22:09:42.379 couldn't add command channel 127.0.0.1#953: permission denied Aug 19 22:09:42.380 none:0: open: /etc/bind/rndc.key: permission denied Aug 19 22:09:42.380 couldn't add command channel ::1#953: permission denied Aug 19 22:09:42.380 ignoring config file logging statement due to -g option Aug 19 22:09:42.380 couldn't open pid file '/var/run/named/named.pid': Permission denied Aug 19 22:09:42.380 exiting (due to early fatal error) pvdabeel@dual-g5 bind $
Had same problem, also on PPC, and with gcc 3.4.x, fixed it by using -O2 instead of -O3 ... seems like -O3 is broken for gcc 3.4.x even on G3s (my case), just like G4s (even though make.conf.example says -O3 is fine for G3s)
This appears to still be broken with BIND 9.2.5-r4 and 9.3.1-r4 and GCC 3.4.4-r1 ( I still get segfaults on BIND startup). As mentioned, swapping make.conf from "-O3" to "-O2" on a G3 processor fixes the problem.