Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

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 ( #1008600=note: print w/ replies, xml ) Need Help??


in reply to Re^2: 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().

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        


Comment on Re^3: Request help for work around for bug in perl 5.10.1 (leaks)
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (13)
As of 2015-07-07 13:51 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (88 votes), past polls