From owner-freebsd-stable Tue Mar 20 9: 1:41 2001 Delivered-To: freebsd-stable@freebsd.org Received: from cosa.uk-legal.net (cosa.uk-legal.net [212.240.216.34]) by hub.freebsd.org (Postfix) with ESMTP id C2FC537B718 for ; Tue, 20 Mar 2001 09:01:35 -0800 (PST) (envelope-from andrew@cosa.uk-legal.net) Received: by cosa.uk-legal.net (Postfix, from userid 1000) id 66B5411289; Tue, 20 Mar 2001 17:01:34 +0000 (GMT) Received: from localhost (localhost [127.0.0.1]) by cosa.uk-legal.net (Postfix) with ESMTP id 5A4911A; Tue, 20 Mar 2001 17:01:34 +0000 (GMT) Date: Tue, 20 Mar 2001 17:01:34 +0000 (GMT) From: Andrew Tulloch To: Hroi Sigurdsson Cc: stable@FreeBSD.ORG, new-httpd@apache.org Subject: Re: /usr/ports/apache13 & sig11 In-Reply-To: <20010320174332.A31024@chewbacca.netgroup.dk> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=X-UNKNOWN Content-Transfer-Encoding: QUOTED-PRINTABLE Sender: owner-freebsd-stable@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG One ServerName directive later and it works :) Thanks!=20 Andrew On Tue, 20 Mar 2001, Hroi Sigurdsson wrote: > CC'ed to new-httpd@apache.org. More below. >=20 > On Tue, Mar 20, 2001 at 03:53:08PM +0000, Andrew Tulloch wrote: >=20 > > I built apache from the ports updated this morning using cvsup and for > > some reason everytime I run `apachectl start` httpd Sig 11 core dumps. = The > > machine itself seems to be fine apart from this having postfix/cyrus-im= apd > > running fine for a few days since I built the machine. Its also hosted = a > > couple of buildworlds so I don't think the ram is at fault, although I > > also tried swapping it out to be sure. > >=20 > > a quick gdb /usr/local/sbin/httpd httpd.core and bt gave > > (gdb) bt > > #0 0x8064287 in ap_get_local_host () > > #1 0x80616c0 in ap_fini_vhost_config () > > #2 0x80539a3 in ap_read_config () > > #3 0x805b408 in main () > > #4 0x804ea11 in _start () > >=20 > > and seems to be the same for every dump. > > dmesg below.. > >=20 > > Any help would be greatly appreciated! :) >=20 > This is most likely not a bug in FreeBSD. I've seen the exact same thing = on > Linux, Apache 1.3.19: >=20 > This GDB was configured as "i686-pc-linux-gnu"... > (gdb) run -X > Starting program: /usr/pkg/apache/bin/httpd -X >=20 > Program received signal SIGSEGV, Segmentation fault. > 0x808d263 in ap_get_local_host (a=3D0x80de99c) at util.c:2051 > 2051=09util.c: No such file or directory. > (gdb) where > #0 0x808d263 in ap_get_local_host (a=3D0x80de99c) at util.c:2051 > #1 0x808920d in ap_fini_vhost_config (p=3D0x80de99c, main_s=3D0x80de9c4) > at http_vhost.c:548 > #2 0x8075dd9 in ap_read_config (p=3D0x80de99c, ptemp=3D0x80e29bc,=20 > confname=3D0x80cf5c0 "conf/httpd.conf") at http_config.c:1595 > #3 0x80804ec in main (argc=3D2, argv=3D0xbffffdb4) at http_main.c:4986 > (gdb) print str > $1 =3D "slave0-1\000-\001@=EC=F8=FF=BFH*\001@\000\000\000@=CC=F8=FF=BF=C8= =F8=FF=BF=E0-\001@=C4=F8=FF=BF\002\000\000\000=E0-\001@H*\001@=C80\001@(\b\= 000@\016\024\000" > (gdb) print sizeof(str) > $2 =3D 64 > (gdb) disassemble=20 > Dump of assembler code for function ap_get_local_host: > 0x808d1b4 :=09push %ebp > 0x808d1b5 :=09mov %esp,%ebp > 0x808d1b7 :=09sub $0x58,%esp > 0x808d1ba :=09movl $0x0,0xffffffbc(%ebp) > 0x808d1c1 :=09add $0xfffffff8,%esp > 0x808d1c4 :=09push $0x3f > 0x808d1c6 :=09lea 0xffffffc0(%ebp),%eax > 0x808d1c9 :=09push %eax > 0x808d1ca :=09call 0x804f678 > 0x808d1cf :=09add $0x10,%esp > 0x808d1d2 :=09mov %eax,%eax > 0x808d1d4 :=09test %eax,%eax > 0x808d1d6 :=09 > je 0x808d220 > 0x808d1d8 :=09add $0xfffffff8,%esp > 0x808d1db :=09mov 0x80cd590,%eax > 0x808d1e0 :=09push %eax > 0x808d1e1 :=09push $0x80c59a0 > 0x808d1e6 :=09push $0x0 > 0x808d1e8 :=09push $0x4 > 0x808d1ea :=09push $0x7f8 > 0x808d1ef :=09push $0x80c54fa > 0x808d1f4 :=09call 0x807b940 > [snip] >=20 > The line in question is=20 > if (gethostname(str, sizeof(str) - 1) !=3D 0) { >=20 > At first I thought it was a bug in glibc/linux. >=20 > A work-around is setting the ServerName directive in httpd.conf so that > ap_get_local_host() doesn't get called. >=20 > --=20 > Hroi Sigurdsson hroi@netgroup.dk > Netgroup A/S http://www.netgroup.dk >=20 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message