#570 new
William

debugger breakpoint dies on kernel methods

Reported by William | May 21st, 2008 @ 07:17 PM | in 1.0 preview

Comments and changes to this ticket

  • William

    William May 21st, 2008 @ 07:18 PM

    
    $ ./shotgun/rubinius -debug benchmark/alioth/spectralnorm/spectralnorm.rb 200
    [Debugger activated]
    benchmark/alioth/spectralnorm/spectralnorm.rb:5 (__script__) [IP:0]
    =>   5: def eval_A(i,j)
    
    rbx:debug> break Kernel#===
    VM Assertion: cpu_channel_has_readers_p(state, dbg) (cpu_instructions.c:1388)
    
    Ruby backtrace:
    0xb73ff340 Kernel#===+1 in kernel/core/kernel.rb:385
    0xb73ff2c8 Class#waitpid+71 in kernel/core/process.rb:235
    0xb73ff240 Kernel#`+109 in kernel/core/process.rb:592
    0xb73ec2d0 Debugger::CmdLineInterface#process_commands+478 in /home/rubyist/devel/rubinius/lib/debugger/interface.rb:158
    0xb73ec258 Debugger::Interface#at_breakpoint+45 in /home/rubyist/devel/rubinius/lib/debugger/interface.rb:44
    0xb73ec1e4 Debugger#activate_debugger+29 in /home/rubyist/devel/rubinius/lib/debugger/debugger.rb:158
    0xb73ec170 <none>#<block>+32 in /home/rubyist/devel/rubinius/lib/debugger/debugger.rb:36
    0xb73ec104 Proc#call+22 in kernel/core/proc.rb:88
    0xb73eb124 BreakpointTracker#wait_for_breakpoint+184 in kernel/core/breakpoint.rb:758
    0xb73eb0b8 <none>#<block>+9 in /home/rubyist/devel/rubinius/lib/debugger/debugger.rb:46
    0xb73eaf40 <none>#<block>+22 in kernel/core/thread.rb:60
    An exception occured in a breakpoint handler:
    An error has occured within the VM
                          Kernel(FalseClass)#=== at kernel/core/kernel.rb:385
                          Process.waitpid (wait) at kernel/core/process.rb:235
            Kernel(Debugger::CmdLineInterface)#` at kernel/core/process.rb:592
        Debugger::CmdLineInterface#process_commands at /home/rubyist/devel/rubinius/lib/debugger/interface.rb:158
        Debugger::Interface(Debugger::CmdLineInterface)#at_breakpoint at /home/rubyist/devel/rubinius/lib/debugger/interface.rb:44
                      Debugger#activate_debugger at /home/rubyist/devel/rubinius/lib/debugger/debugger.rb:158
                          Debugger#initialize {} at /home/rubyist/devel/rubinius/lib/debugger/debugger.rb:36
                                       Proc#call at kernel/core/proc.rb:88
           BreakpointTracker#wait_for_breakpoint at kernel/core/breakpoint.rb:762
                          Debugger#initialize {} at /home/rubyist/devel/rubinius/lib/debugger/debugger.rb:46
                            Thread#initialize {} at kernel/core/thread.rb:60
    VM Assertion: cpu_channel_has_readers_p(state, dbg) (cpu_instructions.c:1388)
    
    
  • William

    William May 21st, 2008 @ 07:22 PM

    The above is an example. I'm not sure whether it's really just kernel methods, but it does seem to work fine for methods defined in the script.

  • Ryan Davis

    Ryan Davis June 23rd, 2008 @ 04:11 PM

    • → Assigned user changed from “” to “Adam Gardiner”
  • Adam Gardiner

    Adam Gardiner August 20th, 2008 @ 02:20 PM

    • → Tag changed from “” to “debugger”

    Unfortunately, the debugger cannot be used to debug Kernel methods. This is due to the fact that, since the debugger itself is written in Ruby, if you set a breakpoint on a Kernel method, you will in all likelihood (it depends on the method) hit this same breakpoint while running the debugger code that handles a breakpoint! That is what has happened in this case, where the breakpoint was set on Kernel#===. This method is used in one or more places in the code that is used to handle a breakpoint, and so the same breakpoint is hit when the debugger is trying to handle the first breakpoint.

    There is really no way around this in the Shotugn VM, however I have had some discussions with Evan about a different approach to setting breakpoints that might provide a resolution in the C++ VM.

Please Login or create a free account to add a new comment.

You can update this ticket by sending an email to from your email client. (help)

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

People watching this ticket

Tags