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? with Ruby 2.3.0,bundler-1.14.6 #5526

Closed
kaitoan2000 opened this issue Mar 21, 2017 · 4 comments · Fixed by #5571
Closed

fatal: No live threads left. Deadlock? with Ruby 2.3.0,bundler-1.14.6 #5526

kaitoan2000 opened this issue Mar 21, 2017 · 4 comments · Fixed by #5571

Comments

@kaitoan2000
Copy link

Hi,
I face this issue with my bundle install.
/zserver/ruby/bin/bundle install
Don't run Bundler as root. Bundler can ask for sudo if it is needed, and installing your bundle as root will break this application for all non-root users on this
machine.
Fetching gem metadata from http://rubygems.org/.......
Fetching version metadata from http://rubygems.org/..
Fetching dependency metadata from http://rubygems.org/.
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:

  • echoe depended upon by prawn-format
    Using rake 10.3.2
    Using i18n 0.6.9
    Using multi_json 1.10.1
    Using builder 3.0.4
    Using erubis 2.7.0
    Using journey 1.0.4
    Using rack 1.4.5
    Using hike 1.2.3
    Using tilt 1.4.1
    Using mime-types 1.25.1
    Using polyglot 0.3.5
    Using arel 3.0.3
    Using tzinfo 0.3.39
    Using coffee-script-source 1.7.0
    Using execjs 2.2.0
    Using json 2.0.3
    Using thor 0.19.1
    Using docile 1.1.5
    Using simplecov-html 0.8.0
    Using tins 1.3.0
    Using daemon_controller 1.2.0
    Using daemons 1.1.9
    Using diff-lcs 1.2.5
    Using flexmock 0.9.0
    Using libv8 3.16.14.3 (x86_64-linux)
    Using libxml-ruby 2.7.0
    Using machinist 2.0
    Using memcache-client 1.8.5
    Using mysql2 0.3.16
    Using prawn-core 0.5.0.1
    Using prawn-layout 0.2.0.1
    Using bundler 1.14.6
    Using rb-readline 0.5.1
    Using ref 1.0.5
    Using rspec-core 2.99.1
    Using rspec-mocks 2.99.1
    Using ruby-ole 1.2.11.7
    Using rubyzip 1.0.0
    Using sass 3.3.8
    Using hoe 3.12.0
    Using faker 1.3.0
    Using activesupport 3.2.18
    Using rack-cache 1.2
    Using rack-test 0.6.2
    Using rack-ssl 1.3.4
    Using sprockets 2.2.2
    Using rest-client 1.6.7
    Using treetop 1.4.15
    Using coffee-script 2.2.0
    Using rdoc 3.12.2
    Using uglifier 2.5.1
    Using simplecov 0.8.2
    Using term-ansicolor 1.3.0
    Using passenger 4.0.45
    Using rspec-expectations 2.99.1
    Using therubyracer 0.12.1
    Using spreadsheet 0.6.9
    Using zip-zip 0.3
    Using test-unit 1.2.3
    Using activemodel 3.2.18
    Using delayed_job 4.0.1
    Using mail 2.5.4
    Using coveralls 0.7.0
    Using rspec-collection_matchers 1.0.0
    Using actionpack 3.2.18
    Using activerecord 3.2.18
    Using activeresource 3.2.18
    Using actionmailer 3.2.18
    Using railties 3.2.18
    Using delayed_job_active_record 4.0.1
    Using coffee-rails 3.2.2
    Using jquery-rails 3.1.1
    Using rails 3.2.18
    Using rspec-rails 2.99.0
    Using sass-rails 3.2.6
    --- 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 /zserver/ruby/bin/bundle install

  • What did you expect to happen?

    I expected Bundler to...

  • What happened instead?

    Instead, what happened was...

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

    I tried...

  • Have you read our issues document, https://github.com/bundler/bundler/blob/master/doc/contributing/ISSUES.md?

    ...

Backtrace

fatal: No live threads left. Deadlock?
  /zserver/ruby/lib/ruby/gems/2.3.0/gems/bundler-1.14.6/lib/bundler/worker.rb:43:in `pop'
  /zserver/ruby/lib/ruby/gems/2.3.0/gems/bundler-1.14.6/lib/bundler/worker.rb:43:in `deq'
  /zserver/ruby/lib/ruby/gems/2.3.0/gems/bundler-1.14.6/lib/bundler/installer/parallel_installer.rb:131:in `process_specs'
  /zserver/ruby/lib/ruby/gems/2.3.0/gems/bundler-1.14.6/lib/bundler/installer/parallel_installer.rb:102:in `call'
  /zserver/ruby/lib/ruby/gems/2.3.0/gems/bundler-1.14.6/lib/bundler/installer/parallel_installer.rb:77:in `call'
  /zserver/ruby/lib/ruby/gems/2.3.0/gems/bundler-1.14.6/lib/bundler/installer.rb:199:in `install_in_parallel'
  /zserver/ruby/lib/ruby/gems/2.3.0/gems/bundler-1.14.6/lib/bundler/installer.rb:166:in `install'
  /zserver/ruby/lib/ruby/gems/2.3.0/gems/bundler-1.14.6/lib/bundler/installer.rb:80:in `run'
  /zserver/ruby/lib/ruby/gems/2.3.0/gems/bundler-1.14.6/lib/bundler/installer.rb:24:in `install'
  /zserver/ruby/lib/ruby/gems/2.3.0/gems/bundler-1.14.6/lib/bundler/cli/install.rb:70:in `run'
  /zserver/ruby/lib/ruby/gems/2.3.0/gems/bundler-1.14.6/lib/bundler/cli.rb:181:in `block in install'
  /zserver/ruby/lib/ruby/gems/2.3.0/gems/bundler-1.14.6/lib/bundler/settings.rb:99:in `temporary'
  /zserver/ruby/lib/ruby/gems/2.3.0/gems/bundler-1.14.6/lib/bundler/cli.rb:180:in `install'
  /zserver/ruby/lib/ruby/gems/2.3.0/gems/bundler-1.14.6/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
  /zserver/ruby/lib/ruby/gems/2.3.0/gems/bundler-1.14.6/lib/bundler/vendor/thor/lib/thor/invocation.rb:126:in `invoke_command'
  /zserver/ruby/lib/ruby/gems/2.3.0/gems/bundler-1.14.6/lib/bundler/vendor/thor/lib/thor.rb:359:in `dispatch'
  /zserver/ruby/lib/ruby/gems/2.3.0/gems/bundler-1.14.6/lib/bundler/cli.rb:20:in `dispatch'
  /zserver/ruby/lib/ruby/gems/2.3.0/gems/bundler-1.14.6/lib/bundler/vendor/thor/lib/thor/base.rb:440:in `start'
  /zserver/ruby/lib/ruby/gems/2.3.0/gems/bundler-1.14.6/lib/bundler/cli.rb:11:in `start'
  /zserver/ruby/lib/ruby/gems/2.3.0/gems/bundler-1.14.6/exe/bundle:32:in `block in <top (required)>'
  /zserver/ruby/lib/ruby/gems/2.3.0/gems/bundler-1.14.6/lib/bundler/friendly_errors.rb:121:in `with_friendly_errors'
  /zserver/ruby/lib/ruby/gems/2.3.0/gems/bundler-1.14.6/exe/bundle:24:in `<top (required)>'
  /zserver/ruby/bin/bundle:22:in `load'
  /zserver/ruby/bin/bundle:22:in `<main>'

Environment

Bundler   1.14.6
Rubygems  2.6.11
Ruby      2.3.1p112 (2016-04-26 revision 54768) [x86_64-linux]
GEM_HOME  /opt/tarantula/rails/vendor/bundle/ruby/2.3.0
GEM_PATH  
Git       1.7.1
Platform  x86_64-linux
OpenSSL   OpenSSL 1.0.1e 11 Feb 2013

Bundler settings

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

Any help?
Regards,
AN

@colby-swandale
Copy link
Member

This is being addressed in #5516

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)
@devanshu-m
Copy link

Hi, I am using bundler 1.15.3 and still running into the same error. Is there a work around?

@colby-swandale
Copy link
Member

@devanshu-m please open a new issue with the details of your problem.

@indirect
Copy link
Member

@devanshu-m (for instructions on what to include in a problem report, see ISSUES)

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.

4 participants