From owner-freebsd-stable Tue Mar 20 8:43:44 2001 Delivered-To: freebsd-stable@freebsd.org Received: from secure.webhotel.net (secure.webhotel.net [195.41.202.80]) by hub.freebsd.org (Postfix) with SMTP id 706E337B718 for ; Tue, 20 Mar 2001 08:43:39 -0800 (PST) (envelope-from hroi@chewbacca.netgroup.dk) Received: (qmail 119002826 invoked from network); 20 Mar 2001 16:46:55 -0000 Received: from mail-gateway.webhotel.net (195.41.202.215) by mail.webhotel.net with SMTP; 20 Mar 2001 16:46:55 -0000 X-Authenticated-Timestamp: 17:46:55(CET) on March 20, 2001 Received: (from hroi@localhost) by chewbacca.netgroup.dk (8.11.3/8.9.3) id f2KGhWm31318; Tue, 20 Mar 2001 17:43:32 +0100 (CET) (envelope-from hroi) Date: Tue, 20 Mar 2001 17:43:32 +0100 From: Hroi Sigurdsson To: Andrew Tulloch Cc: stable@FreeBSD.ORG, new-httpd@apache.org Subject: Re: /usr/ports/apache13 & sig11 Message-ID: <20010320174332.A31024@chewbacca.netgroup.dk> References: Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit User-Agent: Mutt/1.2.5i In-Reply-To: ; from andrew@cosa.uk-legal.net on Tue, Mar 20, 2001 at 03:53:08PM +0000 Sender: owner-freebsd-stable@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG CC'ed to new-httpd@apache.org. More below. On Tue, Mar 20, 2001 at 03:53:08PM +0000, Andrew Tulloch wrote: > 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-imapd > 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. > > 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 () > > and seems to be the same for every dump. > dmesg below.. > > Any help would be greatly appreciated! :) This is most likely not a bug in FreeBSD. I've seen the exact same thing on Linux, Apache 1.3.19: This GDB was configured as "i686-pc-linux-gnu"... (gdb) run -X Starting program: /usr/pkg/apache/bin/httpd -X Program received signal SIGSEGV, Segmentation fault. 0x808d263 in ap_get_local_host (a=0x80de99c) at util.c:2051 2051 util.c: No such file or directory. (gdb) where #0 0x808d263 in ap_get_local_host (a=0x80de99c) at util.c:2051 #1 0x808920d in ap_fini_vhost_config (p=0x80de99c, main_s=0x80de9c4) at http_vhost.c:548 #2 0x8075dd9 in ap_read_config (p=0x80de99c, ptemp=0x80e29bc, confname=0x80cf5c0 "conf/httpd.conf") at http_config.c:1595 #3 0x80804ec in main (argc=2, argv=0xbffffdb4) at http_main.c:4986 (gdb) print str $1 = "slave0-1\000-\001@ìøÿ¿H*\001@\000\000\000@Ìøÿ¿Èøÿ¿à-\001@Äøÿ¿\002\000\000\000à-\001@H*\001@È0\001@(\b\000@\016\024\000" (gdb) print sizeof(str) $2 = 64 (gdb) disassemble Dump of assembler code for function ap_get_local_host: 0x808d1b4 : push %ebp 0x808d1b5 : mov %esp,%ebp 0x808d1b7 : sub $0x58,%esp 0x808d1ba : movl $0x0,0xffffffbc(%ebp) 0x808d1c1 : add $0xfffffff8,%esp 0x808d1c4 : push $0x3f 0x808d1c6 : lea 0xffffffc0(%ebp),%eax 0x808d1c9 : push %eax 0x808d1ca : call 0x804f678 0x808d1cf : add $0x10,%esp 0x808d1d2 : mov %eax,%eax 0x808d1d4 : test %eax,%eax 0x808d1d6 : je 0x808d220 0x808d1d8 : add $0xfffffff8,%esp 0x808d1db : mov 0x80cd590,%eax 0x808d1e0 : push %eax 0x808d1e1 : push $0x80c59a0 0x808d1e6 : push $0x0 0x808d1e8 : push $0x4 0x808d1ea : push $0x7f8 0x808d1ef : push $0x80c54fa 0x808d1f4 : call 0x807b940 [snip] The line in question is if (gethostname(str, sizeof(str) - 1) != 0) { At first I thought it was a bug in glibc/linux. A work-around is setting the ServerName directive in httpd.conf so that ap_get_local_host() doesn't get called. -- Hroi Sigurdsson hroi@netgroup.dk Netgroup A/S http://www.netgroup.dk To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message