DBI 1.61{1,6} + DBD::mysql 4.01{6,8} = segfault on Ubuntu 10.10amd64? (reprise)

DBI 1.61{1,6} + DBD::mysql 4.01{6,8} = segfault on Ubuntu 10.10amd64? (reprise)

am 08.02.2011 00:58:50 von Cosimo Streppone

Hi all,

I'm still trying to track down this weird segfault
problem on Apache startup. I had originally targetet dbi-users@
because it initially seemed to be DBI-related. Was trying to get
some feedback, "has anyone ever seen this?" type of question.

Now I have a stack backtrace, that might narrow down the
possibilities:

# gdb -c ./core /usr/sbin/apache2
...
Reading symbols from ...
...
Core was generated by `/usr/sbin/apache2 -d /var/tmp/test_cosimo_9727 -k
start -C User cosimo -C Group ...'.

Program terminated with signal 11, Segmentation fault.
#0 0x00007fdaedfed858 in XS_Class__XSAccessor_END ()
from /usr/lib/perl5/auto/Class/XSAccessor/XSAccessor.so
(gdb) backtrace
#0 0x00007fdaedfed858 in XS_Class__XSAccessor_END ()
from /usr/lib/perl5/auto/Class/XSAccessor/XSAccessor.so
#1 0x00007fdaf83cf845 in Perl_pp_entersub () from /usr/lib/libperl.so.5.10
#2 0x00007fdaf83752c6 in Perl_call_sv () from /usr/lib/libperl.so.5.10
#3 0x00007fdaf86ad40b in modperl_perl_call_list ()
from /usr/lib/apache2/modules/mod_perl.so
#4 0x00007fdaf86b5786 in modperl_perl_destruct ()
from /usr/lib/apache2/modules/mod_perl.so
#5 0x00007fdaf86a6256 in modperl_interp_destroy ()
from /usr/lib/apache2/modules/mod_perl.so
#6 0x00007fdaf86a6715 in modperl_tipool_destroy ()
from /usr/lib/apache2/modules/mod_perl.so
#7 0x00007fdaf86a62b2 in modperl_interp_pool_destroy ()
from /usr/lib/apache2/modules/mod_perl.so
#8 0x00007fdaf98fd4e3 in ?? () from /usr/lib/libapr-1.so.0
#9 0x00007fdaf98fc3b1 in apr_pool_destroy () from /usr/lib/libapr-1.so.0
#10 0x00007fdaf98fc27f in apr_pool_clear () from /usr/lib/libapr-1.so.0
#11 0x00007fdafa1b960d in main (argc=11, argv=0x7fff93b50ef8)
at /build/buildd/apache2-2.2.16/server/main.c:692

Apache is segfaulting immediately on startup, before even writing
to the log files. Now, in my code I don't use Class::XSAccessor.

I'm pointing at Class::XSAccessor since it's my only hint.
Seems to me that DBIx::Class uses Class::XSAccessor through
Class::Accessor::Grouped. That's the only use of Class::XSAccessor
I could find in my perl directories.

Next thing I'm going to try is to selectively remove bits from
my startup.pl to pinpoint areas of the code that might
lead to this segfault.

In the meantime, does thing ring a bell?

--
Cosimo

Re: DBI 1.61{1,6} + DBD::mysql 4.01{6,8} = segfault on Ubuntu 10.10amd64? (reprise)

am 08.02.2011 08:11:09 von Michael Lackhoff

Am 08.02.2011 00:58, schrieb Cosimo Streppone:
> Hi all,
>
> Apache is segfaulting immediately on startup, before even writing
> to the log files. Now, in my code I don't use Class::XSAccessor.
>
> I'm pointing at Class::XSAccessor since it's my only hint.
> Seems to me that DBIx::Class uses Class::XSAccessor through
> Class::Accessor::Grouped. That's the only use of Class::XSAccessor
> I could find in my perl directories.
>
> Next thing I'm going to try is to selectively remove bits from
> my startup.pl to pinpoint areas of the code that might
> lead to this segfault.
>
> In the meantime, does thing ring a bell?

It does ring a bell though I also didn't find a solution short of not
using Class::XSAccessor in my app.
I had the problem with Windows but -- if my memory serves me right -- it
did work in Ubuntu (prefork MPM). Since I need it to run on both I still
had to remove it.

Sorry if this is not much help

-Michael

Re: DBI 1.61{1,6} + DBD::mysql 4.01{6,8} = segfault on Ubuntu 10.10amd64? (reprise)

am 08.02.2011 16:32:02 von Perrin Harkins

Hi,

> I'm pointing at Class::XSAccessor since it's my only hint.
> Seems to me that DBIx::Class uses Class::XSAccessor through
> Class::Accessor::Grouped. That's the only use of Class::XSAccessor
> I could find in my perl directories.

The first thing I'd suggest is making sure you have the latest
version. There's some stuff about recent fixes for segfaults in the
changes file.

> Next thing I'm going to try is to selectively remove bits from
> my startup.pl to pinpoint areas of the code that might
> lead to this segfault.

Not a bad idea, but you also could remove Class::XSAccessor
completely. The DBIx::Class docs say it's optional.

- Perrin

Re: DBI 1.61{1,6} + DBD::mysql 4.01{6,8} = segfault on Ubuntu10.10 amd64? (reprise)

am 09.02.2011 05:53:49 von Cosimo Streppone

On Tue, Feb 08, 2011 at 10:32:02AM -0500, Perrin Harkins wrote:

> > I'm pointing at Class::XSAccessor since it's my only hint.
> > Seems to me that DBIx::Class uses Class::XSAccessor through
> > Class::Accessor::Grouped. That's the only use of Class::XSAccessor
> > I could find in my perl directories.
>
> The first thing I'd suggest is making sure you have the latest
> version. There's some stuff about recent fixes for segfaults in the
> changes file.

Confirmed. Class::XSAccessor 0.11 (latest CPAN version atm) fixes my
segfault problems.

Thanks Perrin,

--
Cosimo