Your skill will accomplish
what the force of many cannot
Re^3: Stupid question (heisenbugs)by tye (Sage)
|on May 19, 2011 at 16:47 UTC||Need Help??|
Yes, those kind of errors are where any random change can prevent / postpone the error. For example, running under the Perl debugger is frequently one way to make the error go away. This can be a convenient way to get the stack trace and it can be very inconvenient in preventing you from being able to use the debugger to get more information. I've also often seen turning up trace or adding "debug prints" make such bugs no longer reproduce.
But such voodoo changes usually just postpone the problem for a while.
I'm glad you got the call stack and were able to use that to debug the problem that was causing Carp to be called. But if I were in your shoes, then I would be worried of other things eventually causing more "bizarre copy" panics.
In such cases, I usually look for a minor Perl upgrade, upgrades for XS-using modules, or elimination of the use of some XS-using modules.
Also, these bugs are much more likely in an environment like a Perl daemon or like mod_perl where you have an interpreter instance that runs for quite a long time doing tons of things. Re-spawning the daemon periodically or configuring mod_perl to restart children a bit more often can reduce the frequency of such bugs appearing.