Hi Alex.
> When I Add "PerlModule Devel::NYTProf::Apache" to my conf I get the
> below segfault:
>
> Program received signal SIGSEGV, Segmentation fault.
> 0x00007ffff3059c1c in resolve_sub_to_cv (sv=0x93800384b454552,
> subname_gv_ptr=0x7fffffffe088) at NYTProf.xs:2046
> 2046 switch (SvTYPE(sv)) {
Please do a "print *sv*" in gdb. Anything else you can find out about
the sv would be very helpful.
> #0 0x00007ffff3059c1c in resolve_sub_to_cv (sv=0x93800384b454552,
> subname_gv_ptr=0x7fffffffe088) at NYTProf.xs:2046
> #1 0x00007ffff305a37f in subr_entry_setup (prev_cop=0x7ffff4083740,
> clone_subr_entry=0x0, op_type=173, subr_sv=0x93800384b454552) at
> NYTProf.xs:2188
> #2 0x00007ffff305b243 in pp_subcall_profiler (is_slowop=0) at NYTProf.xs:2447
> #3 0x00007ffff305b056 in pp_entersub_profiler () at NYTProf.xs:2373
> #4 0x00007ffff3d9a602 in Perl_call_sv () from
> /usr/lib/perl5/core_perl/CORE/libperl.so
> #5 0x00007ffff409e24a in modperl_perl_call_list () from
> /usr/lib/httpd/modules/mod_perl.so
> #6 0x00007ffff40a7a13 in modperl_perl_destruct () from
> /usr/lib/httpd/modules/mod_perl.so
> #7 0x00007ffff40a7a82 in modperl_shutdown.2753 () from
> /usr/lib/httpd/modules/mod_perl.so
So apache is shutting down and destroying perl. Looking at the code I
see that modperl_perl_call_list is running END blocks (PL_endav).
Please also try NYTPROF=stmts=0:trace=99:log=/tmp/nytprof.log
to get a detailed log (without statement profiler noise).
Specifically that trace level 99 enables a dump of the sv that's
getting passed to subr_entry_setup and resolve_sub_to_cv.
The log will be big, but last few lines of should shed more light on
the problem.
> Ok lets try disabling some things:
> # NYTPROF="subs=0:blocks=0:stmts=0:savesrc=0" httpd
> Segmentation fault
Um. With subs=0 the resolve_sub_to_cv() shouldn't be called so I suspect
this is a different problem. Please start a new thread with a stack
dump from that case (including a perl *sv if the core dump suggests a
particular sv is the problem). The end of the log from trace level 99
may also be useful.
> OK so I thought what happens if I try start=no:
> # NYTPROF="start=no" httpd
> Undefined subroutine &main::1 called.
> END failed--call queue aborted.
Odd.
> If I take out my preloading of modules in my startup file it seems to
> work. So I tried figuring out if there was a single module that was
> bad... after much sweating (It preloads ~900 modules). I found this
> simple test case to demonstrate the problem:
> Basically I can use Archive::Zip or DBD::Pg, but not both at the same
> time :-) Any Ideas?
Given that mod_perl is in shutdown/destroy mode the underlying cause
could be only distantly related to the particular modules used.
I'd rather approach this problem from the core dump first.
On Thu, Jun 24, 2010 at 06:03:37PM -0700, [email protected] wrote:
> I found this simple test case to demonstrate the problem:
>
> Err duh... This is even simpler:
>
> PerlModule Devel::NYTProf::Apache
> PerlModule Archive::Zip
> PerlModule DBD::Pg
>
> It also crashes for me on an i686 with perl 5.10.1.
>
> Both have gcc 4.5.0; Ive hit some other oddities with that version gcc
> (err well an earlier snapshot anyway). Maybe its related?
> gcc version 4.5.0 20100610
That's fairly bleading edge. Sending us your Perl -V output would be
appreciated.
Thanks.
Tim.
--
You've received this message because you are subscribed to
the Devel::NYTProf Development User group.
Group hosted at: http://groups.google.com/group/develnytprof-dev
Project hosted at: http://perl-devel-nytprof.googlecode.com
CPAN distribution: http://search.cpan.org/dist/Devel-NYTProf
To post, email: [email protected]
To unsubscribe, email: [email protected]