Re: Apache::DProf seg faulting

2002-04-19 Thread Perrin Harkins

Paul Lindner wrote:
But while I have your attention, why are you using Apache::DB at all?  The
Apache::DProf docs just have:

  PerlModule Apache::DProf
 
 
 Legacy knowledge :)
 
 I think it may have been required in the past, or perhaps I had some
 problems with my INC paths long-long ago..  And well, it just kinda
 stuck.

I used to do it because if I didn't DProf would not know anything about 
modules I pull in from startup.pl (since the debugger was not 
initialized until after they were loaded).  This may not be necessary 
anymore.

- Perrin




Re: Apache::DProf seg faulting

2002-04-18 Thread Sam Tregar

On Wed, 17 Apr 2002, Paul Lindner wrote:

 I think that this may be a problem with the use of Perl sections.

 I believe your original post had something like this:

 Perl
   use Apache::DProf
   use Apache::DB
   Apache::DB-init();
 /Perl

Nope.  That was Perrin Harkins, but I tried it too!

 Geoffrey and I tested our environments today and the recipe given in
 the book seems to work just fine:

   PerlModule Apache::DB
   PerlModule Apache::DProf

With those lines I get a seg-fault on the first hit to the server.
Reversing the lines I can get a few hits before seg-faulting.  I doubt
it's a problem in your example - something inside Devel::DProf is
seg-faulting as far as I can tell.  I'm planning to build a debugging
Perl and see if I can get more information.

But while I have your attention, why are you using Apache::DB at all?  The
Apache::DProf docs just have:

  PerlModule Apache::DProf

-sam




Re: Apache::DProf seg faulting

2002-04-17 Thread Paul Lindner

On Tue, Apr 16, 2002 at 06:05:11PM -0400, Sam Tregar wrote:
 On Tue, 16 Apr 2002, Sam Tregar wrote:
 
   On 16 Apr 2002, Garth Winter Webb wrote:
  
Sam, try getting rid of the 'PerlModule Apache::DB' line.  I've used
Apache::DProf w/o any problems by including only the one PerlModule
line.  Since they both want to use perl debugging hooks, I'm guessing
that Apache::DProf is getting crashed up when it tries to use hooks
already grabbed by Apache::DB...
  
   Same result.  Thanks though!
 
 Aw nuts, that was the problem!  I thought I'd tried that already, but I
 guess not.  I actually got those PerlModule lines from the mod_perl
 Developers Cookbook - guess this is an errata!

I think that this may be a problem with the use of Perl sections.

I believe your original post had something like this:

Perl
  use Apache::DProf
  use Apache::DB
  Apache::DB-init();
/Perl

Geoffrey and I tested our environments today and the recipe given in
the book seems to work just fine:

  PerlModule Apache::DB
  PerlModule Apache::DProf


-- 
Paul Lindner[EMAIL PROTECTED]   | | | | |  |  |  |   |   |

mod_perl Developer's Cookbook   http://www.modperlcookbook.org/
 Human Rights Declaration   http://www.unhchr.ch/udhr/



Re: Apache::DProf seg faulting

2002-04-16 Thread Sam Tregar

On 16 Apr 2002, Garth Winter Webb wrote:

 Sam, try getting rid of the 'PerlModule Apache::DB' line.  I've used
 Apache::DProf w/o any problems by including only the one PerlModule
 line.  Since they both want to use perl debugging hooks, I'm guessing
 that Apache::DProf is getting crashed up when it tries to use hooks
 already grabbed by Apache::DB...

Same result.  Thanks though!

-sam




Re: Apache::DProf seg faulting

2002-04-16 Thread Sam Tregar

On Tue, 16 Apr 2002, Sam Tregar wrote:

 On 16 Apr 2002, Garth Winter Webb wrote:

  Sam, try getting rid of the 'PerlModule Apache::DB' line.  I've used
  Apache::DProf w/o any problems by including only the one PerlModule
  line.  Since they both want to use perl debugging hooks, I'm guessing
  that Apache::DProf is getting crashed up when it tries to use hooks
  already grabbed by Apache::DB...

 Same result.  Thanks though!

Aw nuts, that was the problem!  I thought I'd tried that already, but I
guess not.  I actually got those PerlModule lines from the mod_perl
Developers Cookbook - guess this is an errata!

Thanks!
-sam






Re: Apache::DProf seg faulting

2002-04-16 Thread Perrin Harkins

Sam Tregar wrote:
 On Tue, 16 Apr 2002, Sam Tregar wrote:
 
 
On 16 Apr 2002, Garth Winter Webb wrote:


Sam, try getting rid of the 'PerlModule Apache::DB' line.  I've used
Apache::DProf w/o any problems by including only the one PerlModule
line.  Since they both want to use perl debugging hooks, I'm guessing
that Apache::DProf is getting crashed up when it tries to use hooks
already grabbed by Apache::DB...

Same result.  Thanks though!
 
 
 Aw nuts, that was the problem!  I thought I'd tried that already, but I
 guess not.  I actually got those PerlModule lines from the mod_perl
 Developers Cookbook - guess this is an errata!

Strange, that works for me.  I do it like this:
Perl
 use Apache::DProf;
 use Apache::DB;
 Apache::DB-init;
/Perl

Or at least I did last time.  Maybe this has changed in more recent 
versions.  At the time (June 2000), I discovered I needed to call 
Apache::DB-init or else the debugging symbols would not get put in for 
modules that I used in my startup.pl, and they would not get profiled.

- Perrin




Re: Apache::DProf seg faulting

2002-04-16 Thread Sam Tregar

On Tue, 16 Apr 2002, Perrin Harkins wrote:

 Strange, that works for me.  I do it like this:
 Perl
  use Apache::DProf;
  use Apache::DB;
  Apache::DB-init;
 /Perl

That works, but this doesn't:

  Perl
   use Apache::DB;
   use Apache::DProf;
   Apache::DB-init;
  /Perl

It looks like the poison pill is loading Apache::DB before Apache::DProf.
Odd, eh?

-sam