Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re^2: Request help for work around for bug in perl 5.10.1 (weak magic)

by dave_the_m (Parson)
on Dec 12, 2012 at 21:21 UTC ( #1008590=note: print w/ replies, xml ) Need Help??


in reply to Re: Request help for work around for bug in perl 5.10.1 (weak magic)
in thread [Solved] Request help for work around for bug in perl 5.10.1

That assert also appears in sv_clear(). But as you say, truncating the error message is annoying. Normally an assert tells us the C source file and line number of the error.

Dave.


Comment on Re^2: Request help for work around for bug in perl 5.10.1 (weak magic)
Re^3: Request help for work around for bug in perl 5.10.1 (leaks)
by tye (Cardinal) on Dec 12, 2012 at 22:27 UTC
    That assert also appears in sv_clear().

    Indeed! In fact, that assertion is likely the culprit. I previously missed that line from my "git grep SVTYPEMASK perl-5.10.1" output.

    But now I realize that the assertion that I pointed out can't be the one that is to blame because it uses "!(...==...)" which might well get changed by the optimizer into "...!=..." but such an optimization would not impact the string that the C preprocessor produces and that gets included in the error message.

    So the "weak ref" stuff was a red herring.

    So this bug is a little more mundane. We have a scalar with a ref count of 0 that has been freed that is trying to be cleared again. Eliminating XS modules (or up- or down-grading them) can still be useful, but is not as likely to matter as with the more mysterious scenario of a rogue weak ref being destroyed, IME.

    The smell of this bug is becoming more similar to "subtle bugs in Perl that only seem to appear in long-running Perl daemons". So the bug might stop happening if the daemon can be made to run something like:

    exec( $^X, $0, @ARGV ); die "Couldn't exec self: $!";

    Every so often (like once per day).

    Update: Use of "threads" still seems plausible as a major contributing factor.

    - tye        

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (6)
As of 2014-10-21 00:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    For retirement, I am banking on:










    Results (94 votes), past polls