Giter Club home page Giter Club logo

Comments (2)

ko1 avatar ko1 commented on July 18, 2024

I also couldn't reproduce the issue.

[master]$ ruby target.rb
Run options: --seed 18748

# Running:

[1, 10] in target.rb
     1| require 'minitest/autorun'
     2| require 'debug'
     3|
     4| class FooTest < Minitest::Test
     5|   def test_foo
=>   6|     debugger
     7|     assert_equal 'foo', 'foo'
     8|   end
     9| end
    10|
=>#0    FooTest#test_foo at target.rb:6
  #1    block in run (3 levels) at ~/ruby/install/master/lib/ruby/gems/3.3.0+0/gems/minitest-5.20.0/lib/minitest/test.rb:94
  # and 20 frames (use `bt' command for all frames)
(rdbg) p x    # command
eval error: undefined local variable or method `x' for #<FooTest:0x00007fdea5f42cf8>
  (rdbg)/target.rb:1:in `test_foo'
=> nil
(rdbg) x
eval error: undefined local variable or method `x' for #<FooTest:0x00007fdea5f42cf8>
  (rdbg)/target.rb:1:in `test_foo'
nil
 > GEMS/timeout-0.3.2/lib/timeout.rb:113:in `sleep'
... timeout ...
 > GEMS/timeout-0.3.2/lib/timeout.rb:111:in `block in create_timeout_thread'
["DEBUGGER Exception: GEMS/debug-1.8.0/lib/debug/thread_client.rb:1251", #<LocalJumpError: break from proc-closure>, ["GEMS/debug-1.8.0/lib/debug/thread_client.rb:458:in `block in frame_eval'", "GEMS/debug-1.8.0/lib/debug/thread_client.rb:457:in `each'", "GEMS/debug-1.8.0/lib/debug/thread_client.rb:457:in `rescue in frame_eval'", "GEMS/debug-1.8.0/lib/debug/thread_client.rb:436:in `frame_eval'", "GEMS/debug-1.8.0/lib/debug/thread_client.rb:1043:in `wait_next_action_'", "GEMS/debug-1.8.0/lib/debug/thread_client.rb:866:in `wait_next_action'", "GEMS/debug-1.8.0/lib/debug/thread_client.rb:321:in `suspend'", "GEMS/debug-1.8.0/lib/debug/thread_client.rb:252:in `on_breakpoint'", "GEMS/debug-1.8.0/lib/debug/breakpoint.rb:69:in `suspend'", "GEMS/debug-1.8.0/lib/debug/breakpoint.rb:170:in `block in setup'", "GEMS/debug-1.8.0/lib/debug/session.rb:2616:in `debugger'", "test/my_test.rb:34:in `block (2 levels) in <main>'", "PROJ/test/minitest_should.rb:30:in `instance_exec'", ... minitest stack ...]]

Does it multi-threaded program with timeout?

If you can make smaller repro-code, it will help a lot.

from debug.

KJTsanaktsidis avatar KJTsanaktsidis commented on July 18, 2024

OK, I was able to reproduce this (in the same codebase as @zenspider) and I think this is a manifestation of https://bugs.ruby-lang.org/issues/18991. If code coverage collection (simplecov) is disabled, then the issue does not occur.

It also is fixed with Ruby 3.2.2, and with the tip of the ruby_3_1 branch (3.1.4-0a70dde90ab2b52191f4782d0ec7d0a99ab1e845), because the fix was backported. However, this isn't fixed in a released version of Ruby 3.1, because there hasn't been a release since the backport was done.

from debug.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.