cldwalker / debugger

port of ruby-debug that works on 1.9.2 and 1.9.3
BSD 2-Clause "Simplified" License
845 stars 80 forks source link

Post-mortem debugger segfaults #56

Open Quintus opened 11 years ago

Quintus commented 11 years ago

With debugger from today’s master:

(1123) [20:47:59 quintus@roma] /tmp
% cat foo.rb 
require "debugger"
Debugger.start(post_mortem: true)

def boom
  raise "boom"
end

boom
(1124) [20:50:28 quintus@roma] /tmp
% ruby foo.rb
foo.rb:5
raise "boom"
(rdb:post-mortem) backtrace
--> /opt/rubies/ruby-1.9.3-p286/lib/ruby/gems/1.9.1/gems/debugger-1.2.3/lib/ruby-debug/commands/frame.rb:80: [BUG] Segmentation fault
ruby 1.9.3p286 (2012-10-12 revision 37165) [x86_64-linux]

-- Control frame information -----------------------------------------------
c:0023 p:---- s:0091 b:0091 l:000090 d:000090 CFUNC  :frame_file
c:0022 p:0029 s:0087 b:0087 l:000086 d:000086 METHOD /opt/rubies/ruby-1.9.3-p286/lib/ruby/gems/1.9.1/gems/debugger-1.2.3/lib/ruby-debug/commands/frame.rb:80
c:0021 p:0056 s:0073 b:0073 l:000064 d:000072 BLOCK  /opt/rubies/ruby-1.9.3-p286/lib/ruby/gems/1.9.1/gems/debugger-1.2.3/lib/ruby-debug/commands/frame.rb:167
c:0020 p:---- s:0070 b:0070 l:000069 d:000069 FINISH
c:0019 p:---- s:0068 b:0068 l:000067 d:000067 CFUNC  :each
c:0018 p:0031 s:0065 b:0065 l:000064 d:000064 METHOD /opt/rubies/ruby-1.9.3-p286/lib/ruby/gems/1.9.1/gems/debugger-1.2.3/lib/ruby-debug/commands/frame.rb:161
c:0017 p:0080 s:0062 b:0062 l:000061 d:000061 METHOD /opt/rubies/ruby-1.9.3-p286/lib/ruby/gems/1.9.1/gems/debugger-1.2.3/lib/ruby-debug/processor.rb:275
c:0016 p:0018 s:0054 b:0054 l:000d00 d:000053 BLOCK  /opt/rubies/ruby-1.9.3-p286/lib/ruby/gems/1.9.1/gems/debugger-1.2.3/lib/ruby-debug/processor.rb:261
c:0015 p:---- s:0051 b:0051 l:000050 d:000050 FINISH
c:0014 p:---- s:0049 b:0049 l:000048 d:000048 CFUNC  :each
c:0013 p:0057 s:0046 b:0046 l:000d00 d:000045 BLOCK  /opt/rubies/ruby-1.9.3-p286/lib/ruby/gems/1.9.1/gems/debugger-1.2.3/lib/ruby-debug/processor.rb:260
c:0012 p:---- s:0044 b:0044 l:000043 d:000043 FINISH
c:0011 p:---- s:0042 b:0042 l:000041 d:000041 CFUNC  :catch
c:0010 p:0186 s:0038 b:0038 l:000d00 d:000d00 METHOD /opt/rubies/ruby-1.9.3-p286/lib/ruby/gems/1.9.1/gems/debugger-1.2.3/lib/ruby-debug/processor.rb:253
c:0009 p:0017 s:0028 b:0028 l:000027 d:000027 METHOD /opt/rubies/ruby-1.9.3-p286/lib/ruby/gems/1.9.1/gems/debugger-1.2.3/lib/ruby-debug/processor.rb:173
c:0008 p:0023 s:0022 b:0022 l:000016 d:000021 BLOCK  (eval):5
c:0007 p:0019 s:0020 b:0020 l:000019 d:000019 METHOD <internal:prelude>:10
c:0006 p:0013 s:0017 b:0017 l:000016 d:000016 METHOD (eval):3
c:0005 p:0263 s:0013 b:0013 l:000012 d:000012 METHOD /opt/rubies/ruby-1.9.3-p286/lib/ruby/gems/1.9.1/gems/debugger-1.2.3/lib/ruby-debug-base.rb:155
c:0004 p:0024 s:0008 b:0008 l:0016f8 d:000007 BLOCK  /opt/rubies/ruby-1.9.3-p286/lib/ruby/gems/1.9.1/gems/debugger-1.2.3/lib/ruby-debug-base.rb:143
c:0003 p:---- s:0006 b:0006 l:000005 d:000005 FINISH
c:0002 p:---- s:0004 b:0004 l:000003 d:000003 CFUNC  :call
c:0001 p:0000 s:0002 b:0002 l:000ba8 d:000ba8 TOP   

-- Ruby level backtrace information ----------------------------------------
foo.rb:0:in `call'
/opt/rubies/ruby-1.9.3-p286/lib/ruby/gems/1.9.1/gems/debugger-1.2.3/lib/ruby-debug-base.rb:143:in `block in post_mortem'
/opt/rubies/ruby-1.9.3-p286/lib/ruby/gems/1.9.1/gems/debugger-1.2.3/lib/ruby-debug-base.rb:155:in `handle_post_mortem'
(eval):3:in `at_line'
<internal:prelude>:10:in `synchronize'
(eval):5:in `block in at_line'
/opt/rubies/ruby-1.9.3-p286/lib/ruby/gems/1.9.1/gems/debugger-1.2.3/lib/ruby-debug/processor.rb:173:in `at_line'
/opt/rubies/ruby-1.9.3-p286/lib/ruby/gems/1.9.1/gems/debugger-1.2.3/lib/ruby-debug/processor.rb:253:in `process_commands'
/opt/rubies/ruby-1.9.3-p286/lib/ruby/gems/1.9.1/gems/debugger-1.2.3/lib/ruby-debug/processor.rb:253:in `catch'
/opt/rubies/ruby-1.9.3-p286/lib/ruby/gems/1.9.1/gems/debugger-1.2.3/lib/ruby-debug/processor.rb:260:in `block in process_commands'
/opt/rubies/ruby-1.9.3-p286/lib/ruby/gems/1.9.1/gems/debugger-1.2.3/lib/ruby-debug/processor.rb:260:in `each'
/opt/rubies/ruby-1.9.3-p286/lib/ruby/gems/1.9.1/gems/debugger-1.2.3/lib/ruby-debug/processor.rb:261:in `block (2 levels) in process_commands'
/opt/rubies/ruby-1.9.3-p286/lib/ruby/gems/1.9.1/gems/debugger-1.2.3/lib/ruby-debug/processor.rb:275:in `one_cmd'
/opt/rubies/ruby-1.9.3-p286/lib/ruby/gems/1.9.1/gems/debugger-1.2.3/lib/ruby-debug/commands/frame.rb:161:in `execute'
/opt/rubies/ruby-1.9.3-p286/lib/ruby/gems/1.9.1/gems/debugger-1.2.3/lib/ruby-debug/commands/frame.rb:161:in `each'
/opt/rubies/ruby-1.9.3-p286/lib/ruby/gems/1.9.1/gems/debugger-1.2.3/lib/ruby-debug/commands/frame.rb:167:in `block in execute'
/opt/rubies/ruby-1.9.3-p286/lib/ruby/gems/1.9.1/gems/debugger-1.2.3/lib/ruby-debug/commands/frame.rb:80:in `print_frame'
/opt/rubies/ruby-1.9.3-p286/lib/ruby/gems/1.9.1/gems/debugger-1.2.3/lib/ruby-debug/commands/frame.rb:80:in `frame_file'

-- C level backtrace information -------------------------------------------
/opt/rubies/ruby-1.9.3-p286/lib/libruby.so.1.9(+0x18f063) [0x7ffc2ea94063] vm_dump.c:796
/opt/rubies/ruby-1.9.3-p286/lib/libruby.so.1.9(+0x625bd) [0x7ffc2e9675bd] error.c:258
/opt/rubies/ruby-1.9.3-p286/lib/libruby.so.1.9(rb_bug+0xb3) [0x7ffc2e9683b3] error.c:277
/opt/rubies/ruby-1.9.3-p286/lib/libruby.so.1.9(+0x11d34f) [0x7ffc2ea2234f] signal.c:609
/usr/lib/libpthread.so.0(+0xf1a0) [0x7ffc2e6f81a0]
/opt/rubies/ruby-1.9.3-p286/lib/ruby/gems/1.9.1/gems/debugger-1.2.3/lib/ruby_debug.so(+0x5584) [0x7ffc2ccd7584] ruby_debug.c:1823
/opt/rubies/ruby-1.9.3-p286/lib/libruby.so.1.9(+0x18884c) [0x7ffc2ea8d84c] vm_insnhelper.c:404
/opt/rubies/ruby-1.9.3-p286/lib/libruby.so.1.9(+0x1808ab) [0x7ffc2ea858ab] insns.def:1018
/opt/rubies/ruby-1.9.3-p286/lib/libruby.so.1.9(+0x184fbc) [0x7ffc2ea89fbc] vm.c:1223
/opt/rubies/ruby-1.9.3-p286/lib/libruby.so.1.9(rb_yield+0x17a) [0x7ffc2ea8eeca] vm.c:627
/opt/rubies/ruby-1.9.3-p286/lib/libruby.so.1.9(+0xe610e) [0x7ffc2e9eb10e] range.c:491
/opt/rubies/ruby-1.9.3-p286/lib/libruby.so.1.9(+0x18884c) [0x7ffc2ea8d84c] vm_insnhelper.c:404
/opt/rubies/ruby-1.9.3-p286/lib/libruby.so.1.9(+0x1808ab) [0x7ffc2ea858ab] insns.def:1018
/opt/rubies/ruby-1.9.3-p286/lib/libruby.so.1.9(+0x184fbc) [0x7ffc2ea89fbc] vm.c:1223
/opt/rubies/ruby-1.9.3-p286/lib/libruby.so.1.9(rb_yield+0x17a) [0x7ffc2ea8eeca] vm.c:627
/opt/rubies/ruby-1.9.3-p286/lib/libruby.so.1.9(rb_ary_each+0x52) [0x7ffc2e931112] array.c:1478
/opt/rubies/ruby-1.9.3-p286/lib/libruby.so.1.9(+0x18884c) [0x7ffc2ea8d84c] vm_insnhelper.c:404
/opt/rubies/ruby-1.9.3-p286/lib/libruby.so.1.9(+0x1808ab) [0x7ffc2ea858ab] insns.def:1018
/opt/rubies/ruby-1.9.3-p286/lib/libruby.so.1.9(+0x184fbc) [0x7ffc2ea89fbc] vm.c:1223
/opt/rubies/ruby-1.9.3-p286/lib/libruby.so.1.9(+0x189a62) [0x7ffc2ea8ea62] vm.c:627
/opt/rubies/ruby-1.9.3-p286/lib/libruby.so.1.9(rb_catch_obj+0xba) [0x7ffc2ea8308a] vm_eval.c:1554
/opt/rubies/ruby-1.9.3-p286/lib/libruby.so.1.9(+0x17e12e) [0x7ffc2ea8312e] vm_eval.c:1530
/opt/rubies/ruby-1.9.3-p286/lib/libruby.so.1.9(+0x18884c) [0x7ffc2ea8d84c] vm_insnhelper.c:404
/opt/rubies/ruby-1.9.3-p286/lib/libruby.so.1.9(+0x1808ab) [0x7ffc2ea858ab] insns.def:1018
/opt/rubies/ruby-1.9.3-p286/lib/libruby.so.1.9(+0x184fbc) [0x7ffc2ea89fbc] vm.c:1223
/opt/rubies/ruby-1.9.3-p286/lib/libruby.so.1.9(+0x185d81) [0x7ffc2ea8ad81] vm.c:673
/opt/rubies/ruby-1.9.3-p286/lib/libruby.so.1.9(+0x1861db) [0x7ffc2ea8b1db] vm_eval.c:79
/opt/rubies/ruby-1.9.3-p286/lib/libruby.so.1.9(rb_funcall+0xf7) [0x7ffc2ea8c817] vm_eval.c:236
/opt/rubies/ruby-1.9.3-p286/lib/libruby.so.1.9(rb_ensure+0xb6) [0x7ffc2e96eb66] eval.c:744
/opt/rubies/ruby-1.9.3-p286/lib/ruby/gems/1.9.1/gems/debugger-1.2.3/lib/ruby_debug.so(+0x69ce) [0x7ffc2ccd89ce] ruby_debug.c:1572
/opt/rubies/ruby-1.9.3-p286/lib/libruby.so.1.9(rb_exec_end_proc+0x19f) [0x7ffc2e96fd0f] eval_jump.c:126
/opt/rubies/ruby-1.9.3-p286/lib/libruby.so.1.9(+0x6adba) [0x7ffc2e96fdba] eval.c:92
/opt/rubies/ruby-1.9.3-p286/lib/libruby.so.1.9(ruby_cleanup+0x131) [0x7ffc2e96ff31] eval.c:133
/opt/rubies/ruby-1.9.3-p286/lib/libruby.so.1.9(ruby_run_node+0x23) [0x7ffc2e970273] eval.c:244
ruby() [0x40088b]
/usr/lib/libc.so.6(__libc_start_main+0xf5) [0x7ffc2da26725]
ruby() [0x4008b9]

-- Other runtime information -----------------------------------------------

* Loaded script: foo.rb

* Loaded features:

    0 enumerator.so
    1 /opt/rubies/ruby-1.9.3-p286/lib/ruby/1.9.1/x86_64-linux/enc/encdb.so
    2 /opt/rubies/ruby-1.9.3-p286/lib/ruby/1.9.1/x86_64-linux/enc/trans/transdb.so
    3 /opt/rubies/ruby-1.9.3-p286/lib/ruby/site_ruby/1.9.1/rubygems/defaults.rb
    4 /opt/rubies/ruby-1.9.3-p286/lib/ruby/1.9.1/x86_64-linux/rbconfig.rb
    5 /opt/rubies/ruby-1.9.3-p286/lib/ruby/site_ruby/1.9.1/rubygems/deprecate.rb
    6 /opt/rubies/ruby-1.9.3-p286/lib/ruby/site_ruby/1.9.1/rubygems/exceptions.rb
    7 /opt/rubies/ruby-1.9.3-p286/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb
    8 /opt/rubies/ruby-1.9.3-p286/lib/ruby/site_ruby/1.9.1/rubygems.rb
    9 /opt/rubies/ruby-1.9.3-p286/lib/ruby/site_ruby/1.9.1/rubygems/version.rb
   10 /opt/rubies/ruby-1.9.3-p286/lib/ruby/site_ruby/1.9.1/rubygems/requirement.rb
   11 /opt/rubies/ruby-1.9.3-p286/lib/ruby/site_ruby/1.9.1/rubygems/platform.rb
   12 /opt/rubies/ruby-1.9.3-p286/lib/ruby/site_ruby/1.9.1/rubygems/specification.rb
   13 /opt/rubies/ruby-1.9.3-p286/lib/ruby/site_ruby/1.9.1/rubygems/path_support.rb
   14 /opt/rubies/ruby-1.9.3-p286/lib/ruby/site_ruby/1.9.1/rubygems/dependency.rb
   15 /opt/rubies/ruby-1.9.3-p286/lib/ruby/1.9.1/prettyprint.rb
   16 /opt/rubies/ruby-1.9.3-p286/lib/ruby/1.9.1/pp.rb
   17 /opt/rubies/ruby-1.9.3-p286/lib/ruby/1.9.1/x86_64-linux/stringio.so
   18 /opt/rubies/ruby-1.9.3-p286/lib/ruby/1.9.1/x86_64-linux/socket.so
   19 /opt/rubies/ruby-1.9.3-p286/lib/ruby/1.9.1/socket.rb
   20 /opt/rubies/ruby-1.9.3-p286/lib/ruby/1.9.1/thread.rb
   21 /opt/rubies/ruby-1.9.3-p286/lib/ruby/gems/1.9.1/gems/debugger-1.2.3/lib/ruby_debug.so
   22 /opt/rubies/ruby-1.9.3-p286/lib/ruby/1.9.1/x86_64-linux/digest.so
   23 /opt/rubies/ruby-1.9.3-p286/lib/ruby/1.9.1/digest.rb
   24 /opt/rubies/ruby-1.9.3-p286/lib/ruby/1.9.1/x86_64-linux/digest/sha1.so
   25 /opt/rubies/ruby-1.9.3-p286/lib/ruby/1.9.1/set.rb
   26 /opt/rubies/ruby-1.9.3-p286/lib/ruby/gems/1.9.1/gems/debugger-linecache-1.1.2/lib/trace_nums.so
   27 /opt/rubies/ruby-1.9.3-p286/lib/ruby/gems/1.9.1/gems/debugger-linecache-1.1.2/lib/tracelines19.rb
   28 /opt/rubies/ruby-1.9.3-p286/lib/ruby/gems/1.9.1/gems/debugger-linecache-1.1.2/lib/linecache19.rb
   29 /opt/rubies/ruby-1.9.3-p286/lib/ruby/gems/1.9.1/gems/debugger-1.2.3/lib/ruby-debug-base.rb
   30 /opt/rubies/ruby-1.9.3-p286/lib/ruby/1.9.1/x86_64-linux/readline.so
   31 /opt/rubies/ruby-1.9.3-p286/lib/ruby/gems/1.9.1/gems/debugger-1.2.3/lib/ruby-debug/interface.rb
   32 /opt/rubies/ruby-1.9.3-p286/lib/ruby/gems/1.9.1/gems/columnize-0.3.6/lib/columnize.rb
   33 /opt/rubies/ruby-1.9.3-p286/lib/ruby/gems/1.9.1/gems/debugger-1.2.3/lib/ruby-debug/helper.rb
   34 /opt/rubies/ruby-1.9.3-p286/lib/ruby/gems/1.9.1/gems/debugger-1.2.3/lib/ruby-debug/commands/eval.rb
   35 /opt/rubies/ruby-1.9.3-p286/lib/ruby/1.9.1/e2mmap.rb
   36 /opt/rubies/ruby-1.9.3-p286/lib/ruby/1.9.1/irb/init.rb
   37 /opt/rubies/ruby-1.9.3-p286/lib/ruby/1.9.1/irb/workspace.rb
   38 /opt/rubies/ruby-1.9.3-p286/lib/ruby/1.9.1/irb/inspector.rb
   39 /opt/rubies/ruby-1.9.3-p286/lib/ruby/1.9.1/irb/context.rb
   40 /opt/rubies/ruby-1.9.3-p286/lib/ruby/1.9.1/irb/extend-command.rb
   41 /opt/rubies/ruby-1.9.3-p286/lib/ruby/1.9.1/irb/output-method.rb
   42 /opt/rubies/ruby-1.9.3-p286/lib/ruby/1.9.1/irb/notifier.rb
   43 /opt/rubies/ruby-1.9.3-p286/lib/ruby/1.9.1/irb/slex.rb
   44 /opt/rubies/ruby-1.9.3-p286/lib/ruby/1.9.1/irb/ruby-token.rb
   45 /opt/rubies/ruby-1.9.3-p286/lib/ruby/1.9.1/irb/ruby-lex.rb
   46 /opt/rubies/ruby-1.9.3-p286/lib/ruby/1.9.1/irb/src_encoding.rb
   47 /opt/rubies/ruby-1.9.3-p286/lib/ruby/1.9.1/irb/magic-file.rb
   48 /opt/rubies/ruby-1.9.3-p286/lib/ruby/1.9.1/irb/input-method.rb
   49 /opt/rubies/ruby-1.9.3-p286/lib/ruby/1.9.1/irb/locale.rb
   50 /opt/rubies/ruby-1.9.3-p286/lib/ruby/1.9.1/irb.rb
   51 /opt/rubies/ruby-1.9.3-p286/lib/ruby/gems/1.9.1/gems/debugger-1.2.3/lib/ruby-debug/commands/irb.rb
   52 /opt/rubies/ruby-1.9.3-p286/lib/ruby/gems/1.9.1/gems/debugger-1.2.3/lib/ruby-debug/commands/stepping.rb
   53 /opt/rubies/ruby-1.9.3-p286/lib/ruby/gems/1.9.1/gems/debugger-1.2.3/lib/ruby-debug/commands/condition.rb
   54 /opt/rubies/ruby-1.9.3-p286/lib/ruby/gems/1.9.1/gems/debugger-1.2.3/lib/ruby-debug/commands/continue.rb
   55 /opt/rubies/ruby-1.9.3-p286/lib/ruby/gems/1.9.1/gems/debugger-1.2.3/lib/ruby-debug/commands/catchpoint.rb
   56 /opt/rubies/ruby-1.9.3-p286/lib/ruby/gems/1.9.1/gems/debugger-1.2.3/lib/ruby-debug/commands/reload.rb
   57 /opt/rubies/ruby-1.9.3-p286/lib/ruby/gems/1.9.1/gems/debugger-1.2.3/lib/ruby-debug/commands/variables.rb
   58 /opt/rubies/ruby-1.9.3-p286/lib/ruby/gems/1.9.1/gems/debugger-1.2.3/lib/ruby-debug/commands/threads.rb
   59 /opt/rubies/ruby-1.9.3-p286/lib/ruby/gems/1.9.1/gems/debugger-1.2.3/lib/ruby-debug/commands/method.rb
   60 /opt/rubies/ruby-1.9.3-p286/lib/ruby/gems/1.9.1/gems/debugger-1.2.3/lib/ruby-debug/commands/show.rb
   61 /opt/rubies/ruby-1.9.3-p286/lib/ruby/gems/1.9.1/gems/debugger-1.2.3/lib/ruby-debug/commands/save.rb
   62 /opt/rubies/ruby-1.9.3-p286/lib/ruby/gems/1.9.1/gems/debugger-1.2.3/lib/ruby-debug/commands/set.rb
   63 /opt/rubies/ruby-1.9.3-p286/lib/ruby/gems/1.9.1/gems/debugger-1.2.3/lib/ruby-debug/commands/kill.rb
   64 /opt/rubies/ruby-1.9.3-p286/lib/ruby/gems/1.9.1/gems/debugger-1.2.3/lib/ruby-debug/commands/quit.rb
   65 /opt/rubies/ruby-1.9.3-p286/lib/ruby/gems/1.9.1/gems/debugger-1.2.3/lib/ruby-debug/commands/edit.rb
   66 /opt/rubies/ruby-1.9.3-p286/lib/ruby/gems/1.9.1/gems/debugger-1.2.3/lib/ruby-debug/commands/skip.rb
   67 /opt/rubies/ruby-1.9.3-p286/lib/ruby/gems/1.9.1/gems/debugger-1.2.3/lib/ruby-debug/commands/finish.rb
   68 /opt/rubies/ruby-1.9.3-p286/lib/ruby/gems/1.9.1/gems/debugger-1.2.3/lib/ruby-debug/commands/enable.rb
   69 /opt/rubies/ruby-1.9.3-p286/lib/ruby/gems/1.9.1/gems/debugger-1.2.3/lib/ruby-debug/commands/help.rb
   70 /opt/rubies/ruby-1.9.3-p286/lib/ruby/gems/1.9.1/gems/debugger-1.2.3/lib/ruby-debug/commands/frame.rb
   71 /opt/rubies/ruby-1.9.3-p286/lib/ruby/gems/1.9.1/gems/debugger-1.2.3/lib/ruby-debug/commands/control.rb
   72 /opt/rubies/ruby-1.9.3-p286/lib/ruby/gems/1.9.1/gems/debugger-1.2.3/lib/ruby-debug/commands/source.rb
   73 /opt/rubies/ruby-1.9.3-p286/lib/ruby/gems/1.9.1/gems/debugger-1.2.3/lib/ruby-debug/commands/info.rb
   74 /opt/rubies/ruby-1.9.3-p286/lib/ruby/gems/1.9.1/gems/debugger-1.2.3/lib/ruby-debug/commands/display.rb
   75 /opt/rubies/ruby-1.9.3-p286/lib/ruby/gems/1.9.1/gems/debugger-1.2.3/lib/ruby-debug/commands/trace.rb
   76 /opt/rubies/ruby-1.9.3-p286/lib/ruby/gems/1.9.1/gems/debugger-1.2.3/lib/ruby-debug/commands/jump.rb
   77 /opt/rubies/ruby-1.9.3-p286/lib/ruby/gems/1.9.1/gems/debugger-1.2.3/lib/ruby-debug/commands/list.rb
   78 /opt/rubies/ruby-1.9.3-p286/lib/ruby/gems/1.9.1/gems/debugger-1.2.3/lib/ruby-debug/commands/tmate.rb
   79 /opt/rubies/ruby-1.9.3-p286/lib/ruby/gems/1.9.1/gems/debugger-1.2.3/lib/ruby-debug/commands/breakpoints.rb
   80 /opt/rubies/ruby-1.9.3-p286/lib/ruby/gems/1.9.1/gems/debugger-1.2.3/lib/ruby-debug/command.rb
   81 /opt/rubies/ruby-1.9.3-p286/lib/ruby/1.9.1/x86_64-linux/pathname.so
   82 /opt/rubies/ruby-1.9.3-p286/lib/ruby/1.9.1/pathname.rb
   83 /opt/rubies/ruby-1.9.3-p286/lib/ruby/gems/1.9.1/gems/debugger-1.2.3/lib/ruby-debug/processor.rb
   84 /opt/rubies/ruby-1.9.3-p286/lib/ruby/gems/1.9.1/gems/debugger-1.2.3/lib/ruby-debug.rb
   85 /opt/rubies/ruby-1.9.3-p286/lib/ruby/gems/1.9.1/gems/debugger-1.2.3/lib/debugger/version.rb
   86 /opt/rubies/ruby-1.9.3-p286/lib/ruby/gems/1.9.1/gems/debugger-1.2.3/lib/debugger.rb
   87 /opt/rubies/ruby-1.9.3-p286/lib/ruby/1.9.1/x86_64-linux/enc/trans/single_byte.so

* Process memory map:

00400000-00401000 r-xp 00000000 fe:00 3697789                            /opt/rubies/ruby-1.9.3-p286/bin/ruby
00600000-00601000 rw-p 00000000 fe:00 3697789                            /opt/rubies/ruby-1.9.3-p286/bin/ruby
02453000-02ec5000 rw-p 00000000 00:00 0                                  [heap]
7ffc2b161000-7ffc2b176000 r-xp 00000000 fe:00 550667                     /usr/lib/libgcc_s.so.1
7ffc2b176000-7ffc2b375000 ---p 00015000 fe:00 550667                     /usr/lib/libgcc_s.so.1
7ffc2b375000-7ffc2b376000 rw-p 00014000 fe:00 550667                     /usr/lib/libgcc_s.so.1
7ffc2b376000-7ffc2b38c000 r-xp 00000000 fe:00 3697837                    /opt/rubies/ruby-1.9.3-p286/lib/ruby/1.9.1/x86_64-linux/enc/trans/single_byte.so
7ffc2b38c000-7ffc2b58b000 ---p 00016000 fe:00 3697837                    /opt/rubies/ruby-1.9.3-p286/lib/ruby/1.9.1/x86_64-linux/enc/trans/single_byte.so
7ffc2b58b000-7ffc2b590000 rw-p 00015000 fe:00 3697837                    /opt/rubies/ruby-1.9.3-p286/lib/ruby/1.9.1/x86_64-linux/enc/trans/single_byte.so
7ffc2b590000-7ffc2b597000 r-xp 00000000 fe:00 3697885                    /opt/rubies/ruby-1.9.3-p286/lib/ruby/1.9.1/x86_64-linux/pathname.so
7ffc2b597000-7ffc2b797000 ---p 00007000 fe:00 3697885                    /opt/rubies/ruby-1.9.3-p286/lib/ruby/1.9.1/x86_64-linux/pathname.so
7ffc2b797000-7ffc2b798000 rw-p 00007000 fe:00 3697885                    /opt/rubies/ruby-1.9.3-p286/lib/ruby/1.9.1/x86_64-linux/pathname.so
7ffc2b798000-7ffc2b7f0000 r-xp 00000000 fe:00 527787                     /usr/lib/libncursesw.so.5.9
7ffc2b7f0000-7ffc2b9ef000 ---p 00058000 fe:00 527787                     /usr/lib/libncursesw.so.5.9
7ffc2b9ef000-7ffc2b9f3000 r--p 00057000 fe:00 527787                     /usr/lib/libncursesw.so.5.9
7ffc2b9f3000-7ffc2b9f4000 rw-p 0005b000 fe:00 527787                     /usr/lib/libncursesw.so.5.9
7ffc2b9f4000-7ffc2b9f5000 rw-p 00000000 00:00 0 
7ffc2b9f5000-7ffc2ba31000 r-xp 00000000 fe:00 530335                     /usr/lib/libreadline.so.6.2
7ffc2ba31000-7ffc2bc31000 ---p 0003c000 fe:00 530335                     /usr/lib/libreadline.so.6.2
7ffc2bc31000-7ffc2bc33000 r--p 0003c000 fe:00 530335                     /usr/lib/libreadline.so.6.2
7ffc2bc33000-7ffc2bc39000 rw-p 0003e000 fe:00 530335                     /usr/lib/libreadline.so.6.2
7ffc2bc39000-7ffc2bc3b000 rw-p 00000000 00:00 0 
7ffc2bc3b000-7ffc2bc41000 r-xp 00000000 fe:00 3697879                    /opt/rubies/ruby-1.9.3-p286/lib/ruby/1.9.1/x86_64-linux/readline.so
7ffc2bc41000-7ffc2be40000 ---p 00006000 fe:00 3697879                    /opt/rubies/ruby-1.9.3-p286/lib/ruby/1.9.1/x86_64-linux/readline.so
7ffc2be40000-7ffc2be41000 rw-p 00005000 fe:00 3697879                    /opt/rubies/ruby-1.9.3-p286/lib/ruby/1.9.1/x86_64-linux/readline.so
7ffc2be41000-7ffc2be43000 r-xp 00000000 fe:00 4719043                    /opt/rubies/ruby-1.9.3-p286/lib/ruby/gems/1.9.1/gems/debugger-linecache-1.1.2/lib/trace_nums.so
7ffc2be43000-7ffc2c043000 ---p 00002000 fe:00 4719043                    /opt/rubies/ruby-1.9.3-p286/lib/ruby/gems/1.9.1/gems/debugger-linecache-1.1.2/lib/trace_nums.so
7ffc2c043000-7ffc2c044000 rw-p 00002000 fe:00 4719043                    /opt/rubies/ruby-1.9.3-p286/lib/ruby/gems/1.9.1/gems/debugger-linecache-1.1.2/lib/trace_nums.so
7ffc2c044000-7ffc2c047000 r-xp 00000000 fe:00 3697807                    /opt/rubies/ruby-1.9.3-p286/lib/ruby/1.9.1/x86_64-linux/digest.so
7ffc2c047000-7ffc2c247000 ---p 00003000 fe:00 3697807                    /opt/rubies/ruby-1.9.3-p286/lib/ruby/1.9.1/x86_64-linux/digest.so
7ffc2c247000-7ffc2c248000 rw-p 00003000 fe:00 3697807                    /opt/rubies/ruby-1.9.3-p286/lib/ruby/1.9.1/x86_64-linux/digest.so
7ffc2c248000-7ffc2c25d000 r-xp 00000000 fe:00 530487                     /usr/lib/libz.so.1.2.7
7ffc2c25d000-7ffc2c45c000 ---p 00015000 fe:00 530487                     /usr/lib/libz.so.1.2.7
7ffc2c45c000-7ffc2c45d000 r--p 00014000 fe:00 530487                     /usr/lib/libz.so.1.2.7
7ffc2c45d000-7ffc2c45e000 rw-p 00015000 fe:00 530487                     /usr/lib/libz.so.1.2.7
7ffc2c45e000-7ffc2c4be000 r-xp 00000000 fe:00 546593                     /usr/lib/libssl.so.1.0.0
7ffc2c4be000-7ffc2c6bd000 ---p 00060000 fe:00 546593                     /usr/lib/libssl.so.1.0.0
7ffc2c6bd000-7ffc2c6c1000 r--p 0005f000 fe:00 546593                     /usr/lib/libssl.so.1.0.0
7ffc2c6c1000-7ffc2c6c7000 rw-p 00063000 fe:00 546593                     /usr/lib/libssl.so.1.0.0
7ffc2c6c7000-7ffc2c6c8000 rw-p 00000000 00:00 0 
7ffc2c6c8000-7ffc2c8a8000 r-xp 00000000 fe:00 546594                     /usr/lib/libcrypto.so.1.0.0
7ffc2c8a8000-7ffc2caa7000 ---p 001e0000 fe:00 546594                     /usr/lib/libcrypto.so.1.0.0
7ffc2caa7000-7ffc2cac2000 r--p 001df000 fe:00 546594                     /usr/lib/libcrypto.so.1.0.0
7ffc2cac2000-7ffc2cacd000 rw-p 001fa000 fe:00 546594                     /usr/lib/libcrypto.so.1.0.0
7ffc2cacd000-7ffc2cad1000 rw-p 00000000 00:00 0 
7ffc2cad1000-7ffc2cad2000 r-xp 00000000 fe:00 3697890                    /opt/rubies/ruby-1.9.3-p286/lib/ruby/1.9.1/x86_64-linux/digest/sha1.so
7ffc2cad2000-7ffc2ccd1000 ---p 00001000 fe:00 3697890                    /opt/rubies/ruby-1.9.3-p286/lib/ruby/1.9.1/x86_64-linux/digest/sha1.so
7ffc2ccd1000-7ffc2ccd2000 rw-p 00000000 fe:00 3697890                    /opt/rubies/ruby-1.9.3-p286/lib/ruby/1.9.1/x86_64-linux/digest/sha1.so
7ffc2ccd2000-7ffc2ccdd000 r-xp 00000000 fe:00 4719343                    /opt/rubies/ruby-1.9.3-p286/lib/ruby/gems/1.9.1/gems/debugger-1.2.3/lib/ruby_debug.so
7ffc2ccdd000-7ffc2cedc000 ---p 0000b000 fe:00 4719343                    /opt/rubies/ruby-1.9.3-p286/lib/ruby/gems/1.9.1/gems/debugger-1.2.3/lib/ruby_debug.so
7ffc2cedc000-7ffc2cedd000 rw-p 0000a000 fe:00 4719343                    /opt/rubies/ruby-1.9.3-p286/lib/ruby/gems/1.9.1/gems/debugger-1.2.3/lib/ruby_debug.so
7ffc2cedd000-7ffc2cf00000 r-xp 00000000 fe:00 3697818                    /opt/rubies/ruby-1.9.3-p286/lib/ruby/1.9.1/x86_64-linux/socket.so
7ffc2cf00000-7ffc2d100000 ---p 00023000 fe:00 3697818                    /opt/rubies/ruby-1.9.3-p286/lib/ruby/1.9.1/x86_64-linux/socket.so
7ffc2d100000-7ffc2d101000 rw-p 00023000 fe:00 3697818                    /opt/rubies/ruby-1.9.3-p286/lib/ruby/1.9.1/x86_64-linux/socket.so
7ffc2d101000-7ffc2d108000 r-xp 00000000 fe:00 3697820                    /opt/rubies/ruby-1.9.3-p286/lib/ruby/1.9.1/x86_64-linux/stringio.so
7ffc2d108000-7ffc2d307000 ---p 00007000 fe:00 3697820                    /opt/rubies/ruby-1.9.3-p286/lib/ruby/1.9.1/x86_64-linux/stringio.so
7ffc2d307000-7ffc2d308000 rw-p 00006000 fe:00 3697820                    /opt/rubies/ruby-1.9.3-p286/lib/ruby/1.9.1/x86_64-linux/stringio.so
7ffc2d308000-7ffc2d30a000 r-xp 00000000 fe:00 3697827                    /opt/rubies/ruby-1.9.3-p286/lib/ruby/1.9.1/x86_64-linux/enc/trans/transdb.so
7ffc2d30a000-7ffc2d50a000 ---p 00002000 fe:00 3697827                    /opt/rubies/ruby-1.9.3-p286/lib/ruby/1.9.1/x86_64-linux/enc/trans/transdb.so
7ffc2d50a000-7ffc2d50b000 rw-p 00002000 fe:00 3697827                    /opt/rubies/ruby-1.9.3-p286/lib/ruby/1.9.1/x86_64-linux/enc/trans/transdb.so
7ffc2d50b000-7ffc2d50d000 r-xp 00000000 fe:00 3697859                    /opt/rubies/ruby-1.9.3-p286/lib/ruby/1.9.1/x86_64-linux/enc/encdb.so
7ffc2d50d000-7ffc2d70c000 ---p 00002000 fe:00 3697859                    /opt/rubies/ruby-1.9.3-p286/lib/ruby/1.9.1/x86_64-linux/enc/encdb.so
7ffc2d70c000-7ffc2d70d000 rw-p 00001000 fe:00 3697859                    /opt/rubies/ruby-1.9.3-p286/lib/ruby/1.9.1/x86_64-linux/enc/encdb.so
7ffc2d70d000-7ffc2da05000 r--p 00000000 fe:00 559934                     /usr/lib/locale/locale-archive
7ffc2da05000-7ffc2dba2000 r-xp 00000000 fe:00 559635                     /usr/lib/libc-2.16.so
7ffc2dba2000-7ffc2dda2000 ---p 0019d000 fe:00 559635                     /usr/lib/libc-2.16.so
7ffc2dda2000-7ffc2dda6000 r--p 0019d000 fe:00 559635                     /usr/lib/libc-2.16.so
7ffc2dda6000-7ffc2dda8000 rw-p 001a1000 fe:00 559635                     /usr/lib/libc-2.16.so
7ffc2dda8000-7ffc2ddac000 rw-p 00000000 00:00 0 
7ffc2ddac000-7ffc2dea5000 r-xp 00000000 fe:00 559621                     /usr/lib/libm-2.16.so
7ffc2dea5000-7ffc2e0a4000 ---p 000f9000 fe:00 559621                     /usr/lib/libm-2.16.so
7ffc2e0a4000-7ffc2e0a5000 r--p 000f8000 fe:00 559621                     /usr/lib/libm-2.16.so
7ffc2e0a5000-7ffc2e0a6000 rw-p 000f9000 fe:00 559621                     /usr/lib/libm-2.16.so
7ffc2e0a6000-7ffc2e0ae000 r-xp 00000000 fe:00 559611                     /usr/lib/libcrypt-2.16.so
7ffc2e0ae000-7ffc2e2ad000 ---p 00008000 fe:00 559611                     /usr/lib/libcrypt-2.16.so
7ffc2e2ad000-7ffc2e2ae000 r--p 00007000 fe:00 559611                     /usr/lib/libcrypt-2.16.so
7ffc2e2ae000-7ffc2e2af000 rw-p 00008000 fe:00 559611                     /usr/lib/libcrypt-2.16.so
7ffc2e2af000-7ffc2e2dd000 rw-p 00000000 00:00 0 
7ffc2e2dd000-7ffc2e2e0000 r-xp 00000000 fe:00 559647                     /usr/lib/libdl-2.16.so
7ffc2e2e0000-7ffc2e4df000 ---p 00003000 fe:00 559647                     /usr/lib/libdl-2.16.so
7ffc2e4df000-7ffc2e4e0000 r--p 00002000 fe:00 559647                     /usr/lib/libdl-2.16.so
7ffc2e4e0000-7ffc2e4e1000 rw-p 00003000 fe:00 559647                     /usr/lib/libdl-2.16.so
7ffc2e4e1000-7ffc2e4e8000 r-xp 00000000 fe:00 559631                     /usr/lib/librt-2.16.so
7ffc2e4e8000-7ffc2e6e7000 ---p 00007000 fe:00 559631                     /usr/lib/librt-2.16.so
7ffc2e6e7000-7ffc2e6e8000 r--p 00006000 fe:00 559631                     /usr/lib/librt-2.16.so
7ffc2e6e8000-7ffc2e6e9000 rw-p 00007000 fe:00 559631                     /usr/lib/librt-2.16.so
7ffc2e6e9000-7ffc2e700000 r-xp 00000000 fe:00 559641                     /usr/lib/libpthread-2.16.so
7ffc2e700000-7ffc2e8ff000 ---p 00017000 fe:00 559641                     /usr/lib/libpthread-2.16.so
7ffc2e8ff000-7ffc2e900000 r--p 00016000 fe:00 559641                     /usr/lib/libpthread-2.16.so
7ffc2e900000-7ffc2e901000 rw-p 00017000 fe:00 559641                     /usr/lib/libpthread-2.16.so
7ffc2e901000-7ffc2e905000 rw-p 00000000 00:00 0 
7ffc2e905000-7ffc2eb32000 r-xp 00000000 fe:00 3697791                    /opt/rubies/ruby-1.9.3-p286/lib/libruby.so.1.9.1
7ffc2eb32000-7ffc2ed32000 ---p 0022d000 fe:00 3697791                    /opt/rubies/ruby-1.9.3-p286/lib/libruby.so.1.9.1
7ffc2ed32000-7ffc2ed3a000 rw-p 0022d000 fe:00 3697791                    /opt/rubies/ruby-1.9.3-p286/lib/libruby.so.1.9.1
7ffc2ed3a000-7ffc2ed56000 rw-p 00000000 00:00 0 
7ffc2ed56000-7ffc2ed77000 r-xp 00000000 fe:00 559669                     /usr/lib/ld-2.16.so
7ffc2ee43000-7ffc2ef49000 rw-p 00000000 00:00 0 
7ffc2ef70000-7ffc2ef72000 rw-p 00000000 00:00 0 
7ffc2ef72000-7ffc2ef73000 ---p 00000000 00:00 0 
7ffc2ef73000-7ffc2ef77000 rw-p 00000000 00:00 0                          [stack:20912]
7ffc2ef77000-7ffc2ef78000 r--p 00021000 fe:00 559669                     /usr/lib/ld-2.16.so
7ffc2ef78000-7ffc2ef79000 rw-p 00022000 fe:00 559669                     /usr/lib/ld-2.16.so
7ffc2ef79000-7ffc2ef7a000 rw-p 00000000 00:00 0 
7fff4ef18000-7fff4ef39000 rw-p 00000000 00:00 0 
7fff4efbf000-7fff4efc0000 r-xp 00000000 00:00 0                          [vdso]
ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0                  [vsyscall]

[NOTE]
You may have encountered a bug in the Ruby interpreter or extension libraries.
Bug reports are welcome.
For details: http://www.ruby-lang.org/bugreport.html

zsh: abort (core dumped)  ruby foo.rb
(1125) [20:50:37 quintus@roma] /tmp
% 

Ruby version: ` ruby 1.9.3p286 (2012-10-12 revision 37165) [x86_64-linux] OS: Arch Linux 64-bits

Vale, Quintus

Quintus commented 11 years ago

Here’s a GDB stacktrace of the whole thing (recompiled debugger with GCC’s -g):

% gdb ruby
GNU gdb (GDB) 7.5.1
Copyright (C) 2012 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-unknown-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /opt/rubies/ruby-1.9.3-p286/bin/ruby...done.
(gdb) r foo.rb
Starting program: /opt/rubies/ruby-1.9.3-p286/bin/ruby foo.rb
warning: Could not load shared library symbols for linux-vdso.so.1.
Do you need "set solib-search-path" or "set sysroot"?
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".
[New Thread 0x7ffff7ff9700 (LWP 22353)]
foo.rb:5
raise "boom"
(rdb:post-mortem) bt
--> 
Program received signal SIGSEGV, Segmentation fault.
0x00007ffff5d5c584 in context_frame_file (argc=<optimized out>, argv=<optimized out>, self=<optimized out>) at ruby_debug.c:1823
1823        return(GET_FRAME->info.runtime.cfp->iseq->filename);
(gdb) bt
#0  0x00007ffff5d5c584 in context_frame_file (argc=<optimized out>, argv=<optimized out>, self=<optimized out>) at ruby_debug.c:1823
#1  0x00007ffff7b1284c in vm_call_cfunc (me=0xaca450, blockptr=<optimized out>, recv=<optimized out>, num=1, reg_cfp=0x7ffff7fc6880, 
    th=0x602520) at vm_insnhelper.c:404
#2  vm_call_method (th=th@entry=0x602520, cfp=cfp@entry=0x7ffff7fc6880, num=1, blockptr=<optimized out>, flag=<optimized out>, 
    flag@entry=0, id=<optimized out>, me=0xaca450, recv=13877040) at vm_insnhelper.c:534
#3  0x00007ffff7b0a8ab in vm_exec_core (th=0x602520, initial=initial@entry=0) at insns.def:1018
#4  0x00007ffff7b0efbc in vm_exec (th=th@entry=0x602520) at vm.c:1223
#5  0x00007ffff7b13eca in invoke_block_from_c (cref=0x0, blockptr=0x0, argv=0x7fffffffce18, argc=1, self=13938280, block=0x7ffff7fc6a08, 
    th=0x602520) at vm.c:627
#6  vm_yield (argv=0x7fffffffce18, argc=1, th=0x602520) at vm.c:657
#7  rb_yield_0 (argv=0x7fffffffce18, argc=1) at vm_eval.c:760
#8  rb_yield (val=val@entry=1) at vm_eval.c:770
#9  0x00007ffff7a7010e in range_each (range=14057800) at range.c:491
#10 0x00007ffff7b1284c in vm_call_cfunc (me=0x6d9c20, blockptr=<optimized out>, recv=<optimized out>, num=0, reg_cfp=0x7ffff7fc69e0, 
    th=0x602520) at vm_insnhelper.c:404
#11 vm_call_method (th=th@entry=0x602520, cfp=cfp@entry=0x7ffff7fc69e0, num=0, blockptr=<optimized out>, flag=<optimized out>, 
    flag@entry=0, id=<optimized out>, me=0x6d9c20, recv=14057800) at vm_insnhelper.c:534
#12 0x00007ffff7b0a8ab in vm_exec_core (th=0x602520, initial=initial@entry=0) at insns.def:1018
#13 0x00007ffff7b0efbc in vm_exec (th=th@entry=0x602520) at vm.c:1223
#14 0x00007ffff7b13eca in invoke_block_from_c (cref=0x0, blockptr=0x0, argv=0x7fffffffd198, argc=1, self=13890440, block=0x7ffff7fc6bc0, 
    th=0x602520) at vm.c:627
#15 vm_yield (argv=0x7fffffffd198, argc=1, th=0x602520) at vm.c:657
#16 rb_yield_0 (argv=0x7fffffffd198, argc=1) at vm_eval.c:760
#17 rb_yield (val=1) at vm_eval.c:770
#18 0x00007ffff79b6112 in rb_ary_each (array=14063800) at array.c:1478
#19 0x00007ffff7b1284c in vm_call_cfunc (me=0x6c5bf0, blockptr=<optimized out>, recv=<optimized out>, num=0, reg_cfp=0x7ffff7fc6b98, 
    th=0x602520) at vm_insnhelper.c:404
#20 vm_call_method (th=th@entry=0x602520, cfp=cfp@entry=0x7ffff7fc6b98, num=0, blockptr=<optimized out>, flag=<optimized out>, 
    flag@entry=0, id=<optimized out>, me=0x6c5bf0, recv=14063800) at vm_insnhelper.c:534
#21 0x00007ffff7b0a8ab in vm_exec_core (th=0x602520, initial=initial@entry=0) at insns.def:1018
#22 0x00007ffff7b0efbc in vm_exec (th=th@entry=0x602520) at vm.c:1223
#23 0x00007ffff7b13a62 in invoke_block_from_c (cref=0x0, blockptr=0x0, argv=0x7fffffffd4f8, argc=1, self=13890440, block=0x7ffff7fc6cc8, 
    th=0x602520) at vm.c:627
#24 vm_yield (argv=0x7fffffffd4f8, argc=1, th=0x602520) at vm.c:657
#25 rb_yield_0 (argv=0x7fffffffd4f8, argc=1) at vm_eval.c:760
#26 catch_i (tag=1, tag@entry=6264846, data=data@entry=0) at vm_eval.c:1479
#27 0x00007ffff7b0808a in rb_catch_obj (tag=6264846, func=func@entry=0x7ffff7b138f0 <catch_i>, data=data@entry=0) at vm_eval.c:1554
#28 0x00007ffff7b0812e in rb_f_catch (argc=<optimized out>, argv=<optimized out>) at vm_eval.c:1530
---Type <return> to continue, or q <return> to quit---
#29 0x00007ffff7b1284c in vm_call_cfunc (me=0x690a30, blockptr=<optimized out>, recv=<optimized out>, num=1, reg_cfp=0x7ffff7fc6ca0, 
    th=0x602520) at vm_insnhelper.c:404
#30 vm_call_method (th=th@entry=0x602520, cfp=cfp@entry=0x7ffff7fc6ca0, num=1, blockptr=<optimized out>, flag=<optimized out>, 
    flag@entry=8, id=<optimized out>, me=0x690a30, recv=13890440) at vm_insnhelper.c:534
#31 0x00007ffff7b0a8ab in vm_exec_core (th=0x602520, initial=initial@entry=0) at insns.def:1018
#32 0x00007ffff7b0efbc in vm_exec (th=0x602520) at vm.c:1223
#33 0x00007ffff7b0fd81 in rb_vm_invoke_proc (th=0x20, proc=0xeadf00, self=6554560, argc=0, argv=0x0, blockptr=0x0) at vm.c:673
#34 0x00007ffff7b101db in vm_call0 (th=0x602520, recv=<optimized out>, id=6008, argc=0, argv=0x0, me=0x707040) at vm_eval.c:79
#35 0x00007ffff7b11817 in rb_call0 (self=6, scope=CALL_FCALL, argv=0x0, argc=0, mid=6008, recv=13878280) at vm_eval.c:236
#36 rb_call (scope=CALL_FCALL, argv=0x0, argc=0, mid=6008, recv=13878280) at vm_eval.c:456
#37 rb_funcall (recv=13878280, mid=6008, n=0) at vm_eval.c:658
#38 0x00007ffff79f3b66 in rb_ensure (b_proc=b_proc@entry=0x7ffff5d5ad90 <debug_at_exit_c>, data1=data1@entry=13878280, 
    e_proc=e_proc@entry=0x7ffff5d5d560 <set_current_skipped_status>, data2=data2@entry=0) at eval.c:744
#39 0x00007ffff5d5d9ce in debug_at_exit_i (proc=13878280) at ruby_debug.c:1572
#40 0x00007ffff79f4d0f in rb_exec_end_proc () at eval_jump.c:126
#41 0x00007ffff79f4dba in ruby_finalize_0 () at eval.c:92
#42 0x00007ffff79f4f31 in ruby_cleanup (ex=6) at eval.c:133
#43 0x00007ffff79f5273 in ruby_run_node (n=0x858a90) at eval.c:244
#44 0x000000000040088b in main (argc=2, argv=0x7fffffffe368) at main.c:38
(gdb) q
A debugging session is active.

    Inferior 1 [process 22349] will be killed.

Quit anyway? (y or n) y
(1148) [21:01:55 quintus@roma] /tmp
% 
astashov commented 11 years ago

Yup, commands 'edit', 'frame', 'where'/'backtrace' and 'jump' fail with Segfaults.

astashov commented 11 years ago

The problem is inside context_frame_file(), no idea how to fix it though. :(

cldwalker commented 11 years ago

@Quintus Thanks for the detailed bug report. Patches are welcome as I won't be getting to this.

moll commented 11 years ago

Is there a workaround or another approach for post mortem in "debugger"? Or how do you guys debug uncaught exceptions deep in external libraries' code?

marnen commented 11 years ago

@moll My question exactly. @cldwalker This is a serious problem (still present with debugger 1.6.1 and Ruby 2). Why won't you be getting to it? And what do you recommend we do instead?

deivid-rodriguez commented 11 years ago

@moll, @marnen Post-mortem debugging works just fine in byebug. Ruby 2 only though. Salud!