0

I want to do a thread dump of my rubinius app to help investigate an apparent deadlock issue. My app is using rbx-3.21, and I'd prefer not to change that if possible.

I've tried doing a pure ruby solution like the one described here, but the thread backtraces don't work properly - they all appear the same as the thread performing the stack dump. The result looks something like this:

Thread-1uvk
common/service.rb:192:in `dump_threads'
  common/service.rb:190:in `dump_threads'
  common/service.rb:90:in `prepare_status'

Thread-1uvs
common/service.rb:192:in `dump_threads'
  common/service.rb:190:in `dump_threads'
  common/service.rb:90:in `prepare_status'

....etc
Joe Douglas
  • 136
  • 4

1 Answers1

0

You should take a look at the Rubinius Book which documents some of the new tools. Specifically, check this out: https://book.rubinius.com/manuscript/inspectability.html

I generally run my code using the example given at the bottom of that page:

rbx -Xsystem.diagnostics.target='./diagnostics-$PID.json' -Xsystem.profiler.target=diagnostics some_script.rb

This will write statistics, including a thread profile, to the json file.

If that isn't enough information, stop on by the Gitter room where many Rubinius users hang out and ask for help.