You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Art Haas <ah...@airmail.net> on 2004/01/14 01:31:18 UTC

httpd-2.1 segfaults at startup

Hi.

I've been building and using what will be httpd-2.1 for months. Just
within the last week or two, my builds have all failed when I try to run
them. As others are certainly running the CVS head builds without
problems, I'm hoping for a bit of guidance to see if someone can suggest
a fix.

Here's the end of the 'strace' output - httpd has just started, and the
linker is pulling in all the libraries, when the following occurs:

open("/lib/tls/libc.so.6", O_RDONLY)    = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\200X\1"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0644, st_size=1270908, ...}) = 0
old_mmap(NULL, 1281292, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x401c0000
old_mmap(0x402ee000, 36864, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x12d000) = 0x402ee000
old_mmap(0x402f7000, 7436, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x402f7000
close(3)                                = 0
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x402f9000
set_thread_area({entry_number:-1 -> 6, base_addr:0x402f9500, limit:1048575, seg_32bit:1, contents:0, read_exec_only:0, limit_in_pages:1, seg_not_present:0, useable:1}) = 0
munmap(0x40018000, 61414)               = 0
set_tid_address(0x402f9548)             = 12008
rt_sigaction(SIGRTMIN, {0x401b23e0, [], SA_SIGINFO}, NULL, 8) = 0
rt_sigprocmask(SIG_UNBLOCK, [RTMIN], NULL, 8) = 0
getrlimit(RLIMIT_STACK, {rlim_cur=8192*1024, rlim_max=RLIM_INFINITY}) = 0
brk(0)                                  = 0x8095000
brk(0x80b6000)                          = 0x80b6000
brk(0)                                  = 0x80b6000
--- SIGSEGV (Segmentation fault) @ 0 (0) ---
+++ killed by SIGSEGV +++

I'm running on Debian, with the latest libc6 package from unstable -
libc6-2.3.2.ds1-10. Apache was built with GCC-3.4 built from CVS on
January 9. The Apache build was configured as follows:

$ CPPFLAGS="-DNDEBUG" CFLAGS="-O2 -march=pentium-mmx -std=gnu99 \
-finline-limit=100000" /opt/build/httpd-2.1/configure  \
--enable-mods-shared=all --enable-deflate --with-dbm=db42 \
--with-berkeley-db=/usr/local/BerkeleyDB.4.2

I've used these flags for months without problem, though the Berkeley
stuff is relatively new (I need 4.2 for use with Subversion). I'm
running the 2.6.1-rc3 kernel also.

Ideas for things to try? No one else is seeing this, correct?

Thanks in advance,

Art Haas
-- 
Man once surrendering his reason, has no remaining guard against absurdities
the most monstrous, and like a ship without rudder, is the sport of every wind.

-Thomas Jefferson to James Smith, 1822

Re: httpd-2.1 segfaults at startup

Posted by Joe Orton <jo...@redhat.com>.
On Tue, Jan 13, 2004 at 06:31:18PM -0600, Art Haas wrote:
> I've been building and using what will be httpd-2.1 for months. Just
> within the last week or two, my builds have all failed when I try to run
> them. As others are certainly running the CVS head builds without
> problems, I'm hoping for a bit of guidance to see if someone can suggest
> a fix.
> 
> Here's the end of the 'strace' output - httpd has just started, and the
> linker is pulling in all the libraries, when the following occurs:
> 
...
> --- SIGSEGV (Segmentation fault) @ 0 (0) ---
> +++ killed by SIGSEGV +++

Hi - can you get a backtrace out of it?

joe

Re: httpd-2.1 segfaults at startup

Posted by Joe Orton <jo...@redhat.com>.
On Tue, Jan 13, 2004 at 06:31:18PM -0600, Art Haas wrote:
> Hi.
> 
> I've been building and using what will be httpd-2.1 for months. Just
> within the last week or two, my builds have all failed when I try to run
> them. As others are certainly running the CVS head builds without
> problems, I'm hoping for a bit of guidance to see if someone can suggest
> a fix.
> 
> Here's the end of the 'strace' output - httpd has just started, and the
> linker is pulling in all the libraries, when the following occurs:

Did you track this down any further? I've just started seeing segfaults
at startup on some builds after updating toolchain/glibc, and found that
libc's regcomp/regfree/etc were getting used rather than using pcre.  
Workaround is below, not quite sure why yet though...

Index: include/pcreposix.h
===================================================================
RCS file: /home/cvs/httpd-2.0/include/pcreposix.h,v
retrieving revision 1.3
diff -u -r1.3 pcreposix.h
--- include/pcreposix.h	11 Mar 2001 14:54:13 -0000	1.3
+++ include/pcreposix.h	19 Jan 2004 21:33:30 -0000
@@ -87,10 +87,14 @@
 
 /* The functions */
 
-extern int regcomp(regex_t *, const char *, int);
-extern int regexec(regex_t *, const char *, size_t, regmatch_t *, int);
-extern size_t regerror(int, const regex_t *, char *, size_t);
-extern void regfree(regex_t *);
+#ifndef AP_DECLARE
+#define AP_DECLARE(x) x
+#endif
+
+AP_DECLARE(int) regcomp(regex_t *, const char *, int);
+AP_DECLARE(int) regexec(regex_t *, const char *, size_t, regmatch_t *, int);
+AP_DECLARE(size_t) regerror(int, const regex_t *, char *, size_t);
+AP_DECLARE(void) regfree(regex_t *);
 
 #ifdef __cplusplus
 }   /* extern "C" */


Re: httpd-2.1 segfaults at startup

Posted by "William A. Rowe, Jr." <wr...@rowe-clan.net>.
Someone remarked to me yesterday that their out-of-box 2.0.48 tarball would
not build under SuSe...

I noticed a brand new change to the libdl detection logic that drops -ldl from the
linkage list on unix.  Would you please check that the generated LDFLAGS 
did or did not include the -ldl argument to libtool?

Bill

At 06:31 PM 1/13/2004, Art Haas wrote:
>Hi.
>
>I've been building and using what will be httpd-2.1 for months. Just
>within the last week or two, my builds have all failed when I try to run
>them. As others are certainly running the CVS head builds without
>problems, I'm hoping for a bit of guidance to see if someone can suggest
>a fix.
>
>Here's the end of the 'strace' output - httpd has just started, and the
>linker is pulling in all the libraries, when the following occurs:
>
>open("/lib/tls/libc.so.6", O_RDONLY)    = 3
>read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\200X\1"..., 512) = 512
>fstat64(3, {st_mode=S_IFREG|0644, st_size=1270908, ...}) = 0
>old_mmap(NULL, 1281292, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x401c0000
>old_mmap(0x402ee000, 36864, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x12d000) = 0x402ee000
>old_mmap(0x402f7000, 7436, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x402f7000
>close(3)                                = 0
>old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x402f9000
>set_thread_area({entry_number:-1 -> 6, base_addr:0x402f9500, limit:1048575, seg_32bit:1, contents:0, read_exec_only:0, limit_in_pages:1, seg_not_present:0, useable:1}) = 0
>munmap(0x40018000, 61414)               = 0
>set_tid_address(0x402f9548)             = 12008
>rt_sigaction(SIGRTMIN, {0x401b23e0, [], SA_SIGINFO}, NULL, 8) = 0
>rt_sigprocmask(SIG_UNBLOCK, [RTMIN], NULL, 8) = 0
>getrlimit(RLIMIT_STACK, {rlim_cur=8192*1024, rlim_max=RLIM_INFINITY}) = 0
>brk(0)                                  = 0x8095000
>brk(0x80b6000)                          = 0x80b6000
>brk(0)                                  = 0x80b6000
>--- SIGSEGV (Segmentation fault) @ 0 (0) ---
>+++ killed by SIGSEGV +++
>
>I'm running on Debian, with the latest libc6 package from unstable -
>libc6-2.3.2.ds1-10. Apache was built with GCC-3.4 built from CVS on
>January 9. The Apache build was configured as follows:
>
>$ CPPFLAGS="-DNDEBUG" CFLAGS="-O2 -march=pentium-mmx -std=gnu99 \
>-finline-limit=100000" /opt/build/httpd-2.1/configure  \
>--enable-mods-shared=all --enable-deflate --with-dbm=db42 \
>--with-berkeley-db=/usr/local/BerkeleyDB.4.2
>
>I've used these flags for months without problem, though the Berkeley
>stuff is relatively new (I need 4.2 for use with Subversion). I'm
>running the 2.6.1-rc3 kernel also.
>
>Ideas for things to try? No one else is seeing this, correct?
>
>Thanks in advance,
>
>Art Haas
>-- 
>Man once surrendering his reason, has no remaining guard against absurdities
>the most monstrous, and like a ship without rudder, is the sport of every wind.
>
>-Thomas Jefferson to James Smith, 1822