Perl 5.8.8 has some problems which may be affecting you.
Please try the (very latest) trunk:
http://code.google.com/p/perl-devel-nytprof/source/checkout
and set the NYTPROF env var to xsfile=0
> But when I try to generate a HTML-report using one of the output
> files, I get an error:
>
> [root@bongo ~]# nytprofhtml -f /tmp/nytprof.32260.out.32262
> Generating report...
> Segmentation fault
It would be a big help if you could get a stack trace from that core dump.
Tim.
That wouldn't work because it happens too late. The env var must be set
when NYTProf is loaded.
> > > [root@bongo ~]# nytprofhtml -f /tmp/nytprof.32260.out.32262
> > > Generating report...
> > > Segmentation fault
> >
> > It would be a big help if you could get a stack trace from that core dump.
>
> I have made a core dump and looked at it using gdb:
>
> Core was generated by `perl /usr/bin/nytprofhtml -f /tmp/nytprof.
> 22665.out.22667'.
> Program terminated with signal 11, Segmentation fault.
> #0 0x0067781c in read_str (my_perl=0x9846008, sv=0x9bf0a14) at NYTProf.xs:866
> 866 buf = SvPV_nolen(sv);
> (gdb) bt
> #0 0x0067781c in read_str (my_perl=0x9846008, sv=0x9bf0a14) at NYTProf.xs:866
> #1 0x006783a6 in XS_Devel__NYTProf__Data_load_profile_data_from_file (my_perl=0x9846008, cv=0x996653c) at NYTProf.xs:2606
The read_str (my_perl=0x9846008, sv=0x9bf0a14) is puzzling because
the code at NYTProf.xs:2606 is read_str(aTHX_ NULL);
So the sv arg should be NULL. Perhaps it's shown not NULL in the stack
trace because it's been set when the core is dumped.
Please add
warn("read_str len %d sv %p", len sv);
near the top of read_str() and let us know what the last value printed
before the core dump is.
(How big is the nytprof .out file? Perhaps I could get a copy.)
> (gdb) print * sv
> $1 = {sv_any = 0x0, sv_refcnt = 1, sv_flags = 67371008}
Ah, I think I have a fix for this. Try the latest trunk.
Tim.
You're welcome, but you're not off the hook yet! :)
I still need your help to find the cause of the reader seg fault.
So this still applies:
> > > Core was generated by `perl /usr/bin/nytprofhtml -f /tmp/nytprof.
> > > 22665.out.22667'.
> > > Program terminated with signal 11, Segmentation fault.
> > > #0 0x0067781c in read_str (my_perl=0x9846008, sv=0x9bf0a14) at NYTProf.xs:866
> > > 866 buf = SvPV_nolen(sv);
> > > (gdb) bt
> > > #0 0x0067781c in read_str (my_perl=0x9846008, sv=0x9bf0a14) at NYTProf.xs:866
> > > #1 0x006783a6 in XS_Devel__NYTProf__Data_load_profile_data_from_file (my_perl=0x9846008, cv=0x996653c) at NYTProf.xs:2606
> >
> > The read_str (my_perl=0x9846008, sv=0x9bf0a14) is puzzling because
> > the code at NYTProf.xs:2606 is read_str(aTHX_ NULL);
> > So the sv arg should be NULL. Perhaps it's shown not NULL in the stack
> > trace because it's been set when the core is dumped.
> >
> > Please add
> > warn("read_str len %d sv %p", len sv);
> > near the top of read_str() and let us know what the last value printed
> > before the core dump is.
Plus any other debugging you can think off to isolate the cause.
(How big is the nytprof .out file? Perhaps I could get a copy.)
Tim.
Tim.