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.
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.
Re:Heh
jk2addict on 2007-08-10T13:49:41
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 would solve the problem as well. Duh.