You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by John Manko <jo...@gmail.com> on 2012/06/25 18:58:05 UTC

mod_perl segfaults, can't start Apache

mod_perl is failing with Apache, and I'm having trouble figuring out why.
I'm running under Gentoo.

mod_perl version 2.0.7
apache version 2.2.22-r1, build with threads and worker MPM
libperl version 5.10.1-r1
perl version 5.16.0 with ithreads support


# /etc/init.d/apache2 start
 * Starting apache2 ...
 * start-stop-daemon: failed to start `/usr/sbin/apache2'

# dmesg
apache2[12697]: segfault at c ip b5d4974a sp bffce4d0 error 4 in
mod_perl.so[b5d24000+45000]

Any ideas on what to look for to determine the problem?

Re: mod_perl segfaults, can't start Apache

Posted by Chris Kaltwasser <ch...@netpos.com>.
Do you happen to be using a Xen virtual machine and running a redhat 6.1 or
CentOS 6.1+ version of linux.

I actually had opened a very similar ticket to this a couple of weeks back.

The write-up here was the apparent problem that I'm assuming was causing my
issue as a bug in glibc.

https://bugzilla.redhat.com/show_bug.cgi?format=multiple&id=790399

Rolling back to CentOS 5.7 is my planned solution, either that or waiting
for 6.3 to come out. The thread above covers an RPM that someone made that
may be of assistance.

On Mon, Jun 25, 2012 at 12:58 PM, John Manko <jo...@gmail.com> wrote:

> mod_perl is failing with Apache, and I'm having trouble figuring out why.
> I'm running under Gentoo.
>
> mod_perl version 2.0.7
> apache version 2.2.22-r1, build with threads and worker MPM
> libperl version 5.10.1-r1
> perl version 5.16.0 with ithreads support
>
>
> # /etc/init.d/apache2 start
>  * Starting apache2 ...
>  * start-stop-daemon: failed to start `/usr/sbin/apache2'
>
> # dmesg
> apache2[12697]: segfault at c ip b5d4974a sp bffce4d0 error 4 in
> mod_perl.so[b5d24000+45000]
>
> Any ideas on what to look for to determine the problem?
>
>


-- 
____________________________________
Chris Kaltwasser <ch...@netpos.com>
 Chief Technical Officer
 NetPOS LLC<http://netpos.com>
     fon: 734.302.4220
     cel:  734.645.6215

____________________________________

Re: mod_perl segfaults, can't start Apache

Posted by Lars Dɪᴇᴄᴋᴏᴡ 迪拉斯 <da...@cpan.org>.
> Any ideas on what to look for to determine the problem?
That's amply documented on the homepage: <http://perl.apache.org/> → Reporting Bugs →
<http://perl.apache.org/bugs/> → mod_perl 2.0 →
<http://perl.apache.org/docs/2.0/user/help/help.html> → Resolving
Segmentation Faults →
<http://perl.apache.org/docs/2.0/devel/debug/c.html#Analyzing_Dumped_Core_Files>

Sorry to say that you got sent off-track, but strace always is a red
herring when you have the source code and can build with debugging
symbols, which is the case for mod_perl.

Re: mod_perl segfaults, can't start Apache

Posted by John Manko <jo...@gmail.com>.
Thanks for the input, Josh.  The command I'm using now is:

# strace  -fx /usr/sbin/apache2 -X

I recompiled apache with suexec support (because I noticed a missing suexec
ref in the output), and nscd wasn't running.  Unfortunately, I'm getting
the same error output:

>From the point where mod_perl confi is detected:

stat64("/etc/apache2/modules.d/75_mod_perl.conf", {st_mode=S_IFREG|0644,
st_size=1406, ...}) = 0
open("/etc/apache2/modules.d/75_mod_perl.conf",
O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 4
fstat64(4, {st_mode=S_IFREG|0644, st_size=1406, ...}) = 0
brk(0xb7810000)                         = 0xb7810000
read(4, "<IfDefine PERL>\nLoadModule perl_"..., 4096) = 1406
read(4, "", 4096)                       = 0
close(4)                                = 0
stat64("/etc/apache2/vhosts.d", {st_mode=S_IFDIR|0755, st_size=4096, ...})
= 0
openat(AT_FDCWD, "/etc/apache2/vhosts.d",
O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY|O_CLOEXEC) = 4
getdents64(4, /* 6 entries */, 32768)   = 240
getdents64(4, /* 0 entries */, 32768)   = 0
close(4)                                = 0
stat64("/etc/apache2/vhosts.d/00_default_ssl_vhost.conf",
{st_mode=S_IFREG|0644, st_size=7824, ...}) = 0
open("/etc/apache2/vhosts.d/00_default_ssl_vhost.conf",
O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 4
fstat64(4, {st_mode=S_IFREG|0644, st_size=7824, ...}) = 0
read(4, "<IfDefine SSL>\n<IfDefine SSL_DEF"..., 4096) = 4096
read(4, "means that the\n\t# standard Auth/"..., 4096) = 3728
read(4, "", 4096)                       = 0
close(4)                                = 0
stat64("/etc/apache2/vhosts.d/00_default_vhost.conf",
{st_mode=S_IFREG|0644, st_size=1520, ...}) = 0
open("/etc/apache2/vhosts.d/00_default_vhost.conf",
O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 4
fstat64(4, {st_mode=S_IFREG|0644, st_size=1520, ...}) = 0
read(4, "# Virtual Hosts\n#\n# If you want "..., 4096) = 1520
read(4, "", 4096)                       = 0
close(4)                                = 0
read(3, "", 4096)                       = 0
close(3)                                = 0
brk(0xb7831000)                         = 0xb7831000
stat64("/usr/sbin/suexec", {st_mode=S_IFREG|S_ISUID|0710, st_size=13588,
...}) = 0
gettimeofday({1340661900, 952340}, NULL) = 0
socket(PF_FILE, SOCK_STREAM|SOCK_CLOEXEC|SOCK_NONBLOCK, 0) = 3
connect(3, {sa_family=AF_FILE, sun_path="/var/run/nscd/socket"}, 110) = 0
send(3,
"\x02\x00\x00\x00\x0b\x00\x00\x00\x07\x00\x00\x00\x70\x61\x73\x73\x77\x64\x00",
19, MSG_NOSIGNAL) = 19
poll([{fd=3, events=POLLIN|POLLERR|POLLHUP}], 1, 5000) = 1 ([{fd=3,
revents=POLLIN|POLLHUP}])
recvmsg(3, {msg_name(0)=NULL, msg_iov(2)=[{"", 7}, {"", 8}],
msg_controllen=0, msg_flags=MSG_CMSG_CLOEXEC}, MSG_CMSG_CLOEXEC) = 0
close(3)                                = 0
socket(PF_FILE, SOCK_STREAM|SOCK_CLOEXEC|SOCK_NONBLOCK, 0) = 3
connect(3, {sa_family=AF_FILE, sun_path="/var/run/nscd/socket"}, 110) = 0
send(3,
"\x02\x00\x00\x00\x00\x00\x00\x00\x07\x00\x00\x00\x61\x70\x61\x63\x68\x65\x00",
19, MSG_NOSIGNAL) = 19
poll([{fd=3, events=POLLIN|POLLERR|POLLHUP}], 1, 5000) = 1 ([{fd=3,
revents=POLLIN|POLLHUP}])
read(3,
"\x02\x00\x00\x00\x01\x00\x00\x00\x07\x00\x00\x00\x02\x00\x00\x00\x51\x00\x00\x00\x51\x00\x00\x00\x1c\x00\x00\x00\x09\x00\x00\x00"...,
36) = 36
read(3,
"\x61\x70\x61\x63\x68\x65\x00\x78\x00\x61\x64\x64\x65\x64\x20\x62\x79\x20\x70\x6f\x72\x74\x61\x67\x65\x20\x66\x6f\x72\x20\x61\x70"...,
60) = 60
close(3)                                = 0
brk(0xb7852000)                         = 0xb7852000
socket(PF_FILE, SOCK_STREAM|SOCK_CLOEXEC|SOCK_NONBLOCK, 0) = 3
connect(3, {sa_family=AF_FILE, sun_path="/var/run/nscd/socket"}, 110) = 0
send(3,
"\x02\x00\x00\x00\x0c\x00\x00\x00\x06\x00\x00\x00\x67\x72\x6f\x75\x70\x00",
18, MSG_NOSIGNAL) = 18
poll([{fd=3, events=POLLIN|POLLERR|POLLHUP}], 1, 5000) = 1 ([{fd=3,
revents=POLLIN|POLLHUP}])
recvmsg(3, {msg_name(0)=NULL, msg_iov(2)=[{"", 6}, {"", 8}],
msg_controllen=0, msg_flags=MSG_CMSG_CLOEXEC}, MSG_CMSG_CLOEXEC) = 0
close(3)                                = 0
socket(PF_FILE, SOCK_STREAM|SOCK_CLOEXEC|SOCK_NONBLOCK, 0) = 3
connect(3, {sa_family=AF_FILE, sun_path="/var/run/nscd/socket"}, 110) = 0
send(3,
"\x02\x00\x00\x00\x02\x00\x00\x00\x07\x00\x00\x00\x61\x70\x61\x63\x68\x65\x00",
19, MSG_NOSIGNAL) = 19
poll([{fd=3, events=POLLIN|POLLERR|POLLHUP}], 1, 5000) = 1 ([{fd=3,
revents=POLLIN|POLLHUP}])
read(3,
"\x02\x00\x00\x00\x01\x00\x00\x00\x07\x00\x00\x00\x02\x00\x00\x00\x51\x00\x00\x00\x00\x00\x00\x00",
24) = 24
read(3, "\x61\x70\x61\x63\x68\x65\x00\x78\x00", 9) = 9
close(3)                                = 0
gettimeofday({1340661900, 959027}, NULL) = 0
brk(0xb7874000)                         = 0xb7874000
gettimeofday({1340661900, 959740}, NULL) = 0
write(2, "no listening sockets available, "..., 46no listening sockets
available, shutting down
) = 46
write(2, "Unable to open logs\n", 20Unable to open logs
)   = 20
select(0, NULL, NULL, NULL, {0, 10000}) = 0 (Timeout)
munmap(0xb67a3000, 9945604)             = 0
munmap(0xb678d000, 86036)               = 0
munmap(0xb6744000, 253156)              = 0
munmap(0xb66f7000, 313700)              = 0
munmap(0xb6467000, 406576)              = 0
munmap(0xb6436000, 200416)              = 0
munmap(0xb642b000, 41020)               = 0
munmap(0xb63de000, 312336)              = 0
munmap(0xb6395000, 295656)              = 0
munmap(0xb6385000, 61628)               = 0
munmap(0xb636e000, 91976)               = 0
munmap(0xb6312000, 376128)              = 0
munmap(0xb6276000, 634892)              = 0
munmap(0xb6248000, 184332)              = 0
munmap(0xb61f1000, 352356)              = 0
munmap(0xb61e0000, 68648)               = 0
munmap(0xb5f0f000, 1573892)             = 0
munmap(0xb667a000, 404972)              = 0
munmap(0xb66dd000, 104008)              = 0
munmap(0xb5e4c000, 797648)              = 0
munmap(0xb64cb000, 1762536)             = 0
munmap(0xb5e11000, 237764)              = 0
munmap(0xb6090000, 1374740)             = 0
munmap(0xb5d8b000, 548812)              = 0
munmap(0xb5d86000, 16396)               = 0
munmap(0xb7120000, 12400)               = 0
munmap(0xb7124000, 16480)               = 0
munmap(0xb7129000, 12432)               = 0
munmap(0xb712d000, 16480)               = 0
munmap(0xb7132000, 16480)               = 0
munmap(0xb7137000, 65664)               = 0
munmap(0xb7148000, 32864)               = 0
munmap(0xb7151000, 25008)               = 0
munmap(0xb7158000, 20580)               = 0
munmap(0xb715e000, 12396)               = 0
munmap(0xb7162000, 28992)               = 0
munmap(0xb716a000, 45164)               = 0
munmap(0xb7176000, 20584)               = 0
munmap(0xb717c000, 20576)               = 0
munmap(0xb7182000, 24676)               = 0
munmap(0xb7189000, 12384)               = 0
munmap(0xb71a7000, 12384)               = 0
munmap(0xb71ab000, 12384)               = 0
munmap(0xb71af000, 24672)               = 0
munmap(0xb718d000, 90184)               = 0
munmap(0xb71b6000, 37004)               = 0
munmap(0xb71c0000, 24688)               = 0
munmap(0xb71c7000, 36964)               = 0
munmap(0xb71d1000, 8288)                = 0
munmap(0xb71d4000, 12384)               = 0
munmap(0xb71d8000, 12388)               = 0
munmap(0xb71dc000, 12384)               = 0
munmap(0xb71e0000, 8288)                = 0
munmap(0xb71e3000, 12384)               = 0
munmap(0xb71e7000, 12384)               = 0
munmap(0xb71eb000, 8288)                = 0
munmap(0xb71ee000, 12384)               = 0
munmap(0xb71f2000, 8288)                = 0
munmap(0xb71f5000, 12384)               = 0
munmap(0xb71f9000, 12384)               = 0
munmap(0xb7686000, 16480)               = 0
munmap(0xb768b000, 12384)               = 0
brk(0xb7852000)                         = 0xb7852000
exit_group(1)                           = ?
+++ exited with 1 +++


On Mon, Jun 25, 2012 at 2:20 PM, Josh Narins <jn...@seniorbridge.com>wrote:

> I’m not 100% sure, but I think you just straced the parent httpd.****
>
> ** **
>
> You need to pass –X to the httpd binary to see the child stuff.****
>
> ** **
>
>
> *Josh Narins*
> Director of Application Development
> SeniorBridge
>
> 845 Third Ave
> 7th Floor
> New York, NY 10022
> Tel: (212) 994-6194
> Fax: (212) 994-4260
> Mobile: (917) 488-6248
> jnarins@seniorbridge.com
> seniorbridge.com <http://www.seniorbridge.com/>
>
> [image: SeniorBridge]
>
> *From:* John Manko [mailto:john.manko@gmail.com]
> *Sent:* Monday, June 25, 2012 2:18 PM
> *To:* Josh Narins
> *Cc:* modperl@perl.apache.org
> *Subject:* Re: mod_perl segfaults, can't start Apache****
>
> ** **
>
> Ok, so I installed strace.  Please keep in mind that I'm a Java developer
> by nature, and a systems guy by necessity.   :)
>
> Here is what I have, and I'm not too sure how to interpret it.  Thank you
> for the help, btw! :)
>
> # strace -x /usr/sbin/apache2 > /root/apache_strace
>
> execve("/usr/sbin/apache2", ["/usr/sbin/apache2"], [/* 31 vars */]) = 0
> brk(0)                                  = 0xb775d000
> mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0)
> = 0xb76c8000
> access("/etc/ld.so.preload", R_OK)      = -1 ENOENT (No such file or
> directory)
> open("/usr/lib/tls/i686/sse2/libm.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT
> (No such file or directory)
>
> [ output removed for brevity ] .....
>
> stat64("/etc/apache2/modules.d/75_mod_perl.conf", {st_mode=S_IFREG|0644,
> st_size=1406, ...}) = 0
> open("/etc/apache2/modules.d/75_mod_perl.conf",
> O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 4
> fstat64(4, {st_mode=S_IFREG|0644, st_size=1406, ...}) = 0
> brk(0xb7848000)                         = 0xb7848000
> read(4, "<IfDefine PERL>\nLoadModule perl_"..., 4096) = 1406
> read(4, "", 4096)                       = 0
> close(4)                                = 0
> stat64("/etc/apache2/vhosts.d", {st_mode=S_IFDIR|0755, st_size=4096, ...})
> = 0
> openat(AT_FDCWD, "/etc/apache2/vhosts.d",
> O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY|O_CLOEXEC) = 4
> getdents64(4, /* 6 entries */, 32768)   = 240
> getdents64(4, /* 0 entries */, 32768)   = 0
> close(4)                                = 0
> stat64("/etc/apache2/vhosts.d/00_default_ssl_vhost.conf",
> {st_mode=S_IFREG|0644, st_size=7824, ...}) = 0
> open("/etc/apache2/vhosts.d/00_default_ssl_vhost.conf",
> O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 4
> fstat64(4, {st_mode=S_IFREG|0644, st_size=7824, ...}) = 0
> read(4, "<IfDefine SSL>\n<IfDefine SSL_DEF"..., 4096) = 4096
> read(4, "means that the\n\t# standard Auth/"..., 4096) = 3728
> read(4, "", 4096)                       = 0
> close(4)                                = 0
> stat64("/etc/apache2/vhosts.d/00_default_vhost.conf",
> {st_mode=S_IFREG|0644, st_size=1520, ...}) = 0
> open("/etc/apache2/vhosts.d/00_default_vhost.conf",
> O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 4
> fstat64(4, {st_mode=S_IFREG|0644, st_size=1520, ...}) = 0
> read(4, "# Virtual Hosts\n#\n# If you want "..., 4096) = 1520
> read(4, "", 4096)                       = 0
> close(4)                                = 0
> read(3, "", 4096)                       = 0
> close(3)                                = 0
> brk(0xb7869000)                         = 0xb7869000
> stat64("/usr/sbin/suexec", 0xbf9234e0)  = -1 ENOENT (No such file or
> directory)
> gettimeofday({1340647469, 246523}, NULL) = 0
> socket(PF_FILE, SOCK_STREAM|SOCK_CLOEXEC|SOCK_NONBLOCK, 0) = 3
> connect(3, {sa_family=AF_FILE, sun_path="/var/run/nscd/socket"}, 110) = -1
> ENOENT (No such file or directory)
> close(3)                                = 0
> socket(PF_FILE, SOCK_STREAM|SOCK_CLOEXEC|SOCK_NONBLOCK, 0) = 3
> connect(3, {sa_family=AF_FILE, sun_path="/var/run/nscd/socket"}, 110) = -1
> ENOENT (No such file or directory)
> close(3)                                = 0
> open("/etc/nsswitch.conf", O_RDONLY|O_CLOEXEC) = 3
> brk(0xb788a000)                         = 0xb788a000
> fstat64(3, {st_mode=S_IFREG|0644, st_size=508, ...}) = 0
> mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0)
> = 0xb76be000
> read(3, "# /etc/nsswitch.conf:\n# $Header:"..., 4096) = 508
> read(3, "", 4096)                       = 0
> close(3)                                = 0
> munmap(0xb76be000, 4096)                = 0
> open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
> fstat64(3, {st_mode=S_IFREG|0644, st_size=42614, ...}) = 0
> mmap2(NULL, 42614, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb67bc000
> close(3)                                = 0
> open("/lib/libnss_compat.so.2", O_RDONLY|O_CLOEXEC) = 3
> read(3,
> "\x7f\x45\x4c\x46\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x03\x00\x03\x00\x01\x00\x00\x00\x90\x10\x00\x00\x34\x00\x00\x00"...,
> 512) = 512
> fstat64(3, {st_mode=S_IFREG|0755, st_size=34296, ...}) = 0
> mmap2(NULL, 37300, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) =
> 0xb5db6000
> mmap2(0xb5dbe000, 8192, PROT_READ|PROT_WRITE,
> MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x7) = 0xb5dbe000
> close(3)                                = 0
> mprotect(0xb5dbe000, 4096, PROT_READ)   = 0
> munmap(0xb67bc000, 42614)               = 0
> open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
> fstat64(3, {st_mode=S_IFREG|0644, st_size=42614, ...}) = 0
> mmap2(NULL, 42614, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb67bc000
> close(3)                                = 0
> open("/lib/libnss_nis.so.2", O_RDONLY|O_CLOEXEC) = 3
> read(3,
> "\x7f\x45\x4c\x46\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x03\x00\x03\x00\x01\x00\x00\x00\x90\x1e\x00\x00\x34\x00\x00\x00"...,
> 512) = 512
> fstat64(3, {st_mode=S_IFREG|0755, st_size=42284, ...}) = 0
> mmap2(NULL, 45448, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) =
> 0xb5daa000
> mmap2(0xb5db4000, 8192, PROT_READ|PROT_WRITE,
> MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x9) = 0xb5db4000
> close(3)                                = 0
> open("/lib/libnss_files.so.2", O_RDONLY|O_CLOEXEC) = 3
> read(3,
> "\x7f\x45\x4c\x46\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x03\x00\x03\x00\x01\x00\x00\x00\x90\x1f\x00\x00\x34\x00\x00\x00"...,
> 512) = 512
> fstat64(3, {st_mode=S_IFREG|0755, st_size=50784, ...}) = 0
> mmap2(NULL, 54120, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) =
> 0xb5d9c000
> mmap2(0xb5da8000, 8192, PROT_READ|PROT_WRITE,
> MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xb) = 0xb5da8000
> close(3)                                = 0
> mprotect(0xb5da8000, 4096, PROT_READ)   = 0
> mprotect(0xb5db4000, 4096, PROT_READ)   = 0
> munmap(0xb67bc000, 42614)               = 0
> open("/etc/passwd", O_RDONLY|O_CLOEXEC) = 3
> fcntl64(3, F_GETFD)                     = 0x1 (flags FD_CLOEXEC)
> _llseek(3, 0, [0], SEEK_CUR)            = 0
> fstat64(3, {st_mode=S_IFREG|0644, st_size=1567, ...}) = 0
> mmap2(NULL, 1567, PROT_READ, MAP_SHARED, 3, 0) = 0xb76be000
> _llseek(3, 1567, [1567], SEEK_SET)      = 0
> munmap(0xb76be000, 1567)                = 0
> close(3)                                = 0
> socket(PF_FILE, SOCK_STREAM|SOCK_CLOEXEC|SOCK_NONBLOCK, 0) = 3
> connect(3, {sa_family=AF_FILE, sun_path="/var/run/nscd/socket"}, 110) = -1
> ENOENT (No such file or directory)
> close(3)                                = 0
> socket(PF_FILE, SOCK_STREAM|SOCK_CLOEXEC|SOCK_NONBLOCK, 0) = 3
> connect(3, {sa_family=AF_FILE, sun_path="/var/run/nscd/socket"}, 110) = -1
> ENOENT (No such file or directory)
> close(3)                                = 0
> open("/etc/group", O_RDONLY|O_CLOEXEC)  = 3
> _llseek(3, 0, [0], SEEK_CUR)            = 0
> fstat64(3, {st_mode=S_IFREG|0644, st_size=683, ...}) = 0
> mmap2(NULL, 683, PROT_READ, MAP_SHARED, 3, 0) = 0xb76be000
> _llseek(3, 683, [683], SEEK_SET)        = 0
> munmap(0xb76be000, 683)                 = 0
> close(3)                                = 0
> gettimeofday({1340647469, 259054}, NULL) = 0
> brk(0xb78ab000)                         = 0xb78ab000
> gettimeofday({1340647469, 259689}, NULL) = 0
> write(2, "no listening sockets available, "..., 46no listening sockets
> available, shutting down
> ) = 46
> write(2, "Unable to open logs\n", 20Unable to open logs
> )   = 20
> select(0, NULL, NULL, NULL, {0, 10000}) = 0 (Timeout)
> munmap(0xb67dd000, 9945604)             = 0
> munmap(0xb67c7000, 86036)               = 0
> munmap(0xb677e000, 253156)              = 0
> munmap(0xb6731000, 313700)              = 0
> munmap(0xb64a1000, 406576)              = 0
> munmap(0xb6470000, 200416)              = 0
> munmap(0xb6465000, 41020)               = 0
> munmap(0xb6418000, 312336)              = 0
> munmap(0xb63cf000, 295656)              = 0
> munmap(0xb63bf000, 61628)               = 0
> munmap(0xb63a8000, 91976)               = 0
> munmap(0xb634c000, 376128)              = 0
> munmap(0xb62b0000, 634892)              = 0
> munmap(0xb6282000, 184332)              = 0
> munmap(0xb622b000, 352356)              = 0
> munmap(0xb621a000, 68648)               = 0
> munmap(0xb5f49000, 1573892)             = 0
> munmap(0xb66b4000, 404972)              = 0
> munmap(0xb5e86000, 797648)              = 0
> munmap(0xb6505000, 1762536)             = 0
> munmap(0xb5e4b000, 237764)              = 0
> munmap(0xb60ca000, 1374740)             = 0
> munmap(0xb5dc5000, 548812)              = 0
> munmap(0xb5dc0000, 16396)               = 0
> munmap(0xb715a000, 12400)               = 0
> munmap(0xb715e000, 16480)               = 0
> munmap(0xb7163000, 12432)               = 0
> munmap(0xb7167000, 16480)               = 0
> munmap(0xb716c000, 16480)               = 0
> munmap(0xb7171000, 65664)               = 0
> munmap(0xb7182000, 36960)               = 0
> munmap(0xb718c000, 25008)               = 0
> munmap(0xb7193000, 20580)               = 0
> munmap(0xb7199000, 12396)               = 0
> munmap(0xb719d000, 28992)               = 0
> munmap(0xb71a5000, 45164)               = 0
> munmap(0xb71b1000, 20584)               = 0
> munmap(0xb71b7000, 16480)               = 0
> munmap(0xb71bc000, 24676)               = 0
> munmap(0xb71c3000, 12384)               = 0
> munmap(0xb71e1000, 12384)               = 0
> munmap(0xb71e5000, 12384)               = 0
> munmap(0xb71e9000, 24672)               = 0
> munmap(0xb71c7000, 90184)               = 0
> munmap(0xb71f0000, 32908)               = 0
> munmap(0xb71f9000, 24688)               = 0
> munmap(0xb7200000, 36964)               = 0
> munmap(0xb720a000, 8288)                = 0
> munmap(0xb720d000, 12384)               = 0
> munmap(0xb7211000, 12388)               = 0
> munmap(0xb7215000, 12384)               = 0
> munmap(0xb7219000, 8288)                = 0
> munmap(0xb721c000, 12384)               = 0
> munmap(0xb7220000, 12384)               = 0
> munmap(0xb7224000, 8288)                = 0
> munmap(0xb7227000, 12384)               = 0
> munmap(0xb722b000, 8288)                = 0
> munmap(0xb722e000, 12384)               = 0
> munmap(0xb7232000, 12384)               = 0
> munmap(0xb76bf000, 16480)               = 0
> munmap(0xb76c4000, 12384)               = 0
> exit_group(1)                           = ?
> +++ exited with 1 +++
>
> ****
>
> On Mon, Jun 25, 2012 at 1:05 PM, Josh Narins <jn...@seniorbridge.com>
> wrote:****
>
> I always like to start with strace and running the httpd in debug mode
> (one child) with –X.****
>
>  ****
>
> ** **
>
> *Josh Narins*
> Director of Application Development
> SeniorBridge****
>
> 845 Third Ave
> 7th Floor
> New York, NY 10022
> Tel: (212) 994-6194
> Fax: (212) 994-4260
> Mobile: (917) 488-6248
> jnarins@seniorbridge.com
> seniorbridge.com <http://www.seniorbridge.com/>
>
> [image: SeniorBridge]****
>
> ** **
> ------------------------------
>
> *SeniorBridge Statement of Confidentiality:* The contents of this email
> message are intended for the exclusive use of the addressee(s) and may
> contain confidential or privileged information. Any dissemination,
> distribution or copying of this email by an unintended or mistaken
> recipient is strictly prohibited. In said event, kindly reply to the sender
> and destroy all entries of this message and any attachments from your
> system. Thank you.****
>
> *From:* John Manko [mailto:john.manko@gmail.com]
> *Sent:* Monday, June 25, 2012 12:58 PM
> *To:* modperl@perl.apache.org
> *Subject:* mod_perl segfaults, can't start Apache****
>
>  ****
>
> mod_perl is failing with Apache, and I'm having trouble figuring out why.
> I'm running under Gentoo.
>
> mod_perl version 2.0.7
> apache version 2.2.22-r1, build with threads and worker MPM
> libperl version 5.10.1-r1
> perl version 5.16.0 with ithreads support
>
>
> # /etc/init.d/apache2 start
>  * Starting apache2 ...
>  * start-stop-daemon: failed to start `/usr/sbin/apache2'
>
> # dmesg
> apache2[12697]: segfault at c ip b5d4974a sp bffce4d0 error 4 in
> mod_perl.so[b5d24000+45000]
>
> Any ideas on what to look for to determine the problem?****
>
>
>
>
> --
> “If the American people ever allow private banks to control the issue of
> their currency, first by inflation, then by deflation, the banks...will
> deprive the people of all property until their children wake-up homeless on
> the continent their fathers conquered... The issuing power should be taken
> from the banks and restored to the people, to whom it properly belongs."
> -- Thomas Jefferson****
>



-- 
“If the American people ever allow private banks to control the issue of
their currency, first by inflation, then by deflation, the banks...will
deprive the people of all property until their children wake-up homeless on
the continent their fathers conquered... The issuing power should be taken
from the banks and restored to the people, to whom it properly belongs."
-- Thomas Jefferson

Re: mod_perl segfaults, can't start Apache

Posted by John Manko <jo...@gmail.com>.
Ok, so I installed strace.  Please keep in mind that I'm a Java developer
by nature, and a systems guy by necessity.   :)

Here is what I have, and I'm not too sure how to interpret it.  Thank you
for the help, btw! :)

# strace -x /usr/sbin/apache2 > /root/apache_strace

execve("/usr/sbin/apache2", ["/usr/sbin/apache2"], [/* 31 vars */]) = 0
brk(0)                                  = 0xb775d000
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
0xb76c8000
access("/etc/ld.so.preload", R_OK)      = -1 ENOENT (No such file or
directory)
open("/usr/lib/tls/i686/sse2/libm.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT
(No such file or directory)

[ output removed for brevity ] .....

stat64("/etc/apache2/modules.d/75_mod_perl.conf", {st_mode=S_IFREG|0644,
st_size=1406, ...}) = 0
open("/etc/apache2/modules.d/75_mod_perl.conf",
O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 4
fstat64(4, {st_mode=S_IFREG|0644, st_size=1406, ...}) = 0
brk(0xb7848000)                         = 0xb7848000
read(4, "<IfDefine PERL>\nLoadModule perl_"..., 4096) = 1406
read(4, "", 4096)                       = 0
close(4)                                = 0
stat64("/etc/apache2/vhosts.d", {st_mode=S_IFDIR|0755, st_size=4096, ...})
= 0
openat(AT_FDCWD, "/etc/apache2/vhosts.d",
O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY|O_CLOEXEC) = 4
getdents64(4, /* 6 entries */, 32768)   = 240
getdents64(4, /* 0 entries */, 32768)   = 0
close(4)                                = 0
stat64("/etc/apache2/vhosts.d/00_default_ssl_vhost.conf",
{st_mode=S_IFREG|0644, st_size=7824, ...}) = 0
open("/etc/apache2/vhosts.d/00_default_ssl_vhost.conf",
O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 4
fstat64(4, {st_mode=S_IFREG|0644, st_size=7824, ...}) = 0
read(4, "<IfDefine SSL>\n<IfDefine SSL_DEF"..., 4096) = 4096
read(4, "means that the\n\t# standard Auth/"..., 4096) = 3728
read(4, "", 4096)                       = 0
close(4)                                = 0
stat64("/etc/apache2/vhosts.d/00_default_vhost.conf",
{st_mode=S_IFREG|0644, st_size=1520, ...}) = 0
open("/etc/apache2/vhosts.d/00_default_vhost.conf",
O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 4
fstat64(4, {st_mode=S_IFREG|0644, st_size=1520, ...}) = 0
read(4, "# Virtual Hosts\n#\n# If you want "..., 4096) = 1520
read(4, "", 4096)                       = 0
close(4)                                = 0
read(3, "", 4096)                       = 0
close(3)                                = 0
brk(0xb7869000)                         = 0xb7869000
stat64("/usr/sbin/suexec", 0xbf9234e0)  = -1 ENOENT (No such file or
directory)
gettimeofday({1340647469, 246523}, NULL) = 0
socket(PF_FILE, SOCK_STREAM|SOCK_CLOEXEC|SOCK_NONBLOCK, 0) = 3
connect(3, {sa_family=AF_FILE, sun_path="/var/run/nscd/socket"}, 110) = -1
ENOENT (No such file or directory)
close(3)                                = 0
socket(PF_FILE, SOCK_STREAM|SOCK_CLOEXEC|SOCK_NONBLOCK, 0) = 3
connect(3, {sa_family=AF_FILE, sun_path="/var/run/nscd/socket"}, 110) = -1
ENOENT (No such file or directory)
close(3)                                = 0
open("/etc/nsswitch.conf", O_RDONLY|O_CLOEXEC) = 3
brk(0xb788a000)                         = 0xb788a000
fstat64(3, {st_mode=S_IFREG|0644, st_size=508, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
0xb76be000
read(3, "# /etc/nsswitch.conf:\n# $Header:"..., 4096) = 508
read(3, "", 4096)                       = 0
close(3)                                = 0
munmap(0xb76be000, 4096)                = 0
open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=42614, ...}) = 0
mmap2(NULL, 42614, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb67bc000
close(3)                                = 0
open("/lib/libnss_compat.so.2", O_RDONLY|O_CLOEXEC) = 3
read(3,
"\x7f\x45\x4c\x46\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x03\x00\x03\x00\x01\x00\x00\x00\x90\x10\x00\x00\x34\x00\x00\x00"...,
512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=34296, ...}) = 0
mmap2(NULL, 37300, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) =
0xb5db6000
mmap2(0xb5dbe000, 8192, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x7) = 0xb5dbe000
close(3)                                = 0
mprotect(0xb5dbe000, 4096, PROT_READ)   = 0
munmap(0xb67bc000, 42614)               = 0
open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=42614, ...}) = 0
mmap2(NULL, 42614, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb67bc000
close(3)                                = 0
open("/lib/libnss_nis.so.2", O_RDONLY|O_CLOEXEC) = 3
read(3,
"\x7f\x45\x4c\x46\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x03\x00\x03\x00\x01\x00\x00\x00\x90\x1e\x00\x00\x34\x00\x00\x00"...,
512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=42284, ...}) = 0
mmap2(NULL, 45448, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) =
0xb5daa000
mmap2(0xb5db4000, 8192, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x9) = 0xb5db4000
close(3)                                = 0
open("/lib/libnss_files.so.2", O_RDONLY|O_CLOEXEC) = 3
read(3,
"\x7f\x45\x4c\x46\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x03\x00\x03\x00\x01\x00\x00\x00\x90\x1f\x00\x00\x34\x00\x00\x00"...,
512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=50784, ...}) = 0
mmap2(NULL, 54120, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) =
0xb5d9c000
mmap2(0xb5da8000, 8192, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xb) = 0xb5da8000
close(3)                                = 0
mprotect(0xb5da8000, 4096, PROT_READ)   = 0
mprotect(0xb5db4000, 4096, PROT_READ)   = 0
munmap(0xb67bc000, 42614)               = 0
open("/etc/passwd", O_RDONLY|O_CLOEXEC) = 3
fcntl64(3, F_GETFD)                     = 0x1 (flags FD_CLOEXEC)
_llseek(3, 0, [0], SEEK_CUR)            = 0
fstat64(3, {st_mode=S_IFREG|0644, st_size=1567, ...}) = 0
mmap2(NULL, 1567, PROT_READ, MAP_SHARED, 3, 0) = 0xb76be000
_llseek(3, 1567, [1567], SEEK_SET)      = 0
munmap(0xb76be000, 1567)                = 0
close(3)                                = 0
socket(PF_FILE, SOCK_STREAM|SOCK_CLOEXEC|SOCK_NONBLOCK, 0) = 3
connect(3, {sa_family=AF_FILE, sun_path="/var/run/nscd/socket"}, 110) = -1
ENOENT (No such file or directory)
close(3)                                = 0
socket(PF_FILE, SOCK_STREAM|SOCK_CLOEXEC|SOCK_NONBLOCK, 0) = 3
connect(3, {sa_family=AF_FILE, sun_path="/var/run/nscd/socket"}, 110) = -1
ENOENT (No such file or directory)
close(3)                                = 0
open("/etc/group", O_RDONLY|O_CLOEXEC)  = 3
_llseek(3, 0, [0], SEEK_CUR)            = 0
fstat64(3, {st_mode=S_IFREG|0644, st_size=683, ...}) = 0
mmap2(NULL, 683, PROT_READ, MAP_SHARED, 3, 0) = 0xb76be000
_llseek(3, 683, [683], SEEK_SET)        = 0
munmap(0xb76be000, 683)                 = 0
close(3)                                = 0
gettimeofday({1340647469, 259054}, NULL) = 0
brk(0xb78ab000)                         = 0xb78ab000
gettimeofday({1340647469, 259689}, NULL) = 0
write(2, "no listening sockets available, "..., 46no listening sockets
available, shutting down
) = 46
write(2, "Unable to open logs\n", 20Unable to open logs
)   = 20
select(0, NULL, NULL, NULL, {0, 10000}) = 0 (Timeout)
munmap(0xb67dd000, 9945604)             = 0
munmap(0xb67c7000, 86036)               = 0
munmap(0xb677e000, 253156)              = 0
munmap(0xb6731000, 313700)              = 0
munmap(0xb64a1000, 406576)              = 0
munmap(0xb6470000, 200416)              = 0
munmap(0xb6465000, 41020)               = 0
munmap(0xb6418000, 312336)              = 0
munmap(0xb63cf000, 295656)              = 0
munmap(0xb63bf000, 61628)               = 0
munmap(0xb63a8000, 91976)               = 0
munmap(0xb634c000, 376128)              = 0
munmap(0xb62b0000, 634892)              = 0
munmap(0xb6282000, 184332)              = 0
munmap(0xb622b000, 352356)              = 0
munmap(0xb621a000, 68648)               = 0
munmap(0xb5f49000, 1573892)             = 0
munmap(0xb66b4000, 404972)              = 0
munmap(0xb5e86000, 797648)              = 0
munmap(0xb6505000, 1762536)             = 0
munmap(0xb5e4b000, 237764)              = 0
munmap(0xb60ca000, 1374740)             = 0
munmap(0xb5dc5000, 548812)              = 0
munmap(0xb5dc0000, 16396)               = 0
munmap(0xb715a000, 12400)               = 0
munmap(0xb715e000, 16480)               = 0
munmap(0xb7163000, 12432)               = 0
munmap(0xb7167000, 16480)               = 0
munmap(0xb716c000, 16480)               = 0
munmap(0xb7171000, 65664)               = 0
munmap(0xb7182000, 36960)               = 0
munmap(0xb718c000, 25008)               = 0
munmap(0xb7193000, 20580)               = 0
munmap(0xb7199000, 12396)               = 0
munmap(0xb719d000, 28992)               = 0
munmap(0xb71a5000, 45164)               = 0
munmap(0xb71b1000, 20584)               = 0
munmap(0xb71b7000, 16480)               = 0
munmap(0xb71bc000, 24676)               = 0
munmap(0xb71c3000, 12384)               = 0
munmap(0xb71e1000, 12384)               = 0
munmap(0xb71e5000, 12384)               = 0
munmap(0xb71e9000, 24672)               = 0
munmap(0xb71c7000, 90184)               = 0
munmap(0xb71f0000, 32908)               = 0
munmap(0xb71f9000, 24688)               = 0
munmap(0xb7200000, 36964)               = 0
munmap(0xb720a000, 8288)                = 0
munmap(0xb720d000, 12384)               = 0
munmap(0xb7211000, 12388)               = 0
munmap(0xb7215000, 12384)               = 0
munmap(0xb7219000, 8288)                = 0
munmap(0xb721c000, 12384)               = 0
munmap(0xb7220000, 12384)               = 0
munmap(0xb7224000, 8288)                = 0
munmap(0xb7227000, 12384)               = 0
munmap(0xb722b000, 8288)                = 0
munmap(0xb722e000, 12384)               = 0
munmap(0xb7232000, 12384)               = 0
munmap(0xb76bf000, 16480)               = 0
munmap(0xb76c4000, 12384)               = 0
exit_group(1)                           = ?
+++ exited with 1 +++


On Mon, Jun 25, 2012 at 1:05 PM, Josh Narins <jn...@seniorbridge.com>wrote:

> I always like to start with strace and running the httpd in debug mode
> (one child) with –X.****
>
> ** **
>
>
> *Josh Narins*
> Director of Application Development
> SeniorBridge
>
> 845 Third Ave
> 7th Floor
> New York, NY 10022
> Tel: (212) 994-6194
> Fax: (212) 994-4260
> Mobile: (917) 488-6248
> jnarins@seniorbridge.com
> seniorbridge.com <http://www.seniorbridge.com/>
>
> [image: SeniorBridge]
>
>
> ------------------------------
> *SeniorBridge Statement of Confidentiality:* The contents of this email
> message are intended for the exclusive use of the addressee(s) and may
> contain confidential or privileged information. Any dissemination,
> distribution or copying of this email by an unintended or mistaken
> recipient is strictly prohibited. In said event, kindly reply to the sender
> and destroy all entries of this message and any attachments from your
> system. Thank you.
>
> *From:* John Manko [mailto:john.manko@gmail.com]
> *Sent:* Monday, June 25, 2012 12:58 PM
> *To:* modperl@perl.apache.org
> *Subject:* mod_perl segfaults, can't start Apache****
>
> ** **
>
> mod_perl is failing with Apache, and I'm having trouble figuring out why.
> I'm running under Gentoo.
>
> mod_perl version 2.0.7
> apache version 2.2.22-r1, build with threads and worker MPM
> libperl version 5.10.1-r1
> perl version 5.16.0 with ithreads support
>
>
> # /etc/init.d/apache2 start
>  * Starting apache2 ...
>  * start-stop-daemon: failed to start `/usr/sbin/apache2'
>
> # dmesg
> apache2[12697]: segfault at c ip b5d4974a sp bffce4d0 error 4 in
> mod_perl.so[b5d24000+45000]
>
> Any ideas on what to look for to determine the problem?****
>



-- 
“If the American people ever allow private banks to control the issue of
their currency, first by inflation, then by deflation, the banks...will
deprive the people of all property until their children wake-up homeless on
the continent their fathers conquered... The issuing power should be taken
from the banks and restored to the people, to whom it properly belongs."
-- Thomas Jefferson

RE: mod_perl segfaults, can't start Apache

Posted by Josh Narins <jn...@seniorbridge.com>.
I always like to start with strace and running the httpd in debug mode (one child) with -X.




Josh Narins
Director of Application Development
SeniorBridge

845 Third Ave
7th Floor
New York, NY 10022
Tel: (212) 994-6194
Fax: (212) 994-4260
Mobile: (917) 488-6248
jnarins@seniorbridge.com
seniorbridge.com<http://www.seniorbridge.com/>

[http://www.seniorbridge.com/images/seniorbridgedisclaimerTAG.gif]


________________________________
SeniorBridge Statement of Confidentiality: The contents of this email message are intended for the exclusive use of the addressee(s) and may contain confidential or privileged information. Any dissemination, distribution or copying of this email by an unintended or mistaken recipient is strictly prohibited. In said event, kindly reply to the sender and destroy all entries of this message and any attachments from your system. Thank you.
From: John Manko [mailto:john.manko@gmail.com]
Sent: Monday, June 25, 2012 12:58 PM
To: modperl@perl.apache.org
Subject: mod_perl segfaults, can't start Apache

mod_perl is failing with Apache, and I'm having trouble figuring out why.  I'm running under Gentoo.

mod_perl version 2.0.7
apache version 2.2.22-r1, build with threads and worker MPM
libperl version 5.10.1-r1
perl version 5.16.0 with ithreads support


# /etc/init.d/apache2 start
 * Starting apache2 ...
 * start-stop-daemon: failed to start `/usr/sbin/apache2'

# dmesg
apache2[12697]: segfault at c ip b5d4974a sp bffce4d0 error 4 in mod_perl.so[b5d24000+45000]

Any ideas on what to look for to determine the problem?