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

gem install GEM --development loops endlessly #372

Closed
cldwalker opened this issue Sep 13, 2012 · 7 comments
Closed

gem install GEM --development loops endlessly #372

cldwalker opened this issue Sep 13, 2012 · 7 comments

Comments

@cldwalker
Copy link
Contributor

Using --development on install seems to loop endlessly and eventually maxes out the CPU

# Also tried install with other gems i.e. boson
$ gem install datomic-client --development --debug
Exception `NameError' at /Users/bozo/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/command_manager.rb:177 - uninitialized constant Gem::Commands::InstallCommand
Exception `Errno::EAGAIN' at /Users/bozo/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/net/protocol.rb:141 - Resource temporarily unavailable - read would block
Exception `Errno::EAGAIN' at /Users/bozo/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/net/protocol.rb:141 - Resource temporarily unavailable - read would block
Exception `Errno::EAGAIN' at /Users/bozo/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/net/protocol.rb:141 - Resource temporarily unavailable - read would block
Exception `Errno::EAGAIN' at /Users/bozo/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/net/protocol.rb:141 - Resource temporarily unavailable - read would block
Exception `Errno::EAGAIN' at /Users/bozo/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/net/protocol.rb:141 - Resource temporarily unavailable - read would block
Exception `Errno::EAGAIN' at /Users/bozo/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/net/protocol.rb:141 - Resource temporarily unavailable - read would block
Exception `Errno::EAGAIN' at /Users/bozo/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/net/protocol.rb:141 - Resource temporarily unavailable - read would block
Exception `Errno::EAGAIN' at /Users/bozo/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/net/protocol.rb:141 - Resource temporarily unavailable - read would block
Exception `Errno::EAGAIN' at /Users/bozo/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/net/protocol.rb:141 - Resource temporarily unavailable - read would block
Exception `Errno::EAGAIN' at /Users/bozo/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/net/protocol.rb:141 - Resource temporarily unavailable - read would block
Exception `Errno::EAGAIN' at /Users/bozo/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/net/protocol.rb:141 - Resource temporarily unavailable - read would block
Exception `Errno::EAGAIN' at /Users/bozo/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/net/protocol.rb:141 - Resource temporarily unavailable - read would block
Exception `Errno::EAGAIN' at /Users/bozo/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/net/protocol.rb:141 - Resource temporarily unavailable - read would block
Exception `Errno::EAGAIN' at /Users/bozo/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/net/protocol.rb:141 - Resource temporarily unavailable - read would block
Exception `Errno::EAGAIN' at /Users/bozo/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/net/protocol.rb:141 - Resource temporarily unavailable - read would block
Exception `Errno::EAGAIN' at /Users/bozo/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/net/protocol.rb:141 - Resource temporarily unavailable - read would block
Exception `Errno::EAGAIN' at /Users/bozo/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/net/protocol.rb:141 - Resource temporarily unavailable - read would block
Exception `Errno::EAGAIN' at /Users/bozo/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/net/protocol.rb:141 - Resource temporarily unavailable - read would block
Exception `Errno::EAGAIN' at /Users/bozo/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/net/protocol.rb:141 - Resource temporarily unavailable - read would block
Exception `Errno::EEXIST' at /Users/bozo/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/fileutils.rb:247 - File exists - /Users/bozo/.gem/specs/rubygems.org%80
Exception `Errno::EAGAIN' at /Users/bozo/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/net/protocol.rb:141 - Resource temporarily unavailable - read would block
Exception `Errno::EAGAIN' at /Users/bozo/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/net/protocol.rb:141 - Resource temporarily unavailable - read would block
Exception `Errno::EAGAIN' at /Users/bozo/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/net/protocol.rb:141 - Resource temporarily unavailable - read would block
Exception `Errno::EEXIST' at /Users/bozo/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/fileutils.rb:247 - File exists - /Users/bozo/.gem/specs/rubygems.org%80/quick/Marshal.4.8
Exception `Errno::EAGAIN' at /Users/bozo/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/net/protocol.rb:141 - Resource temporarily unavailable - read would block
Exception `Errno::EAGAIN' at /Users/bozo/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/net/protocol.rb:141 - Resource temporarily unavailable - read would block
Exception `Errno::EEXIST' at /Users/bozo/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/fileutils.rb:247 - File exists - /Users/bozo/.gem/specs/rubygems.org%80/quick/Marshal.4.8
Exception `Errno::EAGAIN' at /Users/bozo/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/net/protocol.rb:141 - Resource temporarily unavailable - read would block
Exception `Errno::EAGAIN' at /Users/bozo/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/net/protocol.rb:141 - Resource temporarily unavailable - read would block
Exception `Errno::EEXIST' at /Users/bozo/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/fileutils.rb:247 - File exists - /Users/bozo/.gem/specs/rubygems.org%80/quick/Marshal.4.8
Exception `Errno::EAGAIN' at /Users/bozo/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/net/protocol.rb:141 - Resource temporarily unavailable - read would block
Exception `Errno::EAGAIN' at /Users/bozo/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/net/protocol.rb:141 - Resource temporarily unavailable - read would block
Exception `Errno::EEXIST' at /Users/bozo/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/fileutils.rb:247 - File exists - /Users/bozo/.gem/specs/rubygems.org%80/quick/Marshal.4.8
Exception `Errno::EAGAIN' at /Users/bozo/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/net/protocol.rb:141 - Resource temporarily unavailable - read would block
Exception `Errno::EAGAIN' at /Users/bozo/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/net/protocol.rb:141 - Resource temporarily unavailable - read would block
Exception `Errno::EEXIST' at /Users/bozo/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/fileutils.rb:247 - File exists - /Users/bozo/.gem/specs/rubygems.org%80/quick/Marshal.4.8
Exception `Errno::EAGAIN' at /Users/bozo/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/net/protocol.rb:141 - Resource temporarily unavailable - read would block
Exception `Errno::EAGAIN' at /Users/bozo/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/net/protocol.rb:141 - Resource temporarily unavailable - read would block
Exception `Errno::EEXIST' at /Users/bozo/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/fileutils.rb:247 - File exists - /Users/bozo/.gem/specs/rubygems.org%80/quick/Marshal.4.8
... # More Marshal.4.8 checks checks

My gem env:

$ gem env
RubyGems Environment:
  - RUBYGEMS VERSION: 1.8.24
  - RUBY VERSION: 1.9.3 (2012-04-20 patchlevel 194) [x86_64-darwin10.8.0]
  - INSTALLATION DIRECTORY: /Users/bozo/.rvm/gems/ruby-1.9.3-p194
  - RUBY EXECUTABLE: /Users/bozo/.rvm/rubies/ruby-1.9.3-p194/bin/ruby
  - EXECUTABLE DIRECTORY: /Users/bozo/.rvm/gems/ruby-1.9.3-p194/bin
  - RUBYGEMS PLATFORMS:
    - ruby
    - x86_64-darwin-10
  - GEM PATHS:
     - /Users/bozo/.rvm/gems/ruby-1.9.3-p194
     - /Users/bozo/.rvm/gems/ruby-1.9.3-p194@global
  - GEM CONFIGURATION:
     - :update_sources => true
     - :verbose => true
     - :benchmark => false
     - :backtrace => false
     - :bulk_threshold => 1000
     - "verbose" => true
     - "update_sources" => true
     - "sources" => ["http://rubygems.org"]
     - "gem" => "--no-ri --no-rdoc"
     - "bulk_threshold" => 1000
     - "backtrace" => false
     - "benchmark" => false
  - REMOTE SOURCES:
     - http://rubygems.org/

Would be great if this still worked. No need to for bundle install in gem development if --dev works.

@evanphx
Copy link
Member

evanphx commented Oct 6, 2012

I don't see a loop in your output, what is looping?

@evanphx
Copy link
Member

evanphx commented Oct 6, 2012

I'm betting it's not looping but rather installing the dev deps. Looking at it here there are A LOT of gems that get pulled in.

@cldwalker
Copy link
Contributor Author

Marshal 4.8 checks seem to be looping.

More examples that heat up my 4-core machine:

# After about a minute, I have to Control-C these
$ gem install bundler --development --debug
$ gem install bahia --development --debug

# However if I excplitly install all the runtime and development dependencies of the above gems
# I can do it in under 10s
$ gem install bundler ronn rspec
$ gem install bahia rspec open4

Shouldn't the --dev flag only be pulling in runtime and development dependencies of a given gem? Perhaps this is recursively looking into each development dependency's development dependencies? The only gem that I found to install with this flag is one without any dependencies - connection_pool

@evanphx
Copy link
Member

evanphx commented Oct 7, 2012

Please run gem install bundler --development -V and let it run for at least 5 minutes and then gist the output.

@cldwalker
Copy link
Contributor Author

$ gem install bundler --development -V > bunder.output
ERROR:  While executing gem ... (Gem::DependencyError)
    Unable to resolve dependencies: em-spec requires test-unit (>= 0); hoe-gemspec requires hoe (>= 2.2.0); hoe-git requires hoe (>= 2.2.0); hoe-bundler requires hoe (>= 2.2.0); sdoc-helpers requires sdoc (~> 0.2); test-unit-rr requires test-unit (>= 2.1.2), rr (>= 1.0.2); test-unit-notify requires test-unit (>= 2.1.2); hoe-highline requires hoe (~> 2.8); actionpack requires i18n (~> 0.5.0), rack (~> 1.2.5), rack-test (~> 0.5.7), erubis (~> 2.6.6); activemodel requires i18n (~> 0.5.0); bourne requires mocha (= 0.10.5); gem_hadar requires sdoc (~> 0.2.20)

bundler.output is at https://gist.github.com/d9cee0aab3e78ddf8f52

@drbrain
Copy link
Member

drbrain commented Nov 27, 2012

I cannot reproduce. An EAGAIN exception is not an indication anything is stuck in a loop. You may see this often on slow networks, though.

It seems there is a bug in the dependencies of datomic-client though:

$ rm -rf ~/tmp/gems; ruby20 -Ilib bin/gem install datomic-client --development -i ~/tmp/gems
Fetching: mime-types-1.19.gem (100%)
Successfully installed mime-types-1.19
Fetching: rspec-core-2.12.0.gem (100%)
Successfully installed rspec-core-2.12.0
Fetching: rspec-mocks-2.12.0.gem (100%)
Successfully installed rspec-mocks-2.12.0
Fetching: rspec-2.12.0.gem (100%)
ERROR:  Error installing datomic-client:
    rspec requires rspec-expectations (~> 2.12.0)

Please reopen if you can demonstrate a loop.

@drbrain drbrain closed this as completed Nov 27, 2012
@cldwalker
Copy link
Contributor Author

@drbrain Did you try bundler on 1.9.3? If it works for you, including the output would be helpful. 5 minutes for --development installing doesn't seem like just slow networks.

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

No branches or pull requests

3 participants