Segfault Help!?!?

Segfault Help!?!?

am 02.06.2008 14:05:30 von Amiri Barksdale

I am running Apache 1.3, mod_perl 1.30, perl 5.8.8, with gzip and ssl. I keep
getting segfaults. Sometimes they seem harmless, like the server keeps
running and honoring requests. Other times, they bring everything to a
screeching halt.

This started when I moved my server from a RAM-starved server to a beefier
one. I have had to recompile and reinstall my own perl from source,
reinstall my module environment, re*compile* my module environment, and
reconfigure DBI and DBD::mysql to work with the latest version of the
rpm-installed mysql 5 on my new server.

Just last night, I got a series of segfaults (of the sort that stops
everything) from a "DBD::mysql::st execute failed: Lost connection to MySQL
server".

Here are two short snippets of gdb output from the other evening. Can
someone lead me in the right direction? One interesting problem is the call
in the traces for index.mhtml. That file doesn't exist and isn't called for
anywhere in my codebase--at least not intentionally. And obviously, shortly
thereafter, the apache child dies.


....
rt_sigaction(SIGUSR1, {0x4b7a35, [], SA_RESTORER|SA_INTERRUPT,
0x337000c5b0}, {SIG_IGN}, 8) = 0
rt_sigaction(SIGALRM, {0x4b6407, [], SA_RESTORER, 0x337000c5b0}, {0x4b6407,
[], SA_RESTORER, 0x337000c5b0}, 8) = 0
semop(5865472, 0x726a60, 1) = 0
select(19, [17 18], NULL, NULL, NULL) = 1 (in [18])
accept(18, {sa_family=AF_INET, sin_port=htons(42746),
sin_addr=inet_addr("66.249.72.98")}, [25769803792]) = 3
semop(5865472, 0x726a66, 1) = 0
rt_sigaction(SIGUSR1, {SIG_IGN}, {0x4b7a35, [], SA_RESTORER|SA_INTERRUPT,
0x337000c5b0}, 8) = 0
fcntl(3, F_SETFD, FD_CLOEXEC) = 0
getsockname(3, {sa_family=AF_INET, sin_port=htons(80),
sin_addr=inet_addr("72.52.195.139")}, [25769803792]) = 0
setsockopt(3, SOL_TCP, TCP_NODELAY, [1], 4) = 0
read(3, "GET / HTTP/1.1\r\nHost: localhost."..., 4096) = 277
rt_sigaction(SIGUSR1, {SIG_IGN}, {SIG_IGN}, 8) = 0
stat("/home/web/htdocs", {st_mode=S_IFDIR|0775, st_size=4096, ...}) = 0
rt_sigaction(SIGALRM, NULL, {0x4b6407, [], SA_RESTORER, 0x337000c5b0}, 8) =
0
stat("/home/web/htdocs", {st_mode=S_IFDIR|0775, st_size=4096, ...}) = 0
dup2(15, 2) = 2
stat("/home/web/htdocs", {st_mode=S_IFDIR|0775, st_size=4096, ...}) = 0
stat("/home/web/htdocs/index.mhtml", 0x30c04e8) = -1 ENOENT (No such file or
directory)
stat("/home/web/htdocs", {st_mode=S_IFDIR|0775, st_size=4096, ...}) = 0
rt_sigaction(SIGALRM, NULL, {0x4b6407, [], SA_RESTORER, 0x337000c5b0}, 8) =
0
write(2, "Use of uninitialized value in pa"..., 117) = 117
write(2, "Use of uninitialized value in pa"..., 117) = 117
poll([{fd=9, events=POLLIN|POLLPRI, revents=POLLIN|POLLHUP}], 1, 0) = 1
read(9, "", 8192) = 0
shutdown(9, 2 /* send and receive */) = 0
close(9) = 0
--- SIGSEGV (Segmentation fault) @ 0 (0) ---
chdir("/usr/local/apache") = 0
rt_sigaction(SIGSEGV, {SIG_DFL}, {SIG_DFL}, 8) = 0
kill(1819, SIGSEGV) = 0
rt_sigreturn(0x71b) = 0
--- SIGSEGV (Segmentation fault) @ 0 (0) ---
Process 1819 detached



....
close(3) = 0
rt_sigaction(SIGUSR1, {0x4b7a35, [], SA_RESTORER|SA_INTERRUPT,
0x337000c5b0}, {SIG_IGN}, 8) = 0
rt_sigaction(SIGALRM, {0x4b6407, [], SA_RESTORER, 0x337000c5b0}, {0x4b6407,
[], SA_RESTORER, 0x337000c5b0}, 8) = 0
semop(5931008, 0x726a60, 1) = 0
select(19, [17 18], NULL, NULL, NULL) = 1 (in [18])
accept(18, {sa_family=AF_INET, sin_port=htons(43014),
sin_addr=inet_addr("66.249.72.98")}, [16]) = 3
semop(5931008, 0x726a66, 1) = 0
rt_sigaction(SIGUSR1, {SIG_IGN}, {0x4b7a35, [], SA_RESTORER|SA_INTERRUPT,
0x337000c5b0}, 8) = 0
fcntl(3, F_SETFD, FD_CLOEXEC) = 0
getsockname(3, {sa_family=AF_INET, sin_port=htons(80),
sin_addr=inet_addr("72.52.195.139")}, [16]) = 0
setsockopt(3, SOL_TCP, TCP_NODELAY, [1], 4) = 0
read(3, "GET / HTTP/1.1\r\nHost: localhost."..., 4096) = 277
rt_sigaction(SIGUSR1, {SIG_IGN}, {SIG_IGN}, 8) = 0
stat("/home/web/htdocs", {st_mode=S_IFDIR|0775, st_size=4096, ...}) = 0
rt_sigaction(SIGALRM, NULL, {0x4b6407, [], SA_RESTORER, 0x337000c5b0}, 8) =
0
stat("/home/web/htdocs", {st_mode=S_IFDIR|0775, st_size=4096, ...}) = 0
dup2(15, 2) = 2
stat("/home/web/htdocs", {st_mode=S_IFDIR|0775, st_size=4096, ...}) = 0
stat("/home/web/htdocs/index.mhtml", 0x30c04e8) = -1 ENOENT (No such file or
directory)
stat("/home/web/htdocs", {st_mode=S_IFDIR|0775, st_size=4096, ...}) = 0
rt_sigaction(SIGALRM, NULL, {0x4b6407, [], SA_RESTORER, 0x337000c5b0}, 8) =
0
write(2, "Use of uninitialized value in pa"..., 117) = 117
write(2, "Use of uninitialized value in pa"..., 117) = 117
--- SIGSEGV (Segmentation fault) @ 0 (0) ---
chdir("/tmp/cores") = 0
rt_sigaction(SIGSEGV, {SIG_DFL}, {SIG_DFL}, 8) = 0
kill(2396, SIGSEGV) = 0
rt_sigreturn(0x95c) = 0
--- SIGSEGV (Segmentation fault) @ 0 (0) ---
Process 2396 detached
--
View this message in context: http://www.nabble.com/Segfault-Help%21-%21--tp17599739p17599 739.html
Sent from the mod_perl - General mailing list archive at Nabble.com.

Re: Segfault Help!?!?

am 02.06.2008 21:18:14 von Amiri Barksdale

Here are some better and further details. I turned on DBI debugging, so I can
see that before a segfault, I get the error

Apache::DBI disconnect (overloaded)

I have also done some gdb backtraces--I put strace output before. Here is
one gdb full bt:

(gdb) bt full
#0 0x0000002a994e37be in mysql_send_query ()
from /usr/lib64/mysql/libmysqlclient.so.15
No symbol table info available.
#1 0x0000002a994e3819 in mysql_real_query ()
from /usr/lib64/mysql/libmysqlclient.so.15
No symbol table info available.
#2 0x0000002a99388f59 in mysql_st_internal_execute (h=0x978260,
statement=Variable "statement" is not available.
)
at dbdimp.c:2903
bind_type_guessing = 0 '\0'
slen = 456
sbuf = 0x30fc0d0 "select
id,date,firstname,lastname,nickname,gender,dob,signatory,ban dname,genre_id,city,state,email,externalurl,password,inbox,a ddress1,address2,zip,im,imtype,blurb,country,language,timezo ne,openid,pic"...
table = Variable "table" is not available.

Now, the MySQL table being referenced there is my "user" table. I don't know
why dbdimp thinks the table should be called table. Is that a correct
reading?

Here is a second bt from a core dump:

#0 0x0000002a994e37be in mysql_send_query () from
/usr/lib64/mysql/libmysqlclient.so.15
No symbol table info available.
#1 0x0000002a994e3819 in mysql_real_query () from
/usr/lib64/mysql/libmysqlclient.so.15
No symbol table info available.
#2 0x0000002a99388f59 in mysql_st_internal_execute (h=0x3987a90,
statement=Variable "statement" is not available.
) at dbdimp.c:2903
bind_type_guessing = 0 '\0'
slen = 456
sbuf = 0x39d0cd0 "select
id,date,firstname,lastname,nickname,gender,dob,signatory,ban dname,genre_id,city,state,email,externalurl,password,inbox,a ddress1,address2,zip,im,imtype,blurb,country,language,timezo ne,openid,pic"...
table = Variable "table" is not available.


All my core dumps have this error about not being able to find the table!
That's a big clue, but where it leads, I don't know.

Amiri
--
View this message in context: http://www.nabble.com/Segfault-Help%21-%21--tp17599739p17608 709.html
Sent from the mod_perl - General mailing list archive at Nabble.com.

Re: Segfault Help!?!?

am 03.06.2008 02:38:31 von Amiri Barksdale

I realized after I posted the last bit that perhaps I should post the full
lib-loading output from gdb as well as the bt full. Here goes:

This GDB was configured as "x86_64-redhat-linux-gnu"...(no debugging symbols
found)
Using host libthread_db library "/lib64/tls/libthread_db.so.1".

Core was generated by `/usr/local/apache/bin/httpd'.
Program terminated with signal 11, Segmentation fault.
Reading symbols from /lib64/tls/libm.so.6...(no debugging symbols
found)...done.
Loaded symbols for /lib64/tls/libm.so.6
Reading symbols from /lib64/libcrypt.so.1...(no debugging symbols
found)...done.
Loaded symbols for /lib64/libcrypt.so.1
Reading symbols from /lib64/libssl.so.4...
(no debugging symbols found)...done.
Loaded symbols for /lib64/libssl.so.4
Reading symbols from /lib64/libcrypto.so.4...(no debugging symbols
found)...done.
Loaded symbols for /lib64/libcrypto.so.4
Reading symbols from /lib64/libnsl.so.1...
(no debugging symbols found)...done.
Loaded symbols for /lib64/libnsl.so.1
Reading symbols from /lib64/libdl.so.2...(no debugging symbols
found)...done.
Loaded symbols for /lib64/libdl.so.2
Reading symbols from /lib64/libutil.so.1...
(no debugging symbols found)...done.
Loaded symbols for /lib64/libutil.so.1
Reading symbols from /lib64/tls/libpthread.so.0...(no debugging symbols
found)...done.
Loaded symbols for /lib64/tls/libpthread.so.0
Reading symbols from /lib64/tls/libc.so.6...
(no debugging symbols found)...done.
Loaded symbols for /lib64/tls/libc.so.6
Reading symbols from /usr/lib64/libgssapi_krb5.so.2...(no debugging symbols
found)...done.
Loaded symbols for /usr/lib64/libgssapi_krb5.so.2
Reading symbols from /usr/lib64/libkrb5.so.3...
(no debugging symbols found)...done.
Loaded symbols for /usr/lib64/libkrb5.so.3
Reading symbols from /lib64/libcom_err.so.2...(no debugging symbols
found)...done.
Loaded symbols for /lib64/libcom_err.so.2
Reading symbols from /usr/lib64/libk5crypto.so.3...
(no debugging symbols found)...done.
Loaded symbols for /usr/lib64/libk5crypto.so.3
Reading symbols from /usr/lib64/libz.so.1...(no debugging symbols
found)...done.
Loaded symbols for /usr/lib64/libz.so.1
Reading symbols from /lib64/ld-linux-x86-64.so.2...
(no debugging symbols found)...done.
Loaded symbols for /lib64/ld-linux-x86-64.so.2
Reading symbols from /lib64/libresolv.so.2...(no debugging symbols
found)...done.
Loaded symbols for /lib64/libresolv.so.2
Reading symbols from /lib64/libnss_files.so.2...
(no debugging symbols found)...done.
Loaded symbols for /lib64/libnss_files.so.2
Reading symbols from
/usr/local/lib/perl5/site_perl/5.8.8/x86_64-linux-thread-mul ti/auto/DBI/DBI.so...(no
debugging symbols found)...done.
Loaded symbols for
/usr/local/lib/perl5/site_perl/5.8.8/x86_64-linux-thread-mul ti/auto/DBI/DBI.so
Reading symbols from
/usr/local/lib/perl5/5.8.8/x86_64-linux-thread-multi/auto/Li st/Util/Util.so...
(no debugging symbols found)...done.
Loaded symbols for
/usr/local/lib/perl5/5.8.8/x86_64-linux-thread-multi/auto/Li st/Util/Util.so
Reading symbols from
/usr/local/lib/perl5/5.8.8/x86_64-linux-thread-multi/auto/Cw d/Cwd.so...(no
debugging symbols found)...done.
Loaded symbols for
/usr/local/lib/perl5/5.8.8/x86_64-linux-thread-multi/auto/Cw d/Cwd.so
Reading symbols from
/usr/local/lib/perl5/5.8.8/x86_64-linux-thread-multi/auto/Fc ntl/Fcntl.so...
(no debugging symbols found)...done.
Loaded symbols for
/usr/local/lib/perl5/5.8.8/x86_64-linux-thread-multi/auto/Fc ntl/Fcntl.so
Reading symbols from
/usr/local/lib/perl5/5.8.8/x86_64-linux-thread-multi/auto/IO /IO.so...(no
debugging symbols found)...done.
Loaded symbols for
/usr/local/lib/perl5/5.8.8/x86_64-linux-thread-multi/auto/IO /IO.so
Reading symbols from
/usr/local/lib/perl5/site_perl/5.8.8/x86_64-linux-thread-mul ti/auto/HTML/Parser/Parser.so...
(no debugging symbols found)...done.
Loaded symbols for
/usr/local/lib/perl5/site_perl/5.8.8/x86_64-linux-thread-mul ti/auto/HTML/Parser/Parser.so
Reading symbols from
/usr/local/lib/perl5/site_perl/5.8.8/x86_64-linux-thread-mul ti/auto/Params/Validate/Validate.so...(no
debugging symbols found)...done.
Loaded symbols for
/usr/local/lib/perl5/site_perl/5.8.8/x86_64-linux-thread-mul ti/auto/Params/Validate/Validate.so
Reading symbols from
/usr/local/lib/perl5/5.8.8/x86_64-linux-thread-multi/auto/Fi le/Glob/Glob.so...
(no debugging symbols found)...done.
Loaded symbols for
/usr/local/lib/perl5/5.8.8/x86_64-linux-thread-multi/auto/Fi le/Glob/Glob.so
Reading symbols from
/usr/local/lib/perl5/site_perl/5.8.8/x86_64-linux-thread-mul ti/auto/Apache/Request/Request.so...(no
debugging symbols found)...done.
Loaded symbols for
/usr/local/lib/perl5/site_perl/5.8.8/x86_64-linux-thread-mul ti/auto/Apache/Request/Request.so
Reading symbols from
/usr/local/lib/perl5/5.8.8/x86_64-linux-thread-multi/auto/Da ta/Dumper/Dumper.so...
(no debugging symbols found)...done.
Loaded symbols for
/usr/local/lib/perl5/5.8.8/x86_64-linux-thread-multi/auto/Da ta/Dumper/Dumper.so
Reading symbols from
/usr/local/lib/perl5/5.8.8/x86_64-linux-thread-multi/auto/B/ B.so...(no
debugging symbols found)...done.
Loaded symbols for
/usr/local/lib/perl5/5.8.8/x86_64-linux-thread-multi/auto/B/ B.so
Reading symbols from
/usr/local/lib/perl5/site_perl/5.8.8/x86_64-linux-thread-mul ti/auto/Apache/Symbol/Symbol.so...
(no debugging symbols found)...done.
Loaded symbols for
/usr/local/lib/perl5/site_perl/5.8.8/x86_64-linux-thread-mul ti/auto/Apache/Symbol/Symbol.so
Reading symbols from
/usr/local/lib/perl5/site_perl/5.8.8/x86_64-linux-thread-mul ti/auto/version/vxs/vxs.so...(no
debugging symbols found)...done.
Loaded symbols for
/usr/local/lib/perl5/site_perl/5.8.8/x86_64-linux-thread-mul ti/auto/version/vxs/vxs.so
Reading symbols from
/usr/local/lib/perl5/site_perl/5.8.8/x86_64-linux-thread-mul ti/auto/Crypt/Rijndael/Rijndael.so...
(no debugging symbols found)...done.
Loaded symbols for
/usr/local/lib/perl5/site_perl/5.8.8/x86_64-linux-thread-mul ti/auto/Crypt/Rijndael/Rijndael.so
Reading symbols from
/usr/local/lib/perl5/site_perl/5.8.8/x86_64-linux-thread-mul ti/auto/DBD/mysql/mysql.so...done.
Loaded symbols for
/usr/local/lib/perl5/site_perl/5.8.8/x86_64-linux-thread-mul ti/auto/DBD/mysql/mysql.so
Reading symbols from /usr/lib64/mysql/libmysqlclient.so.15...done.
Loaded symbols for /usr/lib64/mysql/libmysqlclient.so.15
Reading symbols from
/usr/local/lib/perl5/site_perl/5.8.8/x86_64-linux-thread-mul ti/auto/Date/Calc/Calc.so...done.
Loaded symbols for
/usr/local/lib/perl5/site_perl/5.8.8/x86_64-linux-thread-mul ti/auto/Date/Calc/Calc.so
Reading symbols from
/usr/local/lib/perl5/5.8.8/x86_64-linux-thread-multi/auto/DB _File/DB_File.so...done.
Loaded symbols for
/usr/local/lib/perl5/5.8.8/x86_64-linux-thread-multi/auto/DB _File/DB_File.so
Reading symbols from /lib64/tls/libdb-4.2.so...done.
Loaded symbols for /lib64/tls/libdb-4.2.so
Reading symbols from
/usr/local/lib/perl5/site_perl/5.8.8/x86_64-linux-thread-mul ti/auto/List/MoreUtils/MoreUtils.so...done.
Loaded symbols for
/usr/local/lib/perl5/site_perl/5.8.8/x86_64-linux-thread-mul ti/auto/List/MoreUtils/MoreUtils.so
Reading symbols from
/usr/local/lib/perl5/site_perl/5.8.8/x86_64-linux-thread-mul ti/auto/XML/Parser/Expat/Expat.so...done.
Loaded symbols for
/usr/local/lib/perl5/site_perl/5.8.8/x86_64-linux-thread-mul ti/auto/XML/Parser/Expat/Expat.so
Reading symbols from /usr/lib64/libexpat.so.0...done.
Loaded symbols for /usr/lib64/libexpat.so.0
Reading symbols from
/usr/local/lib/perl5/site_perl/5.8.8/x86_64-linux-thread-mul ti/auto/DateTime/DateTime.so...done.
Loaded symbols for
/usr/local/lib/perl5/site_perl/5.8.8/x86_64-linux-thread-mul ti/auto/DateTime/DateTime.so
Reading symbols from
/usr/local/lib/perl5/site_perl/5.8.8/x86_64-linux-thread-mul ti/auto/Digest/SHA1/SHA1.so...done.
Loaded symbols for
/usr/local/lib/perl5/site_perl/5.8.8/x86_64-linux-thread-mul ti/auto/Digest/SHA1/SHA1.so
Reading symbols from
/usr/local/lib/perl5/5.8.8/x86_64-linux-thread-multi/auto/MI ME/Base64/Base64.so...done.
Loaded symbols for
/usr/local/lib/perl5/5.8.8/x86_64-linux-thread-multi/auto/MI ME/Base64/Base64.so
Reading symbols from
/usr/local/lib/perl5/site_perl/5.8.8/x86_64-linux-thread-mul ti/auto/Math/Pari/Pari.so...done.
Loaded symbols for
/usr/local/lib/perl5/site_perl/5.8.8/x86_64-linux-thread-mul ti/auto/Math/Pari/Pari.so
Reading symbols from
/usr/local/lib/perl5/site_perl/5.8.8/x86_64-linux-thread-mul ti/auto/Net/DNS/DNS.so...done.
Loaded symbols for
/usr/local/lib/perl5/site_perl/5.8.8/x86_64-linux-thread-mul ti/auto/Net/DNS/DNS.so
Reading symbols from
/usr/local/lib/perl5/5.8.8/x86_64-linux-thread-multi/auto/So cket/Socket.so...done.
Loaded symbols for
/usr/local/lib/perl5/5.8.8/x86_64-linux-thread-multi/auto/So cket/Socket.so
Reading symbols from
/usr/local/lib/perl5/site_perl/5.8.8/x86_64-linux-thread-mul ti/auto/Text/CSV_XS/CSV_XS.so...done.
Loaded symbols for
/usr/local/lib/perl5/site_perl/5.8.8/x86_64-linux-thread-mul ti/auto/Text/CSV_XS/CSV_XS.so
Reading symbols from
/usr/local/lib/perl5/5.8.8/x86_64-linux-thread-multi/auto/PO SIX/POSIX.so...done.
Loaded symbols for
/usr/local/lib/perl5/5.8.8/x86_64-linux-thread-multi/auto/PO SIX/POSIX.so
Reading symbols from
/usr/local/lib/perl5/site_perl/5.8.8/x86_64-linux-thread-mul ti/auto/XML/LibXML/Common/Common.so...done.
Loaded symbols for
/usr/local/lib/perl5/site_perl/5.8.8/x86_64-linux-thread-mul ti/auto/XML/LibXML/Common/Common.so
Reading symbols from /usr/lib64/libxml2.so.2...done.
Loaded symbols for /usr/lib64/libxml2.so.2
Reading symbols from
/usr/local/lib/perl5/site_perl/5.8.8/x86_64-linux-thread-mul ti/auto/XML/LibXML/LibXML.so...done.
Loaded symbols for
/usr/local/lib/perl5/site_perl/5.8.8/x86_64-linux-thread-mul ti/auto/XML/LibXML/LibXML.so
#0 0x0000002a994e37be in mysql_send_query ()
from /usr/lib64/mysql/libmysqlclient.so.15
--
View this message in context: http://www.nabble.com/Segfault-Help%21-%21--tp17599739p17613 827.html
Sent from the mod_perl - General mailing list archive at Nabble.com.

Re: Segfault Help!?!?

am 03.06.2008 18:18:34 von Amiri Barksdale

Does anyone have any guidance on what I should do here?

Amiri
--
View this message in context: http://www.nabble.com/Segfault-Help%21-%21--tp17599739p17627 528.html
Sent from the mod_perl - General mailing list archive at Nabble.com.

Re: Segfault Help!?!?

am 03.06.2008 19:12:39 von Fred Moyer

amiribarksdale wrote:
> Does anyone have any guidance on what I should do here?
>
> Amiri

From the archive thread: -
http://www.nabble.com/Segfault-Help%21-%21--tp17599739p17627 528.html

"Here are two short snippets of gdb output from the other evening. Can
someone lead me in the right direction? One interesting problem is the
call in the traces for index.mhtml. That file doesn't exist and isn't
called for anywhere in my codebase--at least not intentionally. And
obviously, shortly thereafter, the apache child dies."

You are most likely using HTML::Mason as your request handler. That
file index.html does not exist, so mason looks for an autohandler as
shown in the backtrace:

stat("/home/web/htdocs/index.mhtml", 0x30c04e8) = -1 ENOENT (No such
file or directory)
stat("/home/web/htdocs", {st_mode=S_IFDIR|0775, st_size=4096, ...}) = 0


"This started when I moved my server from a RAM-starved server to a
beefier one. I have had to recompile and reinstall my own perl from
source, reinstall my module environment, re*compile* my module
environment, and reconfigure DBI and DBD::mysql to work with the latest
version of the rpm-installed mysql 5 on my new server."

I would suggest using the exact same versions that you were using
previously. I saw that you moved to a 64 bit server - were you using a
32 bit box before? Did you copy any .so's over?

When changing the versions of code that you were using, the problem you
are generating can come from many places. Try minimizing the variance
by using exactly what modules you had in the working setup. If you are
still getting segfaults, that narrows down the list of causes and makes
the problem easier to solve.

Re: Segfault Help!?!?

am 03.06.2008 19:25:26 von Amiri Barksdale

Yes, I moved from 32 bit to 64 bit. But I did exactly what you said. I
reinstalled everything--perl, apache, mysql, DBI, DBD::mysql, every single
module--the whole shebang. So it's not just some careless oversight or file
copy. Everything has already been rebuilt and recompiled.

Amiri
--
View this message in context: http://www.nabble.com/Segfault-Help%21-%21--tp17599739p17628 964.html
Sent from the mod_perl - General mailing list archive at Nabble.com.

Re: Segfault Help!?!?

am 03.06.2008 19:42:31 von Fred Moyer

amiribarksdale wrote:
> Yes, I moved from 32 bit to 64 bit. But I did exactly what you said. I
> reinstalled everything--perl, apache, mysql, DBI, DBD::mysql, every single
> module--the whole shebang. So it's not just some careless oversight or file
> copy. Everything has already been rebuilt and recompiled.

You mentioned though that you upgraded mysql:

"and reconfigure DBI and DBD::mysql to work with the latest version of
the rpm-installed mysql 5 on my new server."

So there is at least one version difference between the two setups. Are
the versions of everything else exactly the same?

Re: Segfault Help!?!?

am 03.06.2008 19:49:37 von Amiri Barksdale

No, they're not the same, because they cannot be the same any longer. In the
server migration, I had to recompile and reinstall everything, because of
those 32-bit and 64 bit errors. I just built everything back up from
barebones CentOS.

Amiri
--
View this message in context: http://www.nabble.com/Segfault-Help%21-%21--tp17599739p17629 499.html
Sent from the mod_perl - General mailing list archive at Nabble.com.

Re: Segfault Help!?!?

am 03.06.2008 21:04:49 von Fred Moyer

amiribarksdale wrote:
> No, they're not the same, because they cannot be the same any longer. In the
> server migration, I had to recompile and reinstall everything, because of
> those 32-bit and 64 bit errors. I just built everything back up from
> barebones CentOS.

From my cursory look through the stack trace it looks like the segfault
is occurring when the database connections are being closed, either as a
result of the httpd child dying, or the apache dbi connection closing.

Apache::DBI disconnect (overloaded)

Try setting the debug level for Apache::DBI to 2 to get verbose output.

$Apache::DBI::DEBUG

Re: Segfault Help!?!?

am 03.06.2008 21:09:26 von Amiri Barksdale

Yes, I have the debug output on 2 already. It doesn't say much else than what
I posted.

Amiri



Fred Moyer wrote:
>
> amiribarksdale wrote:
>> No, they're not the same, because they cannot be the same any longer. In
>> the
>> server migration, I had to recompile and reinstall everything, because of
>> those 32-bit and 64 bit errors. I just built everything back up from
>> barebones CentOS.
>
> From my cursory look through the stack trace it looks like the segfault
> is occurring when the database connections are being closed, either as a
> result of the httpd child dying, or the apache dbi connection closing.
>
> Apache::DBI disconnect (overloaded)
>
> Try setting the debug level for Apache::DBI to 2 to get verbose output.
>
> $Apache::DBI::DEBUG
>
>

--
View this message in context: http://www.nabble.com/Segfault-Help%21-%21--tp17599739p17631 195.html
Sent from the mod_perl - General mailing list archive at Nabble.com.

Re: Segfault Help!?!?

am 03.06.2008 21:17:58 von Fred Moyer

amiribarksdale wrote:
> Yes, I have the debug output on 2 already. It doesn't say much else than what
> I posted.

Ah right, read DEBUG level in the thread, didn't get that you had
actually set the apache dbi debug level (despite the log entry clearly
indicating it).

Can you post your httpd.conf and startup.pl?

Are you using transactions?



>
> Amiri
>
>
>
> Fred Moyer wrote:
>> amiribarksdale wrote:
>>> No, they're not the same, because they cannot be the same any longer. In
>>> the
>>> server migration, I had to recompile and reinstall everything, because of
>>> those 32-bit and 64 bit errors. I just built everything back up from
>>> barebones CentOS.
>> From my cursory look through the stack trace it looks like the segfault
>> is occurring when the database connections are being closed, either as a
>> result of the httpd child dying, or the apache dbi connection closing.
>>
>> Apache::DBI disconnect (overloaded)
>>
>> Try setting the debug level for Apache::DBI to 2 to get verbose output.
>>
>> $Apache::DBI::DEBUG

Re: Segfault Help!?!?

am 03.06.2008 22:44:06 von Amiri Barksdale

Fred Moyer wrote:
>
> Can you post your httpd.conf and startup.pl?
>
> Are you using transactions?
>

I am not using transactions--I don't have any InnoDB tables, either.

Here is my httpd.conf:

ServerType standalone
ServerRoot "/usr/local/apache"
PidFile /usr/local/apache/logs/httpd.pid
ScoreBoardFile /usr/local/apache/logs/httpd.scoreboard
Timeout 300
KeepAlive Off
MaxKeepAliveRequests 100
KeepAliveTimeout 15
MinSpareServers 5
MaxSpareServers 10
StartServers 5
MaxClients 100
MaxRequestsPerChild 500
Listen *.*.*.*:80

ExtendedStatus On
Port 80

User nobody
Group nobody

ServerName *.com
ErrorDocument 404 /errors/404.html
ErrorDocument 403 /errors/403.html

FileETag none

CoreDumpDirectory /tmp


Options FollowSymLinks
AllowOverride None



SetHandler perl-script


UseCanonicalName On

DefaultType text/html

HostnameLookups Off

ErrorLog /usr/local/apache/logs/error_log

LogLevel debug

LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" PID:
%P" combined

CustomLog /usr/local/apache/logs/access_log combined

ServerSignature On

### Section 3: Virtual Hosts
NameVirtualHost *.*.*.*:80


ServerAdmin webmaster@*.com
DocumentRoot /home/web/htdocs
ServerName *.com
ServerAlias www.*.com

PerlSetVar site prod


SetHandler perl-script
AuthType deasil::*::Apache
PerlAuthzHandler deasil::*::Apache->authz_handler
PerlAuthenHandler deasil::*::Apache->authen_handler
require group admin




SSLCipherSuite
ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP:+e NULL


Listen 443
NameVirtualHost *.*.*.*:443
Include conf/ssl.conf


PerlModule Apache::DBI

PerlSetEnv AUTO_FIRST_ICAPS 1
PerlSetEnv DEASIL_USER_COOKIE au
PerlSetEnv DEASIL_USER_SES_COOKIE sau
PerlSetEnv DEASIL_COOKIE_DOMAIN *.com
PerlSetEnv DEASIL_PROD_DOMAIN http://*.com
PerlSetEnv DEASIL_SSL_DOMAIN https://*.com

PerlRequire /usr/local/mason/handler.pl
PerlHandler HTML::Mason
AddHandler perl-script .imhtml
AddHandler perl-script .mhtml
AddHandler perl-script .ml
AddHandler perl-script .html
AddHandler perl-script .mjs
AddHandler perl-script .mcss

Here is my handler.pl:

package HTML::Mason;

use strict;
use warnings;

use HTML::Mason;
use HTML::Mason::ApacheHandler;

$Apache::DBI::DEBUG = 2;

{
package HTML::Mason::Commands;

use deasil::*;
use deasil::*::Apache;
use Apache::Request;

use *::Utilities;
use *::Statistics;
use *::MusicProcessing;
use *::Blogs;
use *::Invite;
use *::Notifications;
use *::Merch;
use MIME::Lite;


use vars qw(
$_basedir
$_adminbase
);

$_basedir = '';
$_adminbase = '/admin';
}

my %ah = (
prod => HTML::Mason::ApacheHandler->new(
comp_root => [
[ prod_root => '/home/web/htdocs' ],
[ generic => '/home/web/generic/htdocs' ],
[ common => '/home/web/common/htdocs' ],
],
data_dir => '/usr/local/mason/data',
error_mode => 'output',
allow_globals => [ qw( $User ) ],
args_method => 'mod_perl',
),

secure => HTML::Mason::ApacheHandler->new(
comp_root => [
[ sec_root => '/home/web/secure/htdocs' ],
[ generic => '/home/web/generic/htdocs' ],
[ common => '/home/web/common/htdocs' ],
],
data_dir => '/usr/local/mason/data',
error_mode => 'output',
allow_globals => [ qw( $User ) ],
args_method => 'mod_perl',
),
);

sub handler {
my $r = shift;
$ah{$r->dir_config('site')}->handle_request($r);
}

1;
--
View this message in context: http://www.nabble.com/Segfault-Help%21-%21--tp17599739p17633 171.html
Sent from the mod_perl - General mailing list archive at Nabble.com.

Re: Segfault Help!?!?

am 05.06.2008 01:38:13 von Amiri Barksdale

I reinstalled mysql from source and recompiled my DBD::mysql against
its new libs, and I still get the same backtrace:

Using host libthread_db library "/lib64/tls/libthread_db.so.1".
....

#0 0x0000002a994cf93e in mysql_send_query ()
from /home/mysql/lib/mysql/libmysqlclient.so.15
(gdb) bt full
#0 0x0000002a994cf93e in mysql_send_query ()
from /home/mysql/lib/mysql/libmysqlclient.so.15
No symbol table info available.
#1 0x0000002a994cf999 in mysql_real_query ()
from /home/mysql/lib/mysql/libmysqlclient.so.15
No symbol table info available.
#2 0x0000002a99389a39 in mysql_st_internal_execute (h=0x9840b0,
statement=Variable "statement" is not available.
)
at dbdimp.c:2903
bind_type_guessing = 0 '\0'
slen = 456
sbuf = 0x313d840 "select
id
,date
,firstname
,lastname
,nickname
,gender
,dob
,signatory
,bandname
,genre_id
,city
,state
,email
,externalurl
,password
,inbox
,address1
,address2,zip,im,imtype,blurb,country,language,timezone,open id,pic"...
table = Variable "table" is not available.

Re: Segfault Help!?!?

am 05.06.2008 13:47:37 von Amiri Barksdale

It appears that downgrading DBD::mysql to version 4.004 has done the trick.

Amiri
--
View this message in context: http://www.nabble.com/Segfault-Help%21-%21--tp17599739p17668 030.html
Sent from the mod_perl - General mailing list archive at Nabble.com.

Re: Segfault Help!?!?

am 05.06.2008 19:29:45 von Fred Moyer

What version were you using that was causing the problems?

amiribarksdale wrote:
> It appears that downgrading DBD::mysql to version 4.004 has done the trick.
>
> Amiri


--
Red Hot Penguin Consulting LLC
mod_perl/PostgreSQL consulting and implementation
http://www.redhotpenguin.com/

Re: Segfault Help!?!?

am 05.06.2008 19:37:58 von Amiri Barksdale

Fred Moyer wrote:
>
> What version were you using that was causing the problems?
>

4.007.

Amiri
--
View this message in context: http://www.nabble.com/Segfault-Help%21-%21--tp17599739p17675 687.html
Sent from the mod_perl - General mailing list archive at Nabble.com.