www-apache-bugdb mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Shotaro Kamio <ka...@vuni.ne.jp>
Subject general/7460: segmentation fault on starting
Date Mon, 26 Mar 2001 08:27:35 GMT

>Number:         7460
>Category:       general
>Synopsis:       segmentation fault on starting
>Confidential:   no
>Severity:       critical
>Priority:       medium
>Responsible:    apache
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   apache
>Arrival-Date:   Mon Mar 26 00:30:00 PST 2001
>Closed-Date:
>Last-Modified:
>Originator:     kamio@vuni.ne.jp
>Release:        1.3.19
>Organization:
apache
>Environment:
Linux i486 gcc RedHat 6.0
>Description:
I built from source and start by "apachectl start".
but httpd crashed "segmentation fault".
there is no error message. so I was confused.

I run gdb. then, I found a bug.
backtrace is below

% gdb httpd core
GNU gdb 4.17.0.11 with Linux support
Copyright 1998 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i386-redhat-linux"...
Core was generated by `./httpd'.
Program terminated with signal 11, Segmentation fault.
Reading symbols from /lib/libm.so.6...done.
Reading symbols from /lib/libcrypt.so.1...done.
Reading symbols from /lib/libc.so.6...bt
done.
Reading symbols from /lib/ld-linux.so.2...done.
Reading symbols from /lib/libnss_files.so.2...done.
Reading symbols from /lib/libnss_nisplus.so.2...done.
Reading symbols from /lib/libnsl.so.1...done.
Reading symbols from /lib/libnss_nis.so.2...done.
Reading symbols from /lib/libnss_dns.so.2...done.
Reading symbols from /lib/libresolv.so.2...done.
#0  0x807f543 in ap_get_local_host (a=0x80c697c) at util.c:2051
2051                if (p->h_addr_list[0]) {
(gdb) bt
#0  0x807f543 in ap_get_local_host (a=0x80c697c) at util.c:2051
#1  0x807b6ea in ap_fini_vhost_config (p=0x80c697c, main_s=0x80c69a4) at http_vhost.c:548
#2  0x8068f72 in ap_read_config (p=0x80c697c, ptemp=0x80ca99c, 
    confname=0x80bf3c0 "conf/httpd.conf") at http_config.c:1595
#3  0x8073009 in main (argc=1, argv=0xbffffbe4) at http_main.c:4986
#4  0x40078cb3 in __libc_start_main (main=0x8072d7c <main>, argc=1, argv=0xbffffbe4,

    init=0x8049b6c <_init>, fini=0x80a770c <_fini>, rtld_fini=0x4000a350 <_dl_fini>,

    stack_end=0xbffffbdc) at ../sysdeps/generic/libc-start.c:78
(gdb) list
2046        {
2047            str[sizeof(str) - 1] = '\0';
2048            if ((!(p = gethostbyname(str))) 
2049                || (!(server_hostname = find_fqdn(a, p)))) {
2050                /* Recovery - return the default servername by IP: */
2051                if (p->h_addr_list[0]) {
2052                    ap_snprintf(str, sizeof(str), "%pA", p->h_addr_list[0]);
2053                    server_hostname = ap_pstrdup(a, str);
2054                    /* We will drop through to report the IP-named server */
2055                }
(gdb)  print p
$1 = (struct hostent *) 0x0
(gdb)
>How-To-Repeat:
caused by wrong configuration of host name

% hostname
Unknown

set hostname correctly, no problem.
>Fix:
in this case, apache should report error:"wrong hostname" or any other.
>Release-Note:
>Audit-Trail:
>Unformatted:
 [In order for any reply to be added to the PR database, you need]
 [to include <apbugs@Apache.Org> in the Cc line and make sure the]
 [subject line starts with the report component and number, with ]
 [or without any 'Re:' prefixes (such as "general/1098:" or      ]
 ["Re: general/1098:").  If the subject doesn't match this       ]
 [pattern, your message will be misfiled and ignored.  The       ]
 ["apbugs" address is not added to the Cc line of messages from  ]
 [the database automatically because of the potential for mail   ]
 [loops.  If you do not include this Cc, your reply may be ig-   ]
 [nored unless you are responding to an explicit request from a  ]
 [developer.  Reply only with text; DO NOT SEND ATTACHMENTS!     ]
 
 


Mime
View raw message