From owner-freebsd-stable Wed Mar 21 5:24:54 2001 Delivered-To: freebsd-stable@freebsd.org Received: from mail1.bna.bellsouth.net (mail1.bna.bellsouth.net [205.152.150.13]) by hub.freebsd.org (Postfix) with ESMTP id 4568037B742 for ; Wed, 21 Mar 2001 05:24:50 -0800 (PST) (envelope-from trawickj@bellsouth.net) Received: from adsl-77-241-65.rdu.bellsouth.net (adsl-77-241-65.rdu.bellsouth.net [216.77.241.65]) by mail1.bna.bellsouth.net (3.3.5alt/0.75.2) with ESMTP id IAA14405; Wed, 21 Mar 2001 08:22:50 -0500 (EST) Received: (from trawick@localhost) by adsl-77-241-65.rdu.bellsouth.net (8.9.3/8.8.7) id IAA10677; Wed, 21 Mar 2001 08:20:17 -0500 X-Authentication-Warning: adsl-77-241-65.rdu.bellsouth.net: trawick set sender to trawickj@bellsouth.net using -f To: new-httpd@apache.org Cc: Hroi Sigurdsson , stable@FreeBSD.ORG Subject: Re: /usr/ports/apache13 & sig11 References: From: Jeff Trawick Date: 21 Mar 2001 08:20:11 -0500 In-Reply-To: Message-ID: Lines: 87 User-Agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/20.3 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: owner-freebsd-stable@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG There is a bug in Apache 1.3.19 which can cause a segfault when servername isn't coded and the local host can't be looked up for some reason. It is fixed in CVS, ready for 1.3.20. I certainly hope that fix is all you need. The patch is shown later on in the note. Andrew Tulloch writes: > One ServerName directive later and it works :) > > Thanks! > > Andrew > > On Tue, 20 Mar 2001, Hroi Sigurdsson wrote: > > > 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: definitely Apache 1.3.19 :( > > The line in question is > > if (gethostname(str, sizeof(str) - 1) != 0) { I hope not... The known fix is =================================================================== RCS file: /home/cvs/apache-1.3/src/main/util.c,v retrieving revision 1.194 retrieving revision 1.195 diff -u -r1.194 -r1.195 --- apache-1.3/src/main/util.c 2001/02/01 10:06:37 1.194 +++ apache-1.3/src/main/util.c 2001/03/13 10:22:21 1.195 @@ -2040,7 +2040,6 @@ ap_log_error(APLOG_MARK, APLOG_WARNING, NULL, "%s: gethostname() failed to determine ServerName\n", ap_server_argv0); - server_hostname = ap_pstrdup(a, "127.0.0.1"); } else { @@ -2048,7 +2047,7 @@ if ((!(p = gethostbyname(str))) || (!(server_hostname = find_fqdn(a, p)))) { /* Recovery - return the default servername by IP: */ - if (p->h_addr_list[0]) { + if (p && p->h_addr_list[0]) { ap_snprintf(str, sizeof(str), "%pA", p->h_addr_list[0]); server_hostname = ap_pstrdup(a, str); /* We will drop through to report the IP-named server */ > > A work-around is setting the ServerName directive in httpd.conf so that > > ap_get_local_host() doesn't get called. yep -- Jeff Trawick | trawickj@bellsouth.net | PGP public key at web site: http://www.geocities.com/SiliconValley/Park/9289/ Born in Roswell... married an alien... To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message