Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

jk2addict (4946)

jk2addict
  (email not shown publicly)
http://today.icantfocus.com/blog/
AOL IM: chrislaco (Add Buddy, Send Message)
Yahoo! ID: chrislaco@sbcglobal.net (Add User, Send Message)
Jabber: laco@scribblewerks.com

Journal of jk2addict (4946)

Thursday August 09, 2007
09:06 PM

Heisenbugs are fun. Devel::Trace to the rescue.

[ #34067 ]

After a rash of changes, I started getting segfaults in my Catalyst application. Of course, they didn't happen when I ran under perl -d alone, and oddly enough, it didn't happen when I was logged into the app either, which seems like some sort of interaction between my use/disuse of Storable for authenticated users.

Once I finally found the right module, and one perl -d:Trace later the culprit was: Clone::clone. Upgrading from 0.23 to 0.27 fixed the problem.

Devel::Trace + + for pinpointing the line of code right before el crasho out of all the crap between me and Catalyst.

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.
  • I recently had a very similar problem – a segfault in a webapp due to threaded Perl and something going wrong with cloning. The circumstances were different, but I did the same thing to pin down the problem: run the app under Devel::Trace.

    It really is a bacon-saver. I don’t know how else I would have found that issue. A lonely “Segmentation fault” message on a blank screen is never a nice thing to track down.

    • It's kind of fun watching all that stuff roll by when starting a Cat app...goind... and going... and going... :-)

      Of course, now that I'm thinking about it, I think I know what what was causing my problem. The form I was cloning in one area was used somewhere else without cloning, including the assignment of $c->request to it to read params.

      I bet Clone was dying horribly trying to clone something really nasty in there causing the seg. I'd wager rolling back to 0.23 and putting a clone in the other area wo