Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 39667 - upgrade to apache-2.0.48-r4 causes Segmentation fault upon startup
Summary: upgrade to apache-2.0.48-r4 causes Segmentation fault upon startup
Status: VERIFIED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All All
: High normal (vote)
Assignee: Apache Team - Bugzilla Reports
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-01-28 07:51 UTC by Haroon Rafique
Modified: 2007-02-12 16:44 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge --info (emerge-info.txt,1.78 KB, text/plain)
2004-01-28 07:52 UTC, Haroon Rafique
Details
compile log as requested in comment 19 (apache_build.log,629.90 KB, text/plain)
2004-04-26 07:48 UTC, Haroon Rafique
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Haroon Rafique 2004-01-28 07:51:54 UTC
So, I had 2.0.48-r3 and upgraded to 2.0.49-r4 and upon startup I see Segmentation fault. I downgraded back to 2.0.48-r3 and it still gave the Segmentation fault. That makes me suspect gcc. How can I diagnose this any further?

I will post an emerge --info shortly. (I am running an SMP-enabled kernel as I have a P4 with HyperThreading enabled). I think the 2.0.48-r3 was built when I was running a non-SMP kernel.
Comment 1 Haroon Rafique 2004-01-28 07:52:42 UTC
Created attachment 24534 [details]
emerge --info
Comment 2 Haroon Rafique 2004-01-28 08:03:13 UTC
Downgrading my CFLAGS and MAKEOPTS to bare minimum had no affect. Still getting Segmentation fault.
Comment 3 Haroon Rafique 2004-01-28 08:20:44 UTC
Sorry to keep pestering but performing a "manual" (non emerge) compile results in no Segmentation fault.

I performed the following steps and got a "Syntax OK" in response.

tar xzvf /usr/portage/distfiles/httpd-2.0.48.tar.gz
cd httpd-2.0.48/
./configure --prefix=/www --enable-ssl --enable-proxy --enable-mods-shared=all
make
./httpd -t
Syntax OK

Contrast this with /usr/sbin/apache2 -t which gives Segmentation fault.
Comment 4 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2004-01-28 12:55:08 UTC
please provide a gdb backtrace of the segfault, or an strace at the very least.
Comment 5 Haroon Rafique 2004-01-29 06:53:15 UTC
FYI, I don't know that much about providing gdb backtraces, but I think I got it to compile with debug information. So, as requested:

# gdb apache2
GNU gdb 6.0
Copyright 2003 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 "i686-pc-linux-gnu"...Using host libthread_db library "/lib/libthread_db.so.1".

(gdb) run -t
Starting program: /usr/sbin/apache2 -t
[Thread debugging using libthread_db enabled]
[New Thread 16384 (LWP 21630)]

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 16384 (LWP 21630)]
0x4044f57c in memcpy () from /lib/libc.so.6
(gdb) bt
#0  0x4044f57c in memcpy () from /lib/libc.so.6
#1  0x4034c9d9 in call_resolver (sa=0x80c412c, hostname=0x0, family=2, port=0, 
    flags=0, p=0x80a9eb8) at sockaddr.c:425
#2  0x4034cb51 in find_addresses (sa=0x80c412c, hostname=0x0, family=2, 
    port=0, flags=0, p=0x80a9eb8) at sockaddr.c:475
#3  0x4034cbcb in apr_sockaddr_info_get (sa=0x80c412c, hostname=0x0, family=2, 
    port=0, flags=0, p=0x80a9eb8) at sockaddr.c:612
#4  0x0806d8dd in init_server_config (process=0x80a7f30, p=0x80a9eb8)
    at config.c:1862
#5  0x0806d982 in ap_read_config (process=0x80a7f30, ptemp=0x80d5f68, 
    filename=0x8096d60 "/etc/apache2/conf/apache2.conf", conftree=0x80a10b4)
    at config.c:1883
#6  0x080703a5 in main (argc=2, argv=0xbfffe004) at main.c:574
(gdb) 

Interestingly, if I say "run blah" it exits fine:

(gdb) run blah
Starting program: /usr/sbin/apache2 blah
[Thread debugging using libthread_db enabled]
[New Thread 16384 (LWP 21652)]
Usage: /usr/sbin/apache2 [-D name] [-d directory] [-f file]
                         [-C "directive"] [-c "directive"]
                         [-k start|restart|graceful|stop]
                         [-v] [-V] [-h] [-l] [-L] [-t] [-S]
Options:
  -D name           : define a name for use in <IfDefine name> directives
  -d directory      : specify an alternate initial ServerRoot
  -f file           : specify an alternate ServerConfigFile
  -C "directive"    : process directive before reading config files
  -c "directive"    : process directive after reading config files
  -e level          : show startup errors of level (see LogLevel)
  -E file           : log startup errors to file
  -v                : show version number
  -V                : show compile settings
  -h                : list available command line options (this page)
  -l                : list compiled in modules
  -L                : list available configuration directives
  -t -D DUMP_VHOSTS : show parsed settings (currently only vhost settings)
  -S                : a synonym for -t -D DUMP_VHOSTS
  -t                : run syntax check for config files

Program exited with code 01.
(gdb) 
Comment 6 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2004-01-29 20:28:18 UTC
please try USE="-ldap" emerge apache
and see if that still segfaults.
I predict it won't.

then emerge apache with USE=ldap again
and provide the output from:
ldd /usr/sbin/apache2 

also the output of 'strace /usr/sbin/apache2  -t' (please check that it contains no passwords or sensative information before you post it).
Comment 7 Haroon Rafique 2004-01-30 07:12:29 UTC
>
> please try USE="-ldap" emerge apache
> and see if that still segfaults.
> I predict it won't.
> 

Absolutely correct. mod_ldap.so and mod_auth_ldap.so were not built.

> 
> then emerge apache with USE=ldap again
> and provide the output from:
> ldd /usr/sbin/apache2
> 

It starts crashing. Here's the ldd output:

        libz.so.1 => /lib/libz.so.1 (0x4002d000)
        libaprutil-0.so.0 => /usr/lib/libaprutil-0.so.0 (0x4003f000)
        libldap.so.2 => /usr/lib/libldap.so.2 (0x40054000)
        libbind.so.2 => /usr/lib/libbind.so.2 (0x40089000)
        libpthread.so.0 => /lib/libpthread.so.0 (0x400d0000)
        libssl.so.0.9.7 => /usr/lib/libssl.so.0.9.7 (0x40121000)
        libcrypto.so.0.9.7 => /usr/lib/libcrypto.so.0.9.7 (0x4014e000)
        liblber.so.2 => /usr/lib/liblber.so.2 (0x40238000)
        libgdbm.so.2 => /usr/lib/libgdbm.so.2 (0x40244000)
        libdb-4.1.so => /usr/lib/libdb-4.1.so (0x4024b000)
        libexpat.so.0 => /usr/lib/libexpat.so.0 (0x4030e000)
        libapr-0.so.0 => /usr/lib/libapr-0.so.0 (0x40334000)
        librt.so.1 => /lib/librt.so.1 (0x40355000)
        libm.so.6 => /lib/libm.so.6 (0x40368000)
        libcrypt.so.1 => /lib/libcrypt.so.1 (0x40389000)
        libnsl.so.1 => /lib/libnsl.so.1 (0x403b6000)
        libdl.so.2 => /lib/libdl.so.2 (0x403ca000)
        libc.so.6 => /lib/libc.so.6 (0x403ce000)
        /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)

> 
> also the output of 'strace /usr/sbin/apache2  -t' (please check that it
> contains no passwords or sensative information before you post it).
>

execve("/usr/sbin/apache2", ["/usr/sbin/apache2", "-t"], [/* 44 vars */]) = 0
uname({sys="Linux", node="xxxx.xxxx.xxxx.xxx", ...}) = 0
brk(0)                                  = 0x809dba8
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x40015000
open("/etc/ld.so.preload", O_RDONLY)    = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY)      = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=91450, ...}) = 0
mmap2(NULL, 91450, PROT_READ, MAP_PRIVATE, 3, 0) = 0x40016000
close(3)                                = 0
open("/lib/libz.so.1", 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\200\23"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=75339, ...}) = 0
mmap2(NULL, 71388, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x4002d000
mmap2(0x4003e000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x10) = 0x4003e000
close(3)                                = 0
open("/usr/lib/libaprutil-0.so.0", 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`Q\0\000"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=103793, ...}) = 0
mmap2(NULL, 84200, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x4003f000
mmap2(0x40053000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x14) = 0x40053000
close(3)                                = 0
open("/usr/lib/libldap.so.2", 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\260\177"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=247226, ...}) = 0
mmap2(NULL, 216040, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x40054000
mmap2(0x40088000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x34) = 0x40088000
close(3)                                = 0
open("/usr/lib/libbind.so.2", 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\240\205"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=332733, ...}) = 0
mmap2(NULL, 290368, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x40089000
mmap2(0x400ce000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x45) = 0x400ce000
close(3)                                = 0
open("/lib/libpthread.so.0", 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\0pB\0\000"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=83644, ...}) = 0
mmap2(NULL, 327200, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x400d0000
mmap2(0x400dd000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0xd) = 0x400dd000
mmap2(0x400de000, 269856, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x400de000
close(3)                                = 0
open("/usr/lib/libssl.so.0.9.7", 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 \205\0"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0555, st_size=212469, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x40120000
mmap2(NULL, 183056, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x40121000
mmap2(0x4014b000, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x2a) = 0x4014b000
close(3)                                = 0
open("/usr/lib/libcrypto.so.0.9.7", 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\0\277\2"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0555, st_size=1119688, ...}) = 0
mmap2(NULL, 956984, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x4014e000
mmap2(0x40223000, 69632, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0xd5) = 0x40223000
mmap2(0x40234000, 14904, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x40234000
close(3)                                = 0
mprotect(0xbfffe000, 4096, PROT_READ|PROT_WRITE|PROT_EXEC|PROT_GROWSDOWN) = -1 EINVAL (Invalid argument)
mprotect(0xbfff7000, 32768, PROT_READ|PROT_WRITE|PROT_EXEC) = -1 ENOMEM (Cannot allocate memory)
mprotect(0xbfffb000, 16384, PROT_READ|PROT_WRITE|PROT_EXEC) = -1 ENOMEM (Cannot allocate memory)
mprotect(0xbfffd000, 8192, PROT_READ|PROT_WRITE|PROT_EXEC) = -1 ENOMEM (Cannot allocate memory)
mprotect(0xbfffe000, 4096, PROT_READ|PROT_WRITE|PROT_EXEC) = 0
mprotect(0xbfffd000, 4096, PROT_READ|PROT_WRITE|PROT_EXEC) = -1 ENOMEM (Cannot allocate memory)
open("/usr/lib/liblber.so.2", 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`%\0\000"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=58670, ...}) = 0
mmap2(NULL, 46160, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x40238000
mmap2(0x40243000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0xb) = 0x40243000
close(3)                                = 0
open("/usr/lib/libgdbm.so.2", 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`\23\0\000"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=26495, ...}) = 0
mmap2(NULL, 25260, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x40244000
mmap2(0x4024a000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x5) = 0x4024a000
close(3)                                = 0
open("/usr/lib/libdb-4.1.so", 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@G\1\000"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=878846, ...}) = 0
mmap2(NULL, 798108, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x4024b000
mmap2(0x4030c000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0xc0) = 0x4030c000
close(3)                                = 0
open("/usr/lib/libexpat.so.0", 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\0P!\0\000"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=195756, ...}) = 0
mmap2(NULL, 149412, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x4030e000
mmap2(0x40331000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x23) = 0x40331000
close(3)                                = 0
open("/usr/lib/libapr-0.so.0", 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 \206\0"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=157599, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x40333000
mmap2(NULL, 134184, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x40334000
mmap2(0x40353000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x1e) = 0x40353000
mmap2(0x40354000, 3112, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x40354000
close(3)                                = 0
open("/lib/librt.so.1", 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\240\33"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=37317, ...}) = 0
mmap2(NULL, 74968, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x40355000
mmap2(0x4035c000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x6) = 0x4035c000
mmap2(0x4035d000, 42200, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x4035d000
close(3)                                = 0
open("/lib/libm.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\3005\0"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=184958, ...}) = 0
mmap2(NULL, 134432, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x40368000
mmap2(0x40388000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x1f) = 0x40388000
close(3)                                = 0
open("/lib/libcrypt.so.1", 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\0000\t\0"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=22369, ...}) = 0
mmap2(NULL, 181404, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x40389000
mmap2(0x4038e000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x4) = 0x4038e000
mmap2(0x4038f000, 156828, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x4038f000
close(3)                                = 0
open("/lib/libnsl.so.1", 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@;\0\000"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=89393, ...}) = 0
mmap2(NULL, 80512, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x403b6000
mmap2(0x403c7000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x11) = 0x403c7000
mmap2(0x403c8000, 6784, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x403c8000
close(3)                                = 0
open("/lib/libdl.so.2", 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\0f\33\0\000"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=13503, ...}) = 0
mmap2(NULL, 12084, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x403ca000
mmap2(0x403cc000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x1) = 0x403cc000
close(3)                                = 0
open("/lib/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-]\1\000"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=1496933, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x403cd000
mmap2(NULL, 1251012, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x403ce000
mmap2(0x404fa000, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x12c) = 0x404fa000
mmap2(0x404fd000, 9924, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x404fd000
close(3)                                = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x40500000
munmap(0x40016000, 91450)               = 0
set_thread_area({entry_number:-1 -> -1, base_addr:0x400dd060, limit:1048575, seg_32bit:1, contents:0, read_exec_only:0, limit_in_pages:1, seg_not_present:0, useable:1}) = -1 ENOSYS (Function not implemented)
modify_ldt(1, {entry_number:0, base_addr:0x400dd060, limit:1048575, seg_32bit:1, contents:0, read_exec_only:0, limit_in_pages:1, seg_not_present:0, useable:1}, 16) = 0
getpid()                                = 12495
rt_sigaction(SIGRTMIN, {0x400d7e1d, [], SA_RESTORER, 0x403f7f48}, NULL, 8) = 0
rt_sigaction(SIGRT_1, {0x400d7f5d, [], SA_RESTORER, 0x403f7f48}, NULL, 8) = 0
rt_sigaction(SIGRT_2, {0x400d813a, [], SA_RESTORER, 0x403f7f48}, NULL, 8) = 0
rt_sigprocmask(SIG_BLOCK, [RTMIN], NULL, 8) = 0
rt_sigprocmask(SIG_UNBLOCK, [RT_1], NULL, 8) = 0
_sysctl({{CTL_KERN, KERN_VERSION}, 2, 0xbfffea54, 35, (nil), 0}) = 0
open("/dev/urandom", O_RDONLY)          = 3
read(3, "\372\3548r\343(\r\220\24.+\273\346\224\250q\352\10o\v\207"..., 32) = 32
close(3)                                = 0
brk(0)                                  = 0x809dba8
brk(0x80beba8)                          = 0x80beba8
brk(0)                                  = 0x80beba8
brk(0x80bf000)                          = 0x80bf000
brk(0)                                  = 0x80bf000
brk(0x80e0000)                          = 0x80e0000
socket(PF_INET, SOCK_DGRAM, IPPROTO_IP) = 3
close(3)                                = 0
--- SIGSEGV (Segmentation fault) @ 0 (0) ---
+++ killed by SIGSEGV +++

Comment 8 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2004-01-30 12:03:33 UTC
could you post your APACHE2_OPTS from /etc/conf.d/apache2?
I'm interested in what other modules you have loaded.

I'm thinking one of them is going to be linked against db-4.0 and that will be the source of the bug (there are a few items for this open already).
 
Comment 9 Haroon Rafique 2004-01-30 12:05:25 UTC
APACHE2_OPTS="-D PERL"
Comment 10 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2004-01-30 12:08:35 UTC
hmm, that doesn't make sense, ldap isn't being used at all as you don't have '-D LDAP' in place. 

hmm, i don't use modperl, could you find it's .so file in /usr/lib/apache2/extramodules/ and provide the results of ldd on that.

also, for the hell of it, try revdep-rebuild.
Comment 11 Haroon Rafique 2004-01-30 12:12:24 UTC
root # ldd /usr/lib/apache2/extramodules/mod_perl.so 
        libperl.so.1 => /usr/lib/libperl.so.1 (0x40048000)
        libpthread.so.0 => /lib/libpthread.so.0 (0x4014d000)
        libnsl.so.1 => /lib/libnsl.so.1 (0x4019d000)
        libdl.so.2 => /lib/libdl.so.2 (0x401b1000)
        libm.so.6 => /lib/libm.so.6 (0x401b5000)
        libcrypt.so.1 => /lib/libcrypt.so.1 (0x401d6000)
        libutil.so.1 => /lib/libutil.so.1 (0x40203000)
        libc.so.6 => /lib/libc.so.6 (0x40206000)
        libbind.so.2 => /usr/lib/libbind.so.2 (0x40338000)
        /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x80000000)
Comment 12 Dennis Freise 2004-02-13 03:12:45 UTC
I have exactly the same problem, and I also do not use the LDAP module, but
apache segfaults when LDAP is in USE. 'USE="-ldap" emerge apache' makes the
segfaults go away. Tried revdep-rebuild, and it says that there's nothing to
recompile. Also tried rebuilding openldap and after that apache, with no
success.
Comment 13 Haroon Rafique 2004-03-25 09:15:46 UTC
Just to let you know, this is still happening with apache-2.0.49
Comment 14 Chuck Short (RETIRED) gentoo-dev 2004-04-22 16:35:55 UTC
What error message are you getting in your error log since their might be a bug open with apache's bugzilla?

chuck
Comment 15 Haroon Rafique 2004-04-26 05:51:09 UTC
Chuck, there is nothing to see in the logs. Even a simple:
    /usr/sbin/apache2 -t
gives me a segmentation fault.
Comment 16 Chuck Short (RETIRED) gentoo-dev 2004-04-26 05:57:39 UTC
what if you do ldd /usr/sbin/apache2?

chuck
Comment 17 Haroon Rafique 2004-04-26 06:09:32 UTC
Here's output of ldd /usr/sbin/apache2. Older ldd output is shown in comment 7.

        libz.so.1 => /lib/libz.so.1 (0x40030000)
        libaprutil-0.so.0 => /usr/lib/libaprutil-0.so.0 (0x40043000)
        libldap.so.2 => /usr/lib/libldap.so.2 (0x40058000)
        libbind.so.2 => /usr/lib/libbind.so.2 (0x4008d000)
        libssl.so.0.9.7 => /usr/lib/libssl.so.0.9.7 (0x400d4000)
        libcrypto.so.0.9.7 => /usr/lib/libcrypto.so.0.9.7 (0x40103000)
        liblber.so.2 => /usr/lib/liblber.so.2 (0x401fd000)
        libgdbm.so.2 => /usr/lib/libgdbm.so.2 (0x4020a000)
        libdb-4.1.so => /usr/lib/libdb-4.1.so (0x40210000)
        libexpat.so.0 => /usr/lib/libexpat.so.0 (0x402d3000)
        libapr-0.so.0 => /usr/lib/libapr-0.so.0 (0x402f8000)
        librt.so.1 => /lib/librt.so.1 (0x40318000)
        libm.so.6 => /lib/libm.so.6 (0x4032b000)
        libcrypt.so.1 => /lib/libcrypt.so.1 (0x4034d000)
        libnsl.so.1 => /lib/libnsl.so.1 (0x4037a000)
        libpthread.so.0 => /lib/libpthread.so.0 (0x4038e000)
        libdl.so.2 => /lib/libdl.so.2 (0x403de000)
        libc.so.6 => /lib/libc.so.6 (0x403e1000)
        /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)

I did a fresh emerge, using:
    USE="ldap" emerge apache
To get a working copy, I will revert to (gotta keep the website running):
    USE="-ldap" emerge apache
Comment 18 Haroon Rafique 2004-04-26 06:17:35 UTC
ldd output after (working installation):
    USE="-ldap" emerge apache

        libz.so.1 => /lib/libz.so.1 (0x40030000)
        libssl.so.0.9.7 => /usr/lib/libssl.so.0.9.7 (0x40043000)
        libcrypto.so.0.9.7 => /usr/lib/libcrypto.so.0.9.7 (0x40072000)
        libaprutil-0.so.0 => /usr/lib/libaprutil-0.so.0 (0x4016c000)
        libgdbm.so.2 => /usr/lib/libgdbm.so.2 (0x40181000)
        libdb-4.1.so => /usr/lib/libdb-4.1.so (0x40187000)
        libexpat.so.0 => /usr/lib/libexpat.so.0 (0x4024a000)
        libapr-0.so.0 => /usr/lib/libapr-0.so.0 (0x40270000)
        librt.so.1 => /lib/librt.so.1 (0x40290000)
        libm.so.6 => /lib/libm.so.6 (0x402a3000)
        libcrypt.so.1 => /lib/libcrypt.so.1 (0x402c4000)
        libnsl.so.1 => /lib/libnsl.so.1 (0x402f1000)
        libpthread.so.0 => /lib/libpthread.so.0 (0x40305000)
        libdl.so.2 => /lib/libdl.so.2 (0x40356000)
        libc.so.6 => /lib/libc.so.6 (0x40359000)
        /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)
Comment 19 Chuck Short (RETIRED) gentoo-dev 2004-04-26 07:19:21 UTC
How about posting a full compile log?

chuck
Comment 20 Haroon Rafique 2004-04-26 07:48:06 UTC
Created attachment 30088 [details]
compile log as requested in comment 19

compile log as requested in comment 19
Comment 21 Chuck Short (RETIRED) gentoo-dev 2004-04-26 08:02:45 UTC
Im not sure you might want to open a bug report with apache.

http://nagoya.apache.org/bugzilla/

Please add the bug number here when you do.
Comment 22 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2004-04-26 09:41:24 UTC
could you provide the output of ldd  /usr/lib/libldap.so.2 ?
Comment 23 Haroon Rafique 2004-04-26 09:43:08 UTC
Looks like an upstream bug. Any way, here is the output of ldd /usr/lib/libldap.so.2:

        liblber.so.2 => /usr/lib/liblber.so.2 (0x40050000)
        libbind.so.2 => /usr/lib/libbind.so.2 (0x4005c000)
        libdl.so.2 => /lib/libdl.so.2 (0x400a3000)
        libssl.so.0.9.7 => /usr/lib/libssl.so.0.9.7 (0x400a6000)
        libcrypto.so.0.9.7 => /usr/lib/libcrypto.so.0.9.7 (0x400d6000)
        libc.so.6 => /lib/libc.so.6 (0x401d0000)
        libnsl.so.1 => /lib/libnsl.so.1 (0x402e0000)
        libpthread.so.0 => /lib/libpthread.so.0 (0x402f4000)
        /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x80000000)
Comment 24 Haroon Rafique 2004-05-20 09:59:52 UTC
Filed bug report, upstream at:
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=29128
Comment 25 Chuck Short (RETIRED) gentoo-dev 2004-07-02 03:35:42 UTC
Please try 2.0.50
Comment 26 Haroon Rafique 2004-07-06 09:39:32 UTC
Still the same problem. The upstream bug is not resolved either yet.
Comment 27 Haroon Rafique 2004-08-23 14:30:31 UTC
I have resolved the upstream bug as invalid. The cause was most likely the following 2 conditions.

1) net-dns/bind had to be installed
2) /usr/lib/libbind.* files had to be present.

Re-installing the latest bind removed the libbind.* files from /usr/lib (the ebuild no longer has --enable-libbind in the configure phase). After that apache was fine.
Comment 28 Elfyn McBratney (beu) (RETIRED) gentoo-dev 2005-04-23 19:43:02 UTC
Closing.