Skip to content
This repository has been archived by the owner on Apr 14, 2021. It is now read-only.

fatal: No live threads left. Deadlock? #5480

Closed
pkumar-coreebusiness opened this issue Feb 27, 2017 · 14 comments · Fixed by #5571
Closed

fatal: No live threads left. Deadlock? #5480

pkumar-coreebusiness opened this issue Feb 27, 2017 · 14 comments · Fixed by #5571
Assignees

Comments

@pkumar-coreebusiness
Copy link

Hi,

I am trying to install tarantula on a ubuntu machine, i'm unable to get past this issue. It doesn't help i never dealt with ruby and gems.
Any help is greatly appreciated.

--- ERROR REPORT TEMPLATE -------------------------------------------------------

Error Report

Questions

Please fill out answers to these questions, it'll help us figure out
why things are going wrong.

  • What did you do?

    I ran the command sudo bash install.sh

  • What did you expect to happen?

    I expected the script to run completely with installing packages and Tarantula files

  • What happened instead?

the below error.

  • Have you tried any solutions posted on similar issues in our issue tracker, stack overflow, or google?

Yes, but could not get past this issue.

Yes

Backtrace

fatal: No live threads left. Deadlock?
  /usr/local/lib/ruby/2.0.0/thread.rb:72:in `sleep'
  /usr/local/lib/ruby/2.0.0/thread.rb:72:in `block (2 levels) in wait'
  /usr/local/lib/ruby/2.0.0/thread.rb:68:in `handle_interrupt'
  /usr/local/lib/ruby/2.0.0/thread.rb:68:in `block in wait'
  /usr/local/lib/ruby/2.0.0/thread.rb:66:in `handle_interrupt'
  /usr/local/lib/ruby/2.0.0/thread.rb:66:in `wait'
  /usr/local/lib/ruby/2.0.0/thread.rb:196:in `block (2 levels) in pop'
  /usr/local/lib/ruby/2.0.0/thread.rb:188:in `synchronize'
  /usr/local/lib/ruby/2.0.0/thread.rb:188:in `block in pop'
  /usr/local/lib/ruby/2.0.0/thread.rb:187:in `handle_interrupt'
  /usr/local/lib/ruby/2.0.0/thread.rb:187:in `pop'
  /usr/local/lib/ruby/gems/2.0.0/gems/bundler-1.14.5/lib/bundler/worker.rb:43:in `deq'
  /usr/local/lib/ruby/gems/2.0.0/gems/bundler-1.14.5/lib/bundler/installer/parallel_installer.rb:131:in `process_specs'
  /usr/local/lib/ruby/gems/2.0.0/gems/bundler-1.14.5/lib/bundler/installer/parallel_installer.rb:102:in `call'
  /usr/local/lib/ruby/gems/2.0.0/gems/bundler-1.14.5/lib/bundler/installer/parallel_installer.rb:77:in `call'
  /usr/local/lib/ruby/gems/2.0.0/gems/bundler-1.14.5/lib/bundler/installer.rb:199:in `install_in_parallel'
  /usr/local/lib/ruby/gems/2.0.0/gems/bundler-1.14.5/lib/bundler/installer.rb:166:in `install'
  /usr/local/lib/ruby/gems/2.0.0/gems/bundler-1.14.5/lib/bundler/installer.rb:80:in `run'
  /usr/local/lib/ruby/gems/2.0.0/gems/bundler-1.14.5/lib/bundler/installer.rb:24:in `install'
  /usr/local/lib/ruby/gems/2.0.0/gems/bundler-1.14.5/lib/bundler/cli/install.rb:70:in `run'
  /usr/local/lib/ruby/gems/2.0.0/gems/bundler-1.14.5/lib/bundler/cli.rb:181:in `block in install'
  /usr/local/lib/ruby/gems/2.0.0/gems/bundler-1.14.5/lib/bundler/settings.rb:99:in `temporary'
  /usr/local/lib/ruby/gems/2.0.0/gems/bundler-1.14.5/lib/bundler/cli.rb:180:in `install'
  /usr/local/lib/ruby/gems/2.0.0/gems/bundler-1.14.5/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
  /usr/local/lib/ruby/gems/2.0.0/gems/bundler-1.14.5/lib/bundler/vendor/thor/lib/thor/invocation.rb:126:in `invoke_command'
  /usr/local/lib/ruby/gems/2.0.0/gems/bundler-1.14.5/lib/bundler/vendor/thor/lib/thor.rb:359:in `dispatch'
  /usr/local/lib/ruby/gems/2.0.0/gems/bundler-1.14.5/lib/bundler/cli.rb:20:in `dispatch'
  /usr/local/lib/ruby/gems/2.0.0/gems/bundler-1.14.5/lib/bundler/vendor/thor/lib/thor/base.rb:440:in `start'
  /usr/local/lib/ruby/gems/2.0.0/gems/bundler-1.14.5/lib/bundler/cli.rb:11:in `start'
  /usr/local/lib/ruby/gems/2.0.0/gems/bundler-1.14.5/exe/bundle:32:in `block in <top (required)>'
  /usr/local/lib/ruby/gems/2.0.0/gems/bundler-1.14.5/lib/bundler/friendly_errors.rb:121:in `with_friendly_errors'
  /usr/local/lib/ruby/gems/2.0.0/gems/bundler-1.14.5/exe/bundle:24:in `<top (required)>'
  /usr/local/bin/bundle:23:in `load'
  /usr/local/bin/bundle:23:in `<main>'

Environment

Bundler   1.14.5
Rubygems  2.0.14
Ruby      2.0.0p481 (2014-05-08 revision 45883) [x86_64-linux]
GEM_HOME  /opt/tarantula/rails/vendor/bundle/ruby/2.0.0
GEM_PATH
Git       1.7.9.5
Platform  x86_64-linux
OpenSSL   OpenSSL 1.0.1 14 Mar 2012

Bundler settings

specific_platform
  Set for the current user (/home/ubuntu/.bundle/config): "true"
frozen
  Set for your local app (/opt/tarantula/rails/.bundle/config): "1"
path
  Set for your local app (/opt/tarantula/rails/.bundle/config): "vendor/bundle"
disable_shared_gems
  Set for your local app (/opt/tarantula/rails/.bundle/config): true

--- TEMPLATE END ----------------------------------------------------------------

Unfortunately, an unexpected error occurred, and Bundler cannot continue.

First, try this link to see if there are any existing issue reports for this error:
https://github.com/bundler/bundler/search?q=No+live+threads+left.+Deadlock%3F&type=Issues

If there aren't any reports for this error yet, please create copy and paste the report template above into a new issue. Don't forget to anonymize any private data! The new issue form is located at:
https://github.com/bundler/bundler/issues/new

@segiddins
Copy link
Member

What is a gemfile we can use to reproduce this issue? Thanks!

@pkumar-coreebusiness
Copy link
Author

Sorry for the terrible question, the gemfile needed is "rubygems-bundler-1.4.4"/gemfile right?

source "http://rubygems.org"

#ruby=1.8.7

gemspec

@segiddins
Copy link
Member

And the contents of the gemspec?

@pkumar-coreebusiness
Copy link
Author

Here is "rubygems-bundler.gemspec" file

#!/usr/bin/env ruby
# -*- encoding: utf-8 -*-

Kernel.load File.expand_path("../lib/rubygems-bundler/version.rb", __FILE__)

Gem::Specification.new do |s|
  s.name        = "rubygems-bundler"
  s.version     = RubygemsBundler::VERSION
  s.authors     = ["Josh Hull", "Michal Papis"]
  s.email       = ["joshbuddy@gmail.com", "mpapis@gmail.com"]
  s.homepage    = "http://mpapis.github.com/rubygems-bundler"
  s.summary     = %q{Stop using bundle exec}
  s.description = %q{Stop using bundle exec. Integrate Rubygems and Bundler. Make rubygems generate bundler aware executable wrappers.}
  s.license     = 'Apache-2.0'

  s.files       = `git ls-files`.split("\n")
  s.test_files  = `git ls-files -- {test,spec,features}/*`.split("\n")

  s.add_dependency "bundler-unload", ">=1.0.2"
  s.add_dependency "executable-hooks", ">=1.3.2"
  s.add_development_dependency "tf"
  #s.add_development_dependency "smf-gem"
end

@pkumar-coreebusiness
Copy link
Author

That was the file you were looking for right?

@pkumar-coreebusiness
Copy link
Author

Any ideas on why this is failing?

@segiddins
Copy link
Member

I haven't had a chance to look into it yet

@pkumar-coreebusiness
Copy link
Author

Thanks for the update

@jaswinder97
Copy link

jaswinder97 commented Mar 6, 2017

Sometimes due to gem dependency it could raise this deadlock.Like I used a gem 'swagger-ui_rails' which was working fine earlier but when added new gems for capistrano,capistrano-bundler,it does this .So removing those resolved this issue.It might be due to breaking of assets pipeline.

@palmergs
Copy link

palmergs commented Mar 8, 2017

Doing local development on a gem (where the gem is not available through RubyGems.org or similar source) I got the No live threads left. Deadlock? error. Manual installation of the missing gem caused the error to go away. The order was something like:

>  bundle install 
.
.
.
Using web-console 3.4.0
Using rails 5.0.0.1
Using sass-rails 5.0.6
```
fatal: No live threads left. Deadlock?
. . . stack trace . . .
> gem install ../path/to/my/working-0.0.1.gem
> bundle install
.
.
.
Using web-console 3.4.0
Using rails 5.0.0.1
Using sass-rails 5.0.6
Bundle complete! 20 Gemfile dependencies, 78 gems now installed.
Use `bundle show [gemname]` to see where a bundled gem is installed.

I hope this particular anecdote is helpful in diagnosis.

@segiddins
Copy link
Member

@palmergs can you share the output of bundle env?

@palmergs
Copy link

palmergs commented Mar 8, 2017

Attached. Good luck and thanks or all the hard work on bundler.

bundle-env-20190308.txt

@daryllxd
Copy link

I ran into this issue just now, I cloned https://github.com/SergioFierens/ai4r and did a bundle install. I was able to resolve it commenting out the Gemfile gems, bundle install, then putting them back one by one. For this case, the rdoc in the repo's Gemfile.lock was 4.1.0 and running a successful bundle install upped it to 5.0.0. Not sure if that helps

@segiddins
Copy link
Member

As the warning said:

Your lockfile was created by an old Bundler that left some things out.
You can fix this by adding the missing gems to your Gemfile, running bundle install, and then removing the gems from your Gemfile.
The missing gems are:
* json depended upon by rdoc

@segiddins segiddins self-assigned this Mar 14, 2017
bundlerbot added a commit that referenced this issue Mar 15, 2017
…ndirect

[ParallelInstaller] Do not deadlock when the lockfile is missing dependencies entirely

Closes #5480
bundlerbot added a commit that referenced this issue Apr 14, 2017
Avoid deadlocking when installing with a lockfile missing dependencies

Closes #5378.
Closes #5480.
Closes #5519.
Closes #5526.
Closes #5529.
Closes #5549.
Closes #5572.

Not the ideal fix (the error message could be more helpful in pointing out which issue is being faced), but overall better than deadlocking.
philipefarias added a commit to dleemoo/rc-images that referenced this issue Jun 12, 2017
Changes since last version used (1.14.6):

== 1.15.1 (2017-06-02)

Bugfixes:

  - `bundle lock --update GEM` will fail gracefully when the gem is not in the lockfile (rubygems/bundler#5693, @segiddins)
  - `bundle init --gemspec` will fail gracefully when the gemspec is invalid (@colby-swandale)
  - `bundle install --force` works when the gemfile contains git gems (rubygems/bundler#5678, @segiddins)
  - `bundle env` will print well-formed markdown when there are no settings (rubygems/bundler#5677, @segiddins)

== 1.15.0 (2017-05-19)

This space intentionally left blank.

== 1.15.0.pre.4 (2017-05-10)

Bugfixes:

  - avoid conflicts when `Gem.finish_resolve` is called after the bundle has been set up (@segiddins)
  - ensure that `Gem::Specification.find_by_name` always returns an object that can have `#to_spec` called on it (rubygems/bundler#5592, @jules2689)

== 1.15.0.pre.3 (2017-04-30)

Bugfixes:

  - avoid redundant blank lines in the readme generated by `bundle gem` (@koic)
  - ensure that `open-uri` is not loaded after `bundle exec` (@segiddins)
  - print a helpful error message when an activated default gem conflicts with
    a gem in the gemfile (@segiddins)
  - only shorten `ref` option for git gems when it is a SHA (rubygems/bundler#5620, @segiddins)

== 1.15.0.pre.2 (2017-04-23)

Bugfixes:

  - ensure pre-existing fit caches are updated from remote sources (rubygems/bundler#5423, @alextaylor000)
  - avoid duplicating specs in the lockfile after updating with the gem uninstalled (rubygems/bundler#5599, @segiddins)
  - ensure git gems have their extensions available at runtime (rubygems/bundler#5594, @jules2689, @segiddins)

== 1.15.0.pre.1 (2017-04-16)

Features:

  - print a notification when a newer version of bundler is available (rubygems/bundler#4683, @segiddins)
  - add man pages for all bundler commands (rubygems/bundler#4988, @feministy)
  - add the `bundle info` command (@fredrb, @colby-swandale)
  - all files created with `bundle gem` comply with the bundler style guide (@zachahn)
  - if installing a gem fails, print out the reason the gem needed to be installed (rubygems/bundler#5078, @segiddins)
  - allow setting `gem.push_key` to set the key used when running `rake release` (@DTrierweiler)
  - print gem versions that are regressing during `bundle update` in yellow (rubygems/bundler#5506, @brchristian)
  - avoid printing extraneous dependencies when the resolver encounters a conflict (@segiddins)
  - add the `bundle issue` command that prints instructions for reporting issues (rubygems/bundler#4871, @jonathanpike)
  - add `--source` and `--group` options to the `bundle inject` command (rubygems/bundler#5452, @Shekharrajak)
  - add the `bundle add` command to add a gem to the gemfile (@denniss)
  - add the `bundle pristine` command to re-install gems from cached `.gem` files (rubygems/bundler#4509, @denniss)
  - add a `--parseable` option for `bundle config` (@JuanitoFatas, @colby-swandale)

Performance:

  - speed up gemfile initialization by storing locked dependencies as a hash (@jules2689)
  - speed up gemfile initialization by making locked dependency comparison lazy, avoiding object allocation (@jules2689)
  - only validate git gems when they are downloaded, instead of every time `Bundler.setup` is run (@segiddins)
  - avoid regenerating the lockfile when nothing has changed (@segiddins)
  - avoid diffing large arrays when no sources in the gemfile have changed (@segiddins)
  - avoid evaluating full gemspecs when running with RubyGems 2.5+ (@segiddins)

Bugfixes:

  - fix cases where `bundle update` would print a resolver conflict instead of updating the selected gems (rubygems/bundler#5031, rubygems/bundler#5095, @segiddins)
  - print out a stack trace after an interrupt when running in debug mode (@segiddins)
  - print out when bundler starts fetching a gem from a remote server (@segiddins)
  - fix `bundle gem` failing when `git` is unavailable (rubygems/bundler#5458, @Shekharrajak, @colby-swandale)
  - suggest the appropriate command to unfreeze a bundle (rubygems/bundler#5009, @denniss)
  - ensure nested calls to `bundle exec` resolve default gems correctly (rubygems/bundler#5500, @segiddins)
  - ensure that a plugin failing to install doesn't uninstall other plugins (@kerrizor, @roseaboveit)
  - ensure `socket` is required before being referenced (rubygems/bundler#5533, @rafaelfranca)
  - allow running `bundle outdated` when gems aren't installed locally (rubygems/bundler#5553, @segiddins)
  - print a helpful error when `bundle exec`ing to a gem that isn't included in the bundle (rubygems/bundler#5487, @segiddins)
  - print an error message when a non-git gem is given a `branch` option (rubygems/bundler#5530, @colby-swandale)
  - allow interrupts to exit the process after gems have been installed (@segiddins)
  - print the underlying error when downloading gem metadata fails (rubygems/bundler#5579, @segiddins)
  - avoid deadlocking when installing with a lockfile that is missing dependencies (rubygems/bundler#5378, rubygems/bundler#5480, rubygems/bundler#5519, rubygems/bundler#5526, rubygems/bundler#5529, rubygems/bundler#5549, rubygems/bundler#5572, @segiddins)
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants