I am trying to debug a ruby program that periodically hangs when run
under jruby. It runs okay under MRI (1.8.7 and 1.9.1).
Is there a way for me to install a signal handler that prints all of the
thread callstacks and exits? This would help me pinpoint where in the
code it is hanging.
I was thinking something along the lines of this:
need to use ABRT since jruby doesn’t see a ctrl-c and I need to send
it
a kill -9 to exit
trap ‘ABRT’ do @threads.each do |thread|
# print callstack?
end
end
I’d appreciate any help in this matter. Thank you…
Is there a way for me to install a signal handler that prints all of the thread callstacks and exits? This would help me pinpoint where in the code it is hanging.
I’d appreciate any help in this matter. Thank you…
I tried to interrupt it in the shell with control-\ but it is still hung. The only way I can kill it is with a -9.
Maybe the entire interpreter is hanging. I’m kind of stuck and don’t know how to interrupt its execution and still get any relevant data.
I just tried attaching to the process using jvisualvm (this is on OSX
10.6.2 running JRuby 1.4.0 release and the 64-bit JVM).
Jvisualvm was unable to attach so I couldn’t do a thread dump or heap
dump. Something is getting majorly hosed here…
Running my code against 1.5.0-dev (head) never hangs. However, I do run
into that #map bug that I’ve written about in another thread. I now have
a little workaround for that so I can successfully run my code against
head.
Running my code against 1.5.0-dev (head) never hangs. However, I do run
into
that #map bug that I’ve written about in another thread. I now have a
little
workaround for that so I can successfully run my code against head.
This is a clone of ruby-prof for JRuby. It supports all the usual output
modes, plus a call tree output mode. The only measure mode it currently
supports is wall time.
*** NB. This is really new code. It probably has lots of bugs and
things. ***
Hot diggity! Finally a nice Ruby-land profiler for JRuby!
If this looks good to everyone, it might be a nice one to
pre-install…or not? Maybe we can just leave it as a gem in the wild
and people can install it if they want to?
On Mar 15, 2010, at 1:38 PM, Charles Oliver N. wrote:
Hot diggity! Finally a nice Ruby-land profiler for JRuby!
If this looks good to everyone, it might be a nice one to
pre-install…or not? Maybe we can just leave it as a gem in the wild
and people can install it if they want to?
I always prefer non-core stuff as a gem.
My 0.02
cr
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.