Date: Tue, 20 Mar 2001 17:01:34 +0000 (GMT) From: Andrew Tulloch <andrew@cosa.uk-legal.net> To: Hroi Sigurdsson <hroi@asdf.dk> Cc: stable@FreeBSD.ORG, new-httpd@apache.org Subject: Re: /usr/ports/apache13 & sig11 Message-ID: <Pine.BSF.4.21.0103201701010.54557-100000@cosa.uk-legal.net> In-Reply-To: <20010320174332.A31024@chewbacca.netgroup.dk>
next in thread | previous in thread | raw e-mail | index | archive | help
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 <ap_get_local_host>:=09push %ebp > 0x808d1b5 <ap_get_local_host+1>:=09mov %esp,%ebp > 0x808d1b7 <ap_get_local_host+3>:=09sub $0x58,%esp > 0x808d1ba <ap_get_local_host+6>:=09movl $0x0,0xffffffbc(%ebp) > 0x808d1c1 <ap_get_local_host+13>:=09add $0xfffffff8,%esp > 0x808d1c4 <ap_get_local_host+16>:=09push $0x3f > 0x808d1c6 <ap_get_local_host+18>:=09lea 0xffffffc0(%ebp),%eax > 0x808d1c9 <ap_get_local_host+21>:=09push %eax > 0x808d1ca <ap_get_local_host+22>:=09call 0x804f678 <gethostname> > 0x808d1cf <ap_get_local_host+27>:=09add $0x10,%esp > 0x808d1d2 <ap_get_local_host+30>:=09mov %eax,%eax > 0x808d1d4 <ap_get_local_host+32>:=09test %eax,%eax > 0x808d1d6 <ap_get_local_host+34>:=09 > je 0x808d220 <ap_get_local_host+108> > 0x808d1d8 <ap_get_local_host+36>:=09add $0xfffffff8,%esp > 0x808d1db <ap_get_local_host+39>:=09mov 0x80cd590,%eax > 0x808d1e0 <ap_get_local_host+44>:=09push %eax > 0x808d1e1 <ap_get_local_host+45>:=09push $0x80c59a0 > 0x808d1e6 <ap_get_local_host+50>:=09push $0x0 > 0x808d1e8 <ap_get_local_host+52>:=09push $0x4 > 0x808d1ea <ap_get_local_host+54>:=09push $0x7f8 > 0x808d1ef <ap_get_local_host+59>:=09push $0x80c54fa > 0x808d1f4 <ap_get_local_host+64>:=09call 0x807b940 <ap_log_error> > [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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.21.0103201701010.54557-100000>