Evan Weaver wrote:
> Oh, I meant a Ruby backtrace:

I believe I've blown this opportunity. I got my gdb environment set up 
as described in the article, attached to the process, and did 
"rb_backtrace". All I got out of it was "[Switching to Thread 
-1211282784 (LWP 31635)] $1 = 32".

Then I noticed the article says something about redirecting stdout. I 
issued that command and then did the backtrace again, but the only thing 
I got that time was "$3 = 32".

In an effort to make sure the ruby debugging commands were working 
properly, I tried one of the "easier" ones:

(gdb) rb_object_counts

Program received signal SIGSEGV, Segmentation fault.
0xb7eff6fe in st_lookup () from /usr/lib/libruby1.8.so.1.8

When I exited gdb, the hung mongrel had died.

So it seems that any meaningful output was lost because I failed to 
redirect stdout first...? I checked the log files (where I'd expect 
stdout to go if it weren't redirected), and there is no additional 
information there either.

Please correct me if I'm wrong, but the next chance I get, it seems the 
proper sequence of commands goes:

gdb ruby PID_of_bad_mongrel
(gdb) session-ruby
(gdb) redirect_stdout
(gdb) rb_backtrace

Thanks.
-- 
Posted via http://www.ruby-forum.com/.
_______________________________________________
Mongrel-users mailing list
Mongrel-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/mongrel-users

Reply via email to