Re: How to debug bizarre memory corruption in mod_perl

2008-07-11 Thread David Kaufman
Hi Mark, "Mark Hedges" <[EMAIL PROTECTED]> wrote: > > David Kaufman wrote: > >> my $foo = 'bar' if $baz; >> >> I wish it would still DWIM, and by that I mean the compiler should >> detect >> my declaration + assignment + conditional and rewrite it for me as what >> I >> meant which was simply:

Re: How to debug bizarre memory corruption in mod_perl

2008-07-10 Thread Andy Armstrong
On 10 Jul 2008, at 17:23, David Kaufman wrote: I've already (finally) unlearned to do that, but I agree with Andy that the cost of people's ignorance (especially doing something that's worked as expected for so long) shouln't cause "rampant memory corruption". It should maybe DWIM or die or

Re: How to debug bizarre memory corruption in mod_perl

2008-07-10 Thread Mark Hedges
On Thu, 10 Jul 2008, David Kaufman wrote: > > my $foo = 'bar' if $baz; > > I wish it would still DWIM, and by that I mean the compiler should detect > my declaration + assignment + conditional and rewrite it for me as what I > meant which was simply: > > my $foo = $baz ? 'bar' : undef; > I d

Re: How to debug bizarre memory corruption in mod_perl

2008-07-10 Thread David Kaufman
Hi Stephen, "Stephen Clouse" <[EMAIL PROTECTED]> wrote ... > ...I did manage to figure out the issue today. You may or may not be > surprised to find it was this: > > my $foo = "bar" if $baz; Yikes! My bad :-) It must've been a different scary memory error that I encountered with List::Util.

Re: How to debug bizarre memory corruption in mod_perl

2008-07-10 Thread Andy Armstrong
On 10 Jul 2008, at 05:05, Perrin Harkins wrote: It's interesting that this didn't manifest under Perl 5.8. And a little scary, since some people definitely have this bug and the warning for it in 5.10 was removed before release. Yeah, I'm thinking this thread should migrate to p5p for that r

Re: How to debug bizarre memory corruption in mod_perl

2008-07-09 Thread Stephen Clouse
On Wed, Jul 9, 2008 at 11:05 PM, Perrin Harkins <[EMAIL PROTECTED]> wrote: > I'm thrilled to hear that this ultimately was valuable because I > suggested that policy. It would be great if you'd share your hack to > make Critic work on Mason code somewhere. Oh, yeah, sure. Here's my test script

Re: How to debug bizarre memory corruption in mod_perl

2008-07-09 Thread Perrin Harkins
On Wed, Jul 9, 2008 at 9:23 PM, Stephen Clouse <[EMAIL PROTECTED]> wrote: > We had Perl::Critic for the Perl side of the app, and I've done some hacks > to criticize the Mason code, but someone had disabled the > ProhibitConditionalDeclarations policy. I'm thrilled to hear that this ultimately was

Re: How to debug bizarre memory corruption in mod_perl

2008-07-09 Thread Stephen Clouse
Well, thank you for your advice, gentlemen. It got me on the right track, and I did manage to figure out the issue today. You may or may not be surprised to find it was this: my $foo = "bar" if $baz; Apparently one of the previous programmers left about 100 such constructs littered about the Pe

Re: How to debug bizarre memory corruption in mod_perl

2008-07-09 Thread Frank Wiles
On Wed, 9 Jul 2008 13:23:13 +0100 Andy Armstrong <[EMAIL PROTECTED]> wrote: > On 9 Jul 2008, at 09:09, David Kaufman wrote: > > # from the POD doco at > > # > > http://search.cpan.org/~gbarr/Scalar-List-Utils-1.19/lib/List/Util.pm#DESCRIPTION > > > > $foo = first { defined($_) } @list; # first

Re: How to debug bizarre memory corruption in mod_perl

2008-07-09 Thread Andy Armstrong
On 9 Jul 2008, at 09:09, David Kaufman wrote: # from the POD doco at # http://search.cpan.org/~gbarr/Scalar-List-Utils-1.19/lib/List/Util.pm#DESCRIPTION $foo = first { defined($_) } @list; # first defined value in @list Who needs to install a CPAN module to do that? I personally would h

Re: How to debug bizarre memory corruption in mod_perl

2008-07-09 Thread David Kaufman
"Stephen Clouse" <[EMAIL PROTECTED]> wrote: > Under [mod_perl 2 and perl 5.10 on Fedora 9] I am getting some of the > most bizarre and insidious perl core errors I've ever seen in my 15 > years of using perl. > > Attempt to free unreferenced scalar: SV 0xbd266be4, Perl interpreter: > 0xba01c410 at

Re: How to debug bizarre memory corruption in mod_perl

2008-07-08 Thread Perrin Harkins
On Tue, Jul 8, 2008 at 2:28 PM, Stephen Clouse <[EMAIL PROTECTED]> wrote: >> You >> might try reverting to Perl 5.8 or mod_perl 1.3 to determine what is >> causing the problem. > > Fedora currently ships with mod_perl 2.0 and perl 5.10. No good way to > revert there :) I don't use vendor packages

Re: How to debug bizarre memory corruption in mod_perl

2008-07-08 Thread Fred Moyer
Stephen Clouse wrote: I will preface this message with this: this is not a mod_perl bug or problem, but it involves a mod_perl application, so this is probably a good place to get advice from experienced mod_perl users/developers. I have an application that ran on mod_perl 1.3 and perl 5.8 for

Re: How to debug bizarre memory corruption in mod_perl

2008-07-08 Thread Stephen Clouse
On Tue, Jul 8, 2008 at 1:04 PM, Perrin Harkins <[EMAIL PROTECTED]> wrote: > Are you running prefork, or threaded? prefork. It's a stock Fedora 9 Apache/mod_perl. > Did you change anything else? Other than installing my app, no. > The kind of problems you're seeing usually come from bad XS

Re: How to debug bizarre memory corruption in mod_perl

2008-07-08 Thread Perrin Harkins
On Tue, Jul 8, 2008 at 1:23 PM, Stephen Clouse <[EMAIL PROTECTED]> wrote: > I have an application that ran on mod_perl 1.3 and perl 5.8 for a long time, > that I recently ported over to a Fedora 9 box, thus moving it to mod_perl > 2.0 and perl 5.10. Are you running prefork, or threaded? Did you c

Re: How to debug bizarre memory corruption in mod_perl

2008-07-08 Thread Frank Wiles
On Tue, 8 Jul 2008 12:23:35 -0500 "Stephen Clouse" <[EMAIL PROTECTED]> wrote: > My problem is that I don't even know where or how to start tracing or > debugging such an issue to determine precisely what is scribbling on > perl's memory. If this was a standalone app, it would be simple > enough t

How to debug bizarre memory corruption in mod_perl

2008-07-08 Thread Stephen Clouse
I will preface this message with this: this is not a mod_perl bug or problem, but it involves a mod_perl application, so this is probably a good place to get advice from experienced mod_perl users/developers. I have an application that ran on mod_perl 1.3 and perl 5.8 for a long time, that I recen