Never been to CodeSnippets before?

Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world (or not, you can keep them private!)

gdb debug of mongrel rails ruby segfault (See related posts)

attach gdb to the running process of mongrel by running gdb against ruby, with the PID of mongrel as the second argument

gdb /usr/local/bin/ruby [PID]


After gdb has attached, be sure to run the "c" command to continue and allow mongrel/ruby to continue running until the segfault, whereupon you can use "whe" to get an extensive backtrace leading to the problem.

Normally coredumps are not shown in a terminal window. To enable core dumps for more information, run:
ulimit -c 512

which allows coredump's upto 512MB in size.

You need to create an account or log in to post comments to this site.