WilliamHaynes has asked for the wisdom of the Perl Monks concerning the following question:

have 1 application that is getting this error at random times panic: attempt to copy freed scalar I've review the code extensively and cannot isolate the problem. this happens on debian with perl v5.10.0 cannot reproduce on debian with perl v5.8.8 can you help? ...bill

Replies are listed 'Best First'.
Re: 10.0 panic:
by FunkyMonk (Bishop) on Jun 20, 2010 at 00:05 UTC
    This is a still open previously reported bug and isn't fixed with perl v5.12.1:
    $ /usr/local/bin/perl -v This is perl 5, version 12, subversion 1 (v5.12.1) built for x86_64-li +nux-ld

    $ /usr/local/bin/perl -e '@ARGV = qw(foo); foo(@ARGV); sub foo { my $x = shift(@ARGV); my $y = shift; }' panic: attempt to copy freed scalar 13280e0 to 133a630 at -e line 5.

    I don't have a 5.13 handy to test with and it's too late to build one :(

    update:

    Of course, it could be an entirely different problem. It would be helpful if you could provide a minimal example of your program that exhibits the same panic.

Re: 10.0 panic:
by ikegami (Patriarch) on Jun 19, 2010 at 22:52 UTC

    That would be the result of a bug in Perl itself or a bug in an XS module. (Specifically what, I don't know, but I could try to find out.) Do you get the error with 5.10.1 or better yet 5.12.1?

    Using a debug build and gdb should help you determine which scalar is problematic. valgrind should also be useful with this kind of problem.

      this is what I think too but can "prove" it my ISP DreamHosts is taking "hands off" when it comes to code. I will talk to them about upgrading to 5.10.1 or 5.12.1. thank you bill
        Or just install Perl into your home directory.
Re: 10.0 panic:
by Khen1950fx (Canon) on Jun 19, 2010 at 23:05 UTC
    I couldn't replicate the error, but I found this from p5p. Evidently, the bug has been around for awhile.
Re: 10.0 panic:
by FunkyMonk (Bishop) on Jun 20, 2010 at 12:30 UTC
    Further digging reveals...
    • The bug is still present in blead, which is currently very nearly 5.13.2
    • It first appeared between 5.8.8 and 5.8.9