Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"No live threads left" with Timeout #65

Closed
mahemoff opened this issue May 2, 2014 · 3 comments
Closed

"No live threads left" with Timeout #65

mahemoff opened this issue May 2, 2014 · 3 comments

Comments

@mahemoff
Copy link

mahemoff commented May 2, 2014

I'm not sure if this is a byebug issue, but it seems there's some issue with threads or Timeout library.

It comes up in minitest based unit testing, where if I run a series of tests and debug one of them, the others all have a timeout-related error. Also in libraries using timeout, such as some HTTP clients. If I try to run the library in byebug command line, it throws this exception.

[1, 5] in ./test.rb
   1: #!/usr/bin/env ruby
   2: require 'byebug'
   3: require 'timeout'
   4: byebug
=> 5: true

(byebug) Timeout::timeout(1) {}
WARNING: No backtrace available!!/home/project/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/timeout.rb:95:in `join': No live threads left. Deadlock? (fatal)
        from /home/project/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/timeout.rb:95:in `ensure in block in timeout'
        from /home/project/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/timeout.rb:95:in `block in timeout'
        from /home/project/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/timeout.rb:35:in `block in catch'
        from /home/project/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/timeout.rb:35:in `catch'
        from /home/project/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/timeout.rb:35:in `catch'
        from /home/project/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/timeout.rb:106:in `timeout'
        from ./test.rb:5:in `<main>'
        from /home/project/.rvm/gems/ruby-2.1.1/gems/byebug-3.1.2/lib/byebug/command.rb:114:in `eval'
        from /home/project/.rvm/gems/ruby-2.1.1/gems/byebug-3.1.2/lib/byebug/command.rb:114:in `bb_warning_eval'
        from /home/project/.rvm/gems/ruby-2.1.1/gems/byebug-3.1.2/lib/byebug/commands/eval.rb:29:in `block in execute'
        from /home/project/.rvm/gems/ruby-2.1.1/gems/byebug-3.1.2/lib/byebug/commands/eval.rb:7:in `run_with_binding'
        from /home/project/.rvm/gems/ruby-2.1.1/gems/byebug-3.1.2/lib/byebug/commands/eval.rb:25:in `execute'
        from /home/project/.rvm/gems/ruby-2.1.1/gems/byebug-3.1.2/lib/byebug/processors/command_processor.rb:198:in `one_cmd'
        from /home/project/.rvm/gems/ruby-2.1.1/gems/byebug-3.1.2/lib/byebug/processors/command_processor.rb:179:in `block (2 levels) in process_commands'
        from /home/project/.rvm/gems/ruby-2.1.1/gems/byebug-3.1.2/lib/byebug/processors/command_processor.rb:178:in `each'
        from /home/project/.rvm/gems/ruby-2.1.1/gems/byebug-3.1.2/lib/byebug/processors/command_processor.rb:178:in `block in process_commands'
        from /home/project/.rvm/gems/ruby-2.1.1/gems/byebug-3.1.2/lib/byebug/processors/command_processor.rb:171:in `catch'
        from /home/project/.rvm/gems/ruby-2.1.1/gems/byebug-3.1.2/lib/byebug/processors/command_processor.rb:171:in `process_commands'
        from /home/project/.rvm/gems/ruby-2.1.1/gems/byebug-3.1.2/lib/byebug/processors/command_processor.rb:89:in `at_line'
        from /home/project/.rvm/gems/ruby-2.1.1/gems/byebug-3.1.2/lib/byebug/processors/command_processor.rb:49:in `block in at_line'
        from /home/project/.rvm/gems/ruby-2.1.1/gems/byebug-3.1.2/lib/byebug/processors/command_processor.rb:47:in `synchronize'
        from /home/project/.rvm/gems/ruby-2.1.1/gems/byebug-3.1.2/lib/byebug/processors/command_processor.rb:47:in `at_line'
        from /home/project/.rvm/gems/ruby-2.1.1/gems/byebug-3.1.2/lib/byebug/context.rb:78:in `at_line'
        from ./test.rb:5:in `<main>'
@deivid-rodriguez
Copy link
Owner

Closing cause this seems a duplicate of #54

Thanks anyways!!

@mahemoff
Copy link
Author

mahemoff commented May 2, 2014

Ah, sorry. I just did a search for threads in subject. Thanks for looking into it there.

@deivid-rodriguez
Copy link
Owner

No worries!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants