Bundler 1.3.2 throws an exception if Gemfile.lock is not exists #2205

Closed
hron84 opened this Issue Mar 15, 2013 · 6 comments

Projects

None yet

4 participants

@hron84
hron84 commented Mar 15, 2013

I experienced the following exception if Gemfile.lock is missing If it is contains some data (even if it is outdated) the exception does not raises.

      Unfortunately, a fatal error has occurred. Please see the Bundler
      troubleshooting documentation at http://bit.ly/bundler-issues. Thanks!
An exception occurred running /home/hron/.rvm/gems/rbx-head@jbsocial/bin/ruby_noexec_wrapper
    SystemStackError (SystemStackError)

Backtrace:
                                        Kernel(String)#respond_to? at kernel/bootstrap/kernel19.rb:36
                                                        String#<=> at kernel/common/string.rb:86
                                                        String#<=> at kernel/common/string.rb:87 (25092 times)
                                     Enumerable::SortedElement#<=> at kernel/common/enumerable.rb:44
                                                      Array#isort! at kernel/common/array.rb:1238
                                        Array#sort! (sort_inplace) at kernel/common/array.rb:934
                                         Enumerable(Array)#sort_by at kernel/common/enumerable.rb:58
                                 Bundler::SpecSet#tsort_each_child at /home/hron/.rvm/gems/rbx-head@global/gems/bundler-1.3.2/lib/bundler/spec_set.rb:133
    TSort(Bundler::SpecSet)#each_strongly_connected_component_from at /home/hron/.rvm/rubies/rbx-head/lib/19/tsort.rb:203
  { } in TSort(Bundler::SpecSet)#each_strongly_connected_component at /home/hron/.rvm/rubies/rbx-head/lib/19/tsort.rb:182
                           { } in Bundler::SpecSet#tsort_each_node at /home/hron/.rvm/gems/rbx-head@global/gems/bundler-1.3.2/lib/bundler/spec_set.rb:129
                                                        Array#each at kernel/bootstrap/array.rb:68
                                  Bundler::SpecSet#tsort_each_node at /home/hron/.rvm/gems/rbx-head@global/gems/bundler-1.3.2/lib/bundler/spec_set.rb:129
         TSort(Bundler::SpecSet)#each_strongly_connected_component at /home/hron/.rvm/rubies/rbx-head/lib/19/tsort.rb:180
                                TSort(Bundler::SpecSet)#tsort_each at /home/hron/.rvm/rubies/rbx-head/lib/19/tsort.rb:148
                                     TSort(Bundler::SpecSet)#tsort at /home/hron/.rvm/rubies/rbx-head/lib/19/tsort.rb:135
                                           Bundler::SpecSet#sorted at /home/hron/.rvm/gems/rbx-head@global/gems/bundler-1.3.2/lib/bundler/spec_set.rb:112
                                             Bundler::SpecSet#each at /home/hron/.rvm/rubies/rbx-head/lib/19/forwardable.rb:182
                    Enumerable(Bundler::SpecSet)#select (find_all) at kernel/common/enumerable.rb:240
                                { } in Bundler::Definition#to_lock at /home/hron/.rvm/gems/rbx-head@global/gems/bundler-1.3.2/lib/bundler/definition.rb:248
                                                        Array#each at kernel/bootstrap/array.rb:68
                                       Bundler::Definition#to_lock at /home/hron/.rvm/gems/rbx-head@global/gems/bundler-1.3.2/lib/bundler/definition.rb:244
                                          Bundler::Definition#lock at /home/hron/.rvm/gems/rbx-head@global/gems/bundler-1.3.2/lib/bundler/definition.rb:220
                     Bundler::Environment(Bundler::Installer)#lock at /home/hron/.rvm/gems/rbx-head@global/gems/bundler-1.3.2/lib/bundler/environment.rb:34
                                            Bundler::Installer#run at /home/hron/.rvm/gems/rbx-head@global/gems/bundler-1.3.2/lib/bundler/installer.rb:94
                                        Bundler::Installer.install at /home/hron/.rvm/gems/rbx-head@global/gems/bundler-1.3.2/lib/bundler/installer.rb:14
                                              Bundler::CLI#install at /home/hron/.rvm/gems/rbx-head@global/gems/bundler-1.3.2/lib/bundler/cli.rb:248
                                                    Thor::Task#run at /home/hron/.rvm/gems/rbx-head@global/gems/bundler-1.3.2/lib/bundler/vendor/thor/task.rb:27
                        Thor::Invocation(Bundler::CLI)#invoke_task at /home/hron/.rvm/gems/rbx-head@global/gems/bundler-1.3.2/lib/bundler/vendor/thor/invocation.rb:120
                                                     Thor.dispatch at /home/hron/.rvm/gems/rbx-head@global/gems/bundler-1.3.2/lib/bundler/vendor/thor.rb:344
                             Thor::Base::ClassMethods(Class)#start at /home/hron/.rvm/gems/rbx-head@global/gems/bundler-1.3.2/lib/bundler/vendor/thor/base.rb:434
                                          { } in Object#__script__ at /home/hron/.rvm/gems/rbx-head@global/gems/bundler-1.3.2/bin/bundle:20
                                      Bundler.with_friendly_errors at /home/hron/.rvm/gems/rbx-head@global/gems/bundler-1.3.2/lib/bundler/friendly_errors.rb:3
                                                 Object#__script__ at /home/hron/.rvm/gems/rbx-head@global/gems/bundler-1.3.2/bin/bundle:20
                                               Kernel(Object)#load at kernel/common/kernel.rb:586
                                          { } in Object#__script__ at /home/hron/.rvm/gems/rbx-head@global/bin/bundle:19
                       Rubinius::BlockEnvironment#call_on_instance at kernel/common/block_environment.rb:75
                                               Kernel(Object)#eval at kernel/common/eval.rb:75
                                                 Object#__script__ at /home/hron/.rvm/gems/rbx-head@jbsocial/bin/ruby_noexec_wrapper:14
                                  Rubinius::CodeLoader#load_script at kernel/delta/codeloader.rb:68
                                  Rubinius::CodeLoader.load_script at kernel/delta/codeloader.rb:118
                                           Rubinius::Loader#script at kernel/loader.rb:615
                                             Rubinius::Loader#main at kernel/loader.rb:816

Under MRI 1.8.7, 1.9.3 no problems appear.

Please kindly investigate this issue. Thanks.

Contributor
Gibheer commented Mar 15, 2013

Can you please give us a way to reproduce the problem? That would help us, thank you.

hron84 commented Mar 18, 2013

Sorry I keep this issue in my mind, but currently I do not have a time to reproduce/debug it. Please bear with me.

Here's example Gemfile/Gemfile.lock pair you can use to reproduce this bug: https://gist.github.com/cheba/0c80638ca7fef38bef55

Put in in one folder and run bundle install inside.

I used bundler 1.3.4.

Owner
brixen commented Mar 19, 2013

I was able to reproduce this and created this log file for the JIT https://gist.github.com/brixen/5199143.

Running with -Xint (the JIT off) did not cause the error.

Here's a snippet of debugging output. If I p other in the debugger, it will be nil.

Using streamio-ffmpeg (0.9.0)
Using term-ansicolor (1.0.7)
Using twitter-stream (0.1.16)
Using tinder (1.9.2) from git://github.com/collectiveidea/tinder.git (at master)
true
#<Method: String#kind_of? (defined in Kernel at kernel/alpha.rb:161)>
String
#<Method: String#<=> (defined in String at kernel/common/string.rb:82)>
"activerecord"
"mongoid"
| Breakpoint: String#<=>(other) at kernel/common/string.rb:89 (107)
| 89:         Rubinius::Debugger.start

Debugging added to kernel/common/string.rb:

  def <=>(other)
    if other.kind_of?(String)
      return @data.compare_bytes(other.__data__, @num_bytes, other.bytesize)
    else
      STDERR.puts other.kind_of?(String), other.method(:kind_of?).inspect, other.class, other.method(:<=>).inspect, self.inspect, other.inspect
      if other.class.equal?(String)
        require 'rubinius/debugger'
        Rubinius::Debugger.start
      end
      return unless other.respond_to?(:to_str) && other.respond_to?(:<=>)
      return unless tmp = (other <=> self)
      return -tmp # We're not supposed to convert to integer here
    end
  end
Owner
brixen commented Mar 19, 2013

This appears to be caused by this commit 9973136. I updated this gist https://gist.github.com/brixen/5199143 with a log after reverting that commit.

@dbussink dbussink added a commit that closed this issue Mar 20, 2013
@dbussink dbussink Use call fallback when type bits check fail
When an object is inflated, the type bits check fails, so we have to
fallback to the helper function. In the future we should make it so that
type bits are in the object header, even for inflated objects.

Fixes #2205
fbc9754
@dbussink dbussink closed this in fbc9754 Mar 20, 2013
hron84 commented Mar 22, 2013

@cheba thanks for helping in this issue

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