You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@perl.apache.org by "Philippe M. Chiasson" <go...@ectoplasm.org> on 2004/10/08 19:41:58 UTC

[Patch mp2] Use Devel::GDB to auto backtrace core dumps in t/* in t/REPORT

Happened onto the cute Devel::GDB module and quickly wiped out a patch 
to make
t/REPORT attempt to automatically generate back traces for core files it 
finds in t/

Any interest in this ?



Re: [Patch mp2] Use Devel::GDB to auto backtrace core dumps in t/* in t/REPORT

Posted by Geoffrey Young <ge...@modperlcookbook.org>.
>> Great! +1
> 
> 
> I'll hold onto this patch until Geoff is done with the next A-T release.

I expect to release A-T 1.14 tomorrow morning, so you should be clear as
soon as you get into the office :)

--Geoff

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org


Re: [Patch mp2] Use Devel::GDB to auto backtrace core dumps in t/* in t/REPORT

Posted by Stas Bekman <st...@stason.org>.
Philippe M. Chiasson wrote:
[...]
>> Also one day we may switch to Module::Build which I believe supports 
>> this feature.
> 
> 
> That certainly would be nice, but a significant effort on our part ;-)

Certainly not before mp2.0.0 is out :)

-- 
__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org


Re: [Patch mp2] Use Devel::GDB to auto backtrace core dumps in t/* in t/REPORT

Posted by "Philippe M. Chiasson" <go...@ectoplasm.org>.

Stas Bekman wrote:
> Philippe M. Chiasson wrote:
> 
>>
>>Stas Bekman wrote:
>>
>>
>>>Philippe M. Chiasson wrote:
>>>
>>>
>>>>Happened onto the cute Devel::GDB module and quickly wiped out a 
>>>>patch to make
>>>>t/REPORT attempt to automatically generate back traces for core files 
>>>>it finds in t/
>>>>
>>>>Any interest in this ?
>>>
>>>
>>>
>>>Excellent!
>>>
>>>Though I doubt that anybody will have this optional module installed. 
>>>I wish we could find a good way to suggest all the optional modules 
>>>one wants to install (there are quite a few needed to have 'make test' 
>>>not skip some tests).
>>
>>
>>Yeah, too bad ExtUtils::MakeMaker doesn't have an 'optionnal requirements'
>>section like Module::Build 'recommends' option.
>>
>>We could always write our own, and list a bunch of 'suggested' modules one
>>might want to consider installing, 'LWP' comes to mind as a first 
>>candidate.
> 
> 
> Yup!
> 
> Also one day we may switch to Module::Build which I believe supports this 
> feature.

That certainly would be nice, but a significant effort on our part ;-)

> 
>>>BTW, there is also http://search.cpan.org/dist/Debug-FaultAutoBT/ but 
>>>it has some problems sometimes :) But I don't think we need it, since 
>>>normally we get the core dumped (with the exception to some OSes)
>>>
>>>but please drop the spaces in the core_dump code. Thanks...
>>
>>
>>Will do. And the thread gdb commands also work fine with non-threaded 
>>dumps,
>>just sees one thread.
> 
> 
> Great! +1

I'll hold onto this patch until Geoff is done with the next A-T release.


-- 
--------------------------------------------------------------------------------
Philippe M. Chiasson m/gozer\@(apache|cpan|ectoplasm)\.org/ GPG KeyID : 88C3A5A5
http://gozer.ectoplasm.org/     F9BF E0C2 480E 7680 1AE5 3631 CB32 A107 88C3A5A5

Re: [Patch mp2] Use Devel::GDB to auto backtrace core dumps in t/* in t/REPORT

Posted by Stas Bekman <st...@stason.org>.
Philippe M. Chiasson wrote:
> 
> 
> Stas Bekman wrote:
> 
>> Philippe M. Chiasson wrote:
>>
>>> Happened onto the cute Devel::GDB module and quickly wiped out a 
>>> patch to make
>>> t/REPORT attempt to automatically generate back traces for core files 
>>> it finds in t/
>>>
>>> Any interest in this ?
>>
>>
>>
>> Excellent!
>>
>> Though I doubt that anybody will have this optional module installed. 
>> I wish we could find a good way to suggest all the optional modules 
>> one wants to install (there are quite a few needed to have 'make test' 
>> not skip some tests).
> 
> 
> Yeah, too bad ExtUtils::MakeMaker doesn't have an 'optionnal requirements'
> section like Module::Build 'recommends' option.
> 
> We could always write our own, and list a bunch of 'suggested' modules one
> might want to consider installing, 'LWP' comes to mind as a first 
> candidate.

Yup!

Also one day we may switch to Module::Build which I believe supports this 
feature.

>> BTW, there is also http://search.cpan.org/dist/Debug-FaultAutoBT/ but 
>> it has some problems sometimes :) But I don't think we need it, since 
>> normally we get the core dumped (with the exception to some OSes)
>>
>> but please drop the spaces in the core_dump code. Thanks...
> 
> 
> Will do. And the thread gdb commands also work fine with non-threaded 
> dumps,
> just sees one thread.

Great! +1

-- 
__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org


Re: [Patch mp2] Use Devel::GDB to auto backtrace core dumps in t/* in t/REPORT

Posted by "Philippe M. Chiasson" <go...@ectoplasm.org>.

Stas Bekman wrote:
> Philippe M. Chiasson wrote:
> 
>>Happened onto the cute Devel::GDB module and quickly wiped out a patch 
>>to make
>>t/REPORT attempt to automatically generate back traces for core files it 
>>finds in t/
>>
>>Any interest in this ?
> 
> 
> Excellent!
> 
> Though I doubt that anybody will have this optional module installed. I 
> wish we could find a good way to suggest all the optional modules one 
> wants to install (there are quite a few needed to have 'make test' not 
> skip some tests).

Yeah, too bad ExtUtils::MakeMaker doesn't have an 'optionnal requirements'
section like Module::Build 'recommends' option.

We could always write our own, and list a bunch of 'suggested' modules one
might want to consider installing, 'LWP' comes to mind as a first candidate.

> BTW, there is also http://search.cpan.org/dist/Debug-FaultAutoBT/ but it 
> has some problems sometimes :) But I don't think we need it, since 
> normally we get the core dumped (with the exception to some OSes)
> 
> but please drop the spaces in the core_dump code. Thanks...

Will do. And the thread gdb commands also work fine with non-threaded dumps,
just sees one thread.


-- 
--------------------------------------------------------------------------------
Philippe M. Chiasson m/gozer\@(apache|cpan|ectoplasm)\.org/ GPG KeyID : 88C3A5A5
http://gozer.ectoplasm.org/     F9BF E0C2 480E 7680 1AE5 3631 CB32 A107 88C3A5A5

Re: [Patch mp2] Use Devel::GDB to auto backtrace core dumps in t/* in t/REPORT

Posted by Stas Bekman <st...@stason.org>.
Philippe M. Chiasson wrote:
> Happened onto the cute Devel::GDB module and quickly wiped out a patch 
> to make
> t/REPORT attempt to automatically generate back traces for core files it 
> finds in t/
> 
> Any interest in this ?

Excellent!

Though I doubt that anybody will have this optional module installed. I 
wish we could find a good way to suggest all the optional modules one 
wants to install (there are quite a few needed to have 'make test' not 
skip some tests).

BTW, there is also http://search.cpan.org/dist/Debug-FaultAutoBT/ but it 
has some problems sometimes :) But I don't think we need it, since 
normally we get the core dumped (with the exception to some OSes)

but please drop the spaces in the core_dump code. Thanks...

> +sub core_dump {
> +    my $self = shift;
> +    
^^^^^^^^
and below
> +    $core_dump = "";
> +    
> +    if ( eval { require Devel::GDB } ) {
> +        find(\&dump_core_file, 't')
> +    }
> +    
> +    $core_dump ||= '[CORE TRACE COMES HERE]';
> +    

I've tested that only with threaded, will the below work with prefork too? 
I mean all the threads stuff in gdb commands?

 > +    $core_dump .= join '',
 > +           $gdb->get("file $httpd"),
 > +           $gdb->get('sharedlibrary'),
 > +           $gdb->get("core $core"),
 > +           $gdb->get('info threads'),
 > +           $gdb->get('thread apply all bt');
 > +}


-- 
__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org