Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Bizarre copy of ARRAY in sassign at /usr/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi/Apache/perl5db.pl line 3731

by PerlOnTheWay (Scribe)
on Aug 22, 2011 at 11:58 UTC ( #921631=perlquestion: print w/ replies, xml ) Need Help??
PerlOnTheWay has asked for the wisdom of the Perl Monks concerning the following question:

It can't be reproduced easily,as it's running a huge lot of stuff before this problem occurs(but it happens each time at this point)

Anyone else has ever met this kind of problem while debugging with Apache::DB?

0 J::Exception=HASH(0x7f268ece7d40) 'frames' => ARRAY(0x7f268ece7e00) 0 Devel::StackTraceFrame=HASH(0x7f268914fb80) 'args' => ARRAY(0x7f268914f420) 0 'Bizarre copy of ARRAY in sassign at /usr/lib64/perl5/s +ite_perl/5.8.8/x86_64-linux-thread-multi/Apache/perl5db.pl line 3731 ' 'bitmask' => "UUUUUUUUUUUUUU\cA" 'evaltext' => undef 'filename' => '/*****/lib/J/Home/Element/Base.pm' 'hasargs' => 1 'hints' => 2 'is_require' => undef 'line' => 36 'package' => 'J::Home::Element::Base' 'respect_overload' => 1 'subroutine' => 'Carp::croak' 'wantarray' => undef 1 Devel::StackTraceFrame=HASH(0x7f268914f040) 'args' => ARRAY(0x7f268914f6c0) 0 'J::Home::Element::Ad::AudienceScience=HASH(0x7f268ecd1 +b70)' 1 'J::Template::_user::pc=HASH(0x7f268e06fb30)' 'bitmask' => "UUUUUUUUUUUUUU\cA" 'evaltext' => undef 'filename' => '/*****/lib/J/Home/Controller.pm' 'hasargs' => 1 'hints' => 2 'is_require' => undef 'line' => 220 'package' => 'J::Home::Controller' 'respect_overload' => 1 'subroutine' => 'J::Home::Element::Base::try_render' 'wantarray' => undef 2 Devel::StackTraceFrame=HASH(0x7f268914fbb0) 'args' => ARRAY(0x7f268914fe20) 0 'J::Home::Controller' 'bitmask' => "UUUUUUUUUUUUUU\cA" 'evaltext' => undef 'filename' => '/*****/home.pl' 'hasargs' => 1 'hints' => 2 'is_require' => undef 'line' => 5 'package' => 'ModPerl::ROOT::ModPerl::Registry::*****_home +_2epl' 'respect_overload' => 1 'subroutine' => 'J::Pages::display' 'wantarray' => undef 'message' => 'Bizarre copy of ARRAY in sassign' 'with_pages' => 1

Comment on Bizarre copy of ARRAY in sassign at /usr/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi/Apache/perl5db.pl line 3731
Select or Download Code
Re: Bizarre copy of ARRAY in sassign at /usr/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi/Apache/perl5db.pl line 3731
by dave_the_m (Parson) on Aug 22, 2011 at 15:13 UTC
    You normally get this sort of error if you're printing a stack backtrack including function args, and one one of the args has been freed and since re-allocated (this can happen because the perl stack isn't reference counted, which is a long-standing bug).

    So something like the following (which doesn't reproduce the error in this case, but gives you an idea of what can happen):

    use Carp; @a = (1,2); foo(@a); sub foo { @a = (); Carp::cluck(); }
    Dave.
      Is there any work around to this kind of issue?
        is there any work around to this kind of issue?
        Well in general terms, avoid freeing anything that's still in use as a function argument, or avoid dumping function arguments on error.

        Dave.

Re: Bizarre copy of ARRAY in sassign at /usr/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi/Apache/perl5db.pl line 3731
by ikegami (Pope) on Aug 22, 2011 at 17:28 UTC
    I believe it also happens if an AV (array) is put on the stack. This would be caused by a bug in Perl or in an XS module.

      It turns out to be caused by Net::IP::Match::XS::match_ip

      Is it a known issue that this module is not compatible with Apache::DB?

      update

      I was wrong,it still happens after I comment that line out, looks like a wild pointer problem in C,is there any wat to diagnose this issue?

      update2

      Looks like it's in-compatible with Apache2::RequestUtil->request

Re: Bizarre copy of ARRAY in sassign at /usr/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi/Apache/perl5db.pl line 3731
by Sewi (Friar) on Nov 12, 2011 at 11:06 UTC

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://921631]
Approved by Corion
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (7)
As of 2014-07-11 23:33 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    When choosing user names for websites, I prefer to use:








    Results (236 votes), past polls