Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change

Bizarre copy of ARRAY in sassign at /usr/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi/Apache/ 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/ line 3731 ' 'bitmask' => "UUUUUUUUUUUUUU\cA" 'evaltext' => undef 'filename' => '/*****/lib/J/Home/Element/' '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/' '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' => '/*****/' '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/ line 3731
  • Select or Download Code

Replies are listed 'Best First'.
Re: Bizarre copy of ARRAY in sassign at /usr/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi/Apache/ line 3731
by dave_the_m (Prior) 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(); }
      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.


Re: Bizarre copy of ARRAY in sassign at /usr/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi/Apache/ 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?


      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?


      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/ line 3731
by Sewi (Friar) on Nov 12, 2011 at 11:06 UTC

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://921631]
Approved by Corion
[choroba]: ad readdir: 5.12 needed
[marioroy]: CORE::wait can block if another process reaps a worker from another class. MCE::Hobo takes care of that and transparently.
[Discipulus]: thanks choroba i'll update my answer
[Lady_Aleena]: Hello Discipulus, Corion, choroba, and marioroy...
[Corion]: Hi Lady_Aleena!
[Lady_Aleena]: marioroy, are you also writing a Meditation for this?
choroba o/
Discipulus adds tozzetti alle mandorle to the platter on the sideboard.
Lady_Aleena was checking #cbstream and saw the big announcement.
[marioroy]: Tie::IxHash can be shared. Also similar modules. I cannot wait to post a solution sharing Tie::File and iterating among workers.

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (10)
As of 2017-05-26 08:48 GMT
Find Nodes?
    Voting Booth?