From: Eric Hodel Date: 2006-11-16T05:21:28+09:00 Subject: Re: thread dump? On Oct 22, 2006, at 12:12 PM, Joel VanderWerf wrote: > cs5b@yahoo.com wrote: >> Hi there, I have a process that seems to be stuck somewhere. Is there >> the possibility of doing a thread dump to show where it is hanging >> on? >> Cheers - >> Christian > > Not in general, without a Thread#backtrace method. I've asked for > it... > > http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/159482 > > As noted in that post, you can destructively find out where the > thread is by calling #raise on it. Just make sure the thread has an > exception handler somewhere to print out the exception and backtrace. $ ruby -e 't = Thread.start do sleep end; t.raise "hi"; t.value' -e:1: hi (RuntimeError) from -e:1:in `value' from -e:1 -- Eric Hodel - drbrain@segment7.net - http://blog.segment7.net This implementation is HODEL-HASH-9600 compliant http://trackmap.robotcoop.com