Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: ModPerl: ModPerl

mod_perl segfaults, can't start Apache

 

 

ModPerl modperl RSS feed   Index | Next | Previous | View Threaded


john.manko at gmail

Jun 25, 2012, 9:58 AM

Post #1 of 8 (713 views)
Permalink
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?


jnarins at seniorbridge

Jun 25, 2012, 10:05 AM

Post #2 of 8 (677 views)
Permalink
RE: mod_perl segfaults, can't start Apache [In reply to]

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 [at] seniorbridge
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 [at] gmail]
Sent: Monday, June 25, 2012 12:58 PM
To: modperl [at] perl
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?


chris at netpos

Jun 25, 2012, 10:33 AM

Post #3 of 8 (670 views)
Permalink
Re: mod_perl segfaults, can't start Apache [In reply to]

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 <john.manko [at] gmail> 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 <chris [at] netpos>
Chief Technical Officer
NetPOS LLC<http://netpos.com>
fon: 734.302.4220
cel: 734.645.6215

____________________________________


john.manko at gmail

Jun 25, 2012, 11:18 AM

Post #4 of 8 (674 views)
Permalink
Re: mod_perl segfaults, can't start Apache [In reply to]

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 <jnarins [at] seniorbridge>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 [at] seniorbridge
> 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 [at] gmail]
> *Sent:* Monday, June 25, 2012 12:58 PM
> *To:* modperl [at] perl
> *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


john.manko at gmail

Jun 25, 2012, 3:15 PM

Post #5 of 8 (666 views)
Permalink
Re: mod_perl segfaults, can't start Apache [In reply to]

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 <jnarins [at] seniorbridge>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 [at] seniorbridge
> seniorbridge.com <http://www.seniorbridge.com/>
>
> [image: SeniorBridge]
>
> *From:* John Manko [mailto:john.manko [at] gmail]
> *Sent:* Monday, June 25, 2012 2:18 PM
> *To:* Josh Narins
> *Cc:* modperl [at] perl
> *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 <jnarins [at] seniorbridge>
> 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 [at] seniorbridge
> 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 [at] gmail]
> *Sent:* Monday, June 25, 2012 12:58 PM
> *To:* modperl [at] perl
> *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


daxim at cpan

Jun 26, 2012, 2:05 AM

Post #6 of 8 (667 views)
Permalink
Re: mod_perl segfaults, can't start Apache [In reply to]

> 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.
Attachments: signature.asc (0.19 KB)


chall0 at gmail

Jun 27, 2012, 3:00 PM

Post #7 of 8 (656 views)
Permalink
Re: mod_perl segfaults, can't start Apache [In reply to]

I've been seeing the same problem on Gentoo. I think this is the same
issue as described at
http://www.gossamer-threads.com/lists/perl/porters/263222 .

When perl is compiled, the optimisation switches in the CFLAGS in
make.conf are used, together with some autodetected ones. When perl
modules, such as mod_perl, are built later, the CFLAGS from the
currently-installed perl are extracted, and used by themselves,
without the autodetected ones.

In this case, the perl compilation was using my CFLAGS, together with
-D_FILE_OFFSET_BITS=64 (among other things). But mod_perl (and all
other perl modules written in C) are only picking up the CFLAGS. This
causes a difference in ABI, and hence the crash.

If I add -D_FILE_OFFSET_BITS=64 to the end of my CFLAGS in make.conf,
and recompile perl, then this define still gets added to the compiler
switches -- where it does no harm being specified twice. If I then
recompile mod_perl, this now includes that switch, after which
everything works fine.

I've since created /etc/portage/env/dev-lang/perl with
CFLAGS="$(CFLAGS) -D_FILE_OFFSET_BITS=64" to save having to alter the
make.conf globally. This approach ought to be sufficient, but I
haven't had chance to test it.

In case it's useful to anyone, here is the stack trace I was getting
before fixing the problem:

# gdb --args apache2 -D DEFAULT_VHOST -D PERL
GNU gdb (Gentoo 7.4.1 p1) 7.4.1
Copyright (C) 2012 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "i686-pc-linux-gnu".
For bug reporting instructions, please see:
<http://bugs.gentoo.org/>...
Reading symbols from /usr/sbin/apache2...Reading symbols from
/usr/lib/debug/usr/sbin/apache2.debug...done.
done.
(gdb) r
Starting program: /usr/sbin/apache2 -D DEFAULT_VHOST -D PERL
warning: Could not load shared library symbols for linux-gate.so.1.
Do you need "set solib-search-path" or "set sysroot"?
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/libthread_db.so.1".

Program received signal SIGSEGV, Segmentation fault.
0xb7f0f174 in modperl_env_clear (my_perl=0x8227330) at modperl_env.c:100
100 HV *hv = ENVHV;
(gdb) where
#0 0xb7f0f174 in modperl_env_clear (my_perl=0x8227330) at modperl_env.c:100
#1 0xb7efcfea in modperl_boot (my_perl=0x8227330, data=0x0) at mod_perl.c:100
#2 0xb7e01681 in Perl_leave_scope (my_perl=0x8227330, base=0) at scope.c:970
#3 0xb7e024f3 in Perl_pop_scope (my_perl=0x8227330) at scope.c:110
#4 0xb7d5714b in S_parse_body (xsinit=0xb7efcf70 <modperl_xs_init>,
env=0x0, my_perl=0x8227330) at perl.c:2270
#5 perl_parse (my_perl=0x8227330, xsinit=0xb7efcf70
<modperl_xs_init>, argc=2, argv=0x81862d0, env=0x0) at perl.c:1633
#6 0xb7efd3a6 in modperl_startup (s=0x80b9c08, p=0x80b40a8) at mod_perl.c:255
#7 0xb7efd31c in modperl_startup (s=0x80b9c08, p=0x80b40a8) at mod_perl.c:207
#8 0xb7efd856 in modperl_init (base_server=0x80b9c08, p=0x80b40a8) at
mod_perl.c:458
#9 0xb7efda0e in modperl_hook_init (s=0x80b9c08, pconf=0x80b40a8,
plog=<optimized out>, ptemp=<optimized out>) at mod_perl.c:631
#10 modperl_hook_init (pconf=0x80b40a8, plog=0x80e2160,
ptemp=0x80e4168, s=0x80b9c08) at mod_perl.c:608
#11 0x0807d589 in ap_run_open_logs (pconf=0x80b40a8, plog=0x80e2160,
ptemp=0x80e4168, s=0x80b9c08) at config.c:151
#12 0x080680d3 in main (argc=5, argv=0xbfffe3e4) at main.c:680
(gdb) list
95 }
96 }
97
98 void modperl_env_clear(pTHX)
99 {
100 HV *hv = ENVHV;
101 U32 mg_flags;
102
103 modperl_env_untie(mg_flags);
104
(gdb) disassemble
Dump of assembler code for function modperl_env_clear:
0xb7f0f150 <+0>: sub $0x1c,%esp
0xb7f0f153 <+3>: mov %esi,0x14(%esp)
0xb7f0f157 <+7>: mov 0x20(%esp),%esi
0xb7f0f15b <+11>: mov %ebx,0x10(%esp)
0xb7f0f15f <+15>: call 0xb7efc977 <__i686.get_pc_thunk.bx>
0xb7f0f164 <+20>: add $0x17e90,%ebx
0xb7f0f16a <+26>: mov %edi,0x18(%esp)
0xb7f0f16e <+30>: mov 0x2ec(%esi),%eax
=> 0xb7f0f174 <+36>: mov 0xc(%eax),%eax
0xb7f0f177 <+39>: mov 0x14(%eax),%eax
0xb7f0f17a <+42>: mov 0x8(%eax),%edi
0xb7f0f17d <+45>: mov %edi,%edx
0xb7f0f17f <+47>: and $0xe00000,%edi
0xb7f0f185 <+53>: and $0xff1fffff,%edx
0xb7f0f18b <+59>: mov %edx,0x8(%eax)
0xb7f0f18e <+62>: mov %eax,0x4(%esp)
0xb7f0f192 <+66>: mov %esi,(%esp)
0xb7f0f195 <+69>: call 0xb7efc3d0 <Perl_hv_clear [at] pl>
0xb7f0f19a <+74>: mov 0x2ec(%esi),%eax
0xb7f0f1a0 <+80>: mov 0xc(%eax),%eax
0xb7f0f1a3 <+83>: mov 0x14(%eax),%eax
0xb7f0f1a6 <+86>: or %edi,0x8(%eax)
0xb7f0f1a9 <+89>: mov 0x10(%esp),%ebx
0xb7f0f1ad <+93>: mov 0x14(%esp),%esi
0xb7f0f1b1 <+97>: mov 0x18(%esp),%edi
0xb7f0f1b5 <+101>: add $0x1c,%esp
0xb7f0f1b8 <+104>: ret
End of assembler dump.
(gdb) info registers
eax 0x0 0
ecx 0x0 0
edx 0x822ed28 136506664
ebx 0xb7f26ff4 -1208848396
esp 0xbfffde40 0xbfffde40
ebp 0x80b9c08 0x80b9c08
esi 0x8227330 136475440
edi 0x80b40a8 134955176
eip 0xb7f0f174 0xb7f0f174 <modperl_env_clear+36>
eflags 0x10282 [ SF IF RF ]
cs 0x73 115
ss 0x7b 123
ds 0x7b 123
es 0x7b 123
fs 0x0 0
gs 0x33 51
(gdb) c
Continuing.

Program terminated with signal SIGSEGV, Segmentation fault.
The program no longer exists.
(gdb) q


john.manko at gmail

Jun 28, 2012, 7:33 AM

Post #8 of 8 (647 views)
Permalink
Re: mod_perl segfaults, can't start Apache [In reply to]

Chris, that seems to have solved my problems. Though, I used the package
env config as described in the Gentoo Wiki (
http://wiki.gentoo.org/wiki//etc/portage/env). For those having this
problem, simple create the following problems and rebuild perl and mod_perl

/etc/portage/env/www-apache_mod_perl.conf:
CFLAGS="${CFLAGS} -D_FILE_OFFSET_BITS=64"

/etc/portage/package.env:
www-apache/mod_perl www-apache_mod_perl.conf
dev-lang/perl www-apache_mod_perl.conf

Now, I wasn't sure if adding the www-apache/mod_perl was required or not,
but I included it anyway.

So, mod_perl builds fine and apache is running. I have other problems
related to Bugzilla and perl modules, but I don't think it's related. I
will follow up if it is.

Thank you, everyone! I could not have figured this out without your help.
Much appreciated.

On Wed, Jun 27, 2012 at 6:00 PM, Christopher Hall <chall0 [at] gmail> wrote:

> I've been seeing the same problem on Gentoo. I think this is the same
> issue as described at
> http://www.gossamer-threads.com/lists/perl/porters/263222 .
>
> When perl is compiled, the optimisation switches in the CFLAGS in
> make.conf are used, together with some autodetected ones. When perl
> modules, such as mod_perl, are built later, the CFLAGS from the
> currently-installed perl are extracted, and used by themselves,
> without the autodetected ones.
>
> In this case, the perl compilation was using my CFLAGS, together with
> -D_FILE_OFFSET_BITS=64 (among other things). But mod_perl (and all
> other perl modules written in C) are only picking up the CFLAGS. This
> causes a difference in ABI, and hence the crash.
>
> If I add -D_FILE_OFFSET_BITS=64 to the end of my CFLAGS in make.conf,
> and recompile perl, then this define still gets added to the compiler
> switches -- where it does no harm being specified twice. If I then
> recompile mod_perl, this now includes that switch, after which
> everything works fine.
>
> I've since created /etc/portage/env/dev-lang/perl with
> CFLAGS="$(CFLAGS) -D_FILE_OFFSET_BITS=64" to save having to alter the
> make.conf globally. This approach ought to be sufficient, but I
> haven't had chance to test it.
>
> In case it's useful to anyone, here is the stack trace I was getting
> before fixing the problem:
>
> # gdb --args apache2 -D DEFAULT_VHOST -D PERL
> GNU gdb (Gentoo 7.4.1 p1) 7.4.1
> Copyright (C) 2012 Free Software Foundation, Inc.
> License GPLv3+: GNU GPL version 3 or later <
> http://gnu.org/licenses/gpl.html>
> This is free software: you are free to change and redistribute it.
> There is NO WARRANTY, to the extent permitted by law. Type "show copying"
> and "show warranty" for details.
> This GDB was configured as "i686-pc-linux-gnu".
> For bug reporting instructions, please see:
> <http://bugs.gentoo.org/>...
> Reading symbols from /usr/sbin/apache2...Reading symbols from
> /usr/lib/debug/usr/sbin/apache2.debug...done.
> done.
> (gdb) r
> Starting program: /usr/sbin/apache2 -D DEFAULT_VHOST -D PERL
> warning: Could not load shared library symbols for linux-gate.so.1.
> Do you need "set solib-search-path" or "set sysroot"?
> [Thread debugging using libthread_db enabled]
> Using host libthread_db library "/lib/libthread_db.so.1".
>
> Program received signal SIGSEGV, Segmentation fault.
> 0xb7f0f174 in modperl_env_clear (my_perl=0x8227330) at modperl_env.c:100
> 100 HV *hv = ENVHV;
> (gdb) where
> #0 0xb7f0f174 in modperl_env_clear (my_perl=0x8227330) at
> modperl_env.c:100
> #1 0xb7efcfea in modperl_boot (my_perl=0x8227330, data=0x0) at
> mod_perl.c:100
> #2 0xb7e01681 in Perl_leave_scope (my_perl=0x8227330, base=0) at
> scope.c:970
> #3 0xb7e024f3 in Perl_pop_scope (my_perl=0x8227330) at scope.c:110
> #4 0xb7d5714b in S_parse_body (xsinit=0xb7efcf70 <modperl_xs_init>,
> env=0x0, my_perl=0x8227330) at perl.c:2270
> #5 perl_parse (my_perl=0x8227330, xsinit=0xb7efcf70
> <modperl_xs_init>, argc=2, argv=0x81862d0, env=0x0) at perl.c:1633
> #6 0xb7efd3a6 in modperl_startup (s=0x80b9c08, p=0x80b40a8) at
> mod_perl.c:255
> #7 0xb7efd31c in modperl_startup (s=0x80b9c08, p=0x80b40a8) at
> mod_perl.c:207
> #8 0xb7efd856 in modperl_init (base_server=0x80b9c08, p=0x80b40a8) at
> mod_perl.c:458
> #9 0xb7efda0e in modperl_hook_init (s=0x80b9c08, pconf=0x80b40a8,
> plog=<optimized out>, ptemp=<optimized out>) at mod_perl.c:631
> #10 modperl_hook_init (pconf=0x80b40a8, plog=0x80e2160,
> ptemp=0x80e4168, s=0x80b9c08) at mod_perl.c:608
> #11 0x0807d589 in ap_run_open_logs (pconf=0x80b40a8, plog=0x80e2160,
> ptemp=0x80e4168, s=0x80b9c08) at config.c:151
> #12 0x080680d3 in main (argc=5, argv=0xbfffe3e4) at main.c:680
> (gdb) list
> 95 }
> 96 }
> 97
> 98 void modperl_env_clear(pTHX)
> 99 {
> 100 HV *hv = ENVHV;
> 101 U32 mg_flags;
> 102
> 103 modperl_env_untie(mg_flags);
> 104
> (gdb) disassemble
> Dump of assembler code for function modperl_env_clear:
> 0xb7f0f150 <+0>: sub $0x1c,%esp
> 0xb7f0f153 <+3>: mov %esi,0x14(%esp)
> 0xb7f0f157 <+7>: mov 0x20(%esp),%esi
> 0xb7f0f15b <+11>: mov %ebx,0x10(%esp)
> 0xb7f0f15f <+15>: call 0xb7efc977 <__i686.get_pc_thunk.bx>
> 0xb7f0f164 <+20>: add $0x17e90,%ebx
> 0xb7f0f16a <+26>: mov %edi,0x18(%esp)
> 0xb7f0f16e <+30>: mov 0x2ec(%esi),%eax
> => 0xb7f0f174 <+36>: mov 0xc(%eax),%eax
> 0xb7f0f177 <+39>: mov 0x14(%eax),%eax
> 0xb7f0f17a <+42>: mov 0x8(%eax),%edi
> 0xb7f0f17d <+45>: mov %edi,%edx
> 0xb7f0f17f <+47>: and $0xe00000,%edi
> 0xb7f0f185 <+53>: and $0xff1fffff,%edx
> 0xb7f0f18b <+59>: mov %edx,0x8(%eax)
> 0xb7f0f18e <+62>: mov %eax,0x4(%esp)
> 0xb7f0f192 <+66>: mov %esi,(%esp)
> 0xb7f0f195 <+69>: call 0xb7efc3d0 <Perl_hv_clear [at] pl>
> 0xb7f0f19a <+74>: mov 0x2ec(%esi),%eax
> 0xb7f0f1a0 <+80>: mov 0xc(%eax),%eax
> 0xb7f0f1a3 <+83>: mov 0x14(%eax),%eax
> 0xb7f0f1a6 <+86>: or %edi,0x8(%eax)
> 0xb7f0f1a9 <+89>: mov 0x10(%esp),%ebx
> 0xb7f0f1ad <+93>: mov 0x14(%esp),%esi
> 0xb7f0f1b1 <+97>: mov 0x18(%esp),%edi
> 0xb7f0f1b5 <+101>: add $0x1c,%esp
> 0xb7f0f1b8 <+104>: ret
> End of assembler dump.
> (gdb) info registers
> eax 0x0 0
> ecx 0x0 0
> edx 0x822ed28 136506664
> ebx 0xb7f26ff4 -1208848396
> esp 0xbfffde40 0xbfffde40
> ebp 0x80b9c08 0x80b9c08
> esi 0x8227330 136475440
> edi 0x80b40a8 134955176
> eip 0xb7f0f174 0xb7f0f174 <modperl_env_clear+36>
> eflags 0x10282 [ SF IF RF ]
> cs 0x73 115
> ss 0x7b 123
> ds 0x7b 123
> es 0x7b 123
> fs 0x0 0
> gs 0x33 51
> (gdb) c
> Continuing.
>
> Program terminated with signal SIGSEGV, Segmentation fault.
> The program no longer exists.
> (gdb) q
>

ModPerl modperl RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.