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

rvm reinstall may hang during "importing gemset" #4809

Open
kakra opened this issue Oct 29, 2019 · 3 comments
Open

rvm reinstall may hang during "importing gemset" #4809

kakra opened this issue Oct 29, 2019 · 3 comments

Comments

@kakra
Copy link
Contributor

kakra commented Oct 29, 2019

Description

I've run rvm reinstall all --force due to changing autolibs to rvm_pkg (which is needed on Gentoo lately due to OpenSSL header incompatibilities).

During the process it seemingly froze, and I had to press Ctrl+C:

ruby-2.2.2 - #gemset created /home/kakra/.rvm/gems/ruby-2.2.2@global
ruby-2.2.2 - #importing gemset /home/kakra/.rvm/gemsets/global.gems...............................................^CError running 'gemset_import_list gem-wrappers rubygems-bundler rake rvm bundler',
please read /home/kakra/.rvm/log/1572351922_ruby-2.2.2/gemsets.import.global.log

Steps to reproduce

  1. Run rvm autolibs rvm_pkg
  2. Run rvm reinstall all --force as instructed
  3. Wait for the activity indicator to seemingly hang and press Ctrl+C

Expected behavior

It should just finish the process without user interaction.

Actual behavior

When pressing Ctrl+C, it can be observed from the log that we actually interrupted an interactive user prompt: The user was asked to answer a question with yes or no.

If blindly typing "y" or "n" and hitting enter while the process seemingly hangs, we can let it continue.

ruby-2.2.2 - #removing src/ruby-2.2.2..
ruby-2.2.2 - #removing rubies/ruby-2.2.2..
Searching for binary rubies, this might take some time.
No binary rubies available for: gentoo/base-2.6/x86_64/ruby-2.2.2.
Continuing with compilation. Please read 'rvm help mount' to get more information on binary rubies.                                                                                                                  
Checking requirements for rvm_pkg.

Warning, you are using 'rvm autolibs rvm_pkg', this is rarely used and can produce errors,                                                                                                                           
make sure to report any problems to https://github.com/rvm/rvm/issues                                                                                                                                                


(pkg-config:11754): GLib-CRITICAL **: 13:25:28.745: g_string_insert_len: assertion 'len == 0 || val != NULL' failed

(pkg-config:11769): GLib-CRITICAL **: 13:25:30.055: g_string_insert_len: assertion 'len == 0 || val != NULL' failed

(pkg-config:11791): GLib-CRITICAL **: 13:25:30.130: g_string_insert_len: assertion 'len == 0 || val != NULL' failed

(pkg-config:11797): GLib-CRITICAL **: 13:25:30.159: g_string_insert_len: assertion 'len == 0 || val != NULL' failed

(pkg-config:11803): GLib-CRITICAL **: 13:25:30.187: g_string_insert_len: assertion 'len == 0 || val != NULL' failed

(pkg-config:11809): GLib-CRITICAL **: 13:25:30.214: g_string_insert_len: assertion 'len == 0 || val != NULL' failed
Requirements installation successful.
Installing Ruby from source to: /home/kakra/.rvm/rubies/ruby-2.2.2, this may take a while depending on your cpu(s)...
ruby-2.2.2 - #downloading ruby-2.2.2, this may take a while depending on your connection...
ruby-2.2.2 - #extracting ruby-2.2.2 to /home/kakra/.rvm/src/ruby-2.2.2.....
ruby-2.2.2 - #applying patch /home/kakra/.rvm/patches/ruby/2.2.2/fix_installing_bundled_gems.patch.
ruby-2.2.2 - #applying patch /home/kakra/.rvm/patches/ruby/2.2.2/openssl3.patch.
ruby-2.2.2 - #configuring.........................................................
ruby-2.2.2 - #post-configuration..
ruby-2.2.2 - #compiling.............................................................................................................................................................................................|
ruby-2.2.2 - #installing................
ruby-2.2.2 - #making binaries executable..
ruby-2.2.2 - #downloading rubygems-3.0.6
ruby-2.2.2 - #extracting rubygems-3.0.6......
ruby-2.2.2 - #removing old rubygems........
ruby-2.2.2 - #installing rubygems-3.0.6...............................................
ruby-2.2.2 - #gemset created /home/kakra/.rvm/gems/ruby-2.2.2@global
ruby-2.2.2 - #importing gemset /home/kakra/.rvm/gemsets/global.gems...............................................^CError running 'gemset_import_list gem-wrappers rubygems-bundler rake rvm bundler',
please read /home/kakra/.rvm/log/1572351922_ruby-2.2.2/gemsets.import.global.log
ruby-2.2.2 - #generating global wrappers................
ruby-2.2.2 - #gemset created /home/kakra/.rvm/gems/ruby-2.2.2
ruby-2.2.2 - #importing gemsetfile /home/kakra/.rvm/gemsets/default.gems evaluated to empty gem list
ruby-2.2.2 - #generating default wrappers................
ruby-2.2.2 - #adjusting #shebangs for (gem irb erb ri rdoc testrb rake).
Install of ruby-2.2.2 - #complete 

gemsets.import.global.log

Environment info

ruby-2.2.4:

  system:
    uname:        "Linux arbeitsplatz1 5.2.20-gentoo #2 SMP Tue Oct 15 13:35:51 CEST 2019 x86_64 Intel(R) Core(TM) i5-3470 CPU @ 3.20GHz GenuineIntel GNU/Linux"
    name:         "Gentoo"
    version:      "base-2.6"
    architecture: "x86_64"
    bash:         "/bin/bash => GNU bash, Version 4.4.23(1)-release (x86_64-pc-linux-gnu)"
    zsh:          "/bin/zsh => zsh 5.6.2 (x86_64-pc-linux-gnu)"
    remote_path:  "gentoo/base-2.6/x86_64"

  rvm:
    version:      "1.29.9 (latest)"
    updated:      "4 hours 10 minutes 47 seconds ago"
    path:         "/home/kakra/.rvm"
    autolibs:     "[rvm_pkg] Allow RVM to use package manager if found, install missing dependencies, install package manager (only OS X)."

  ruby:
    interpreter:  "ruby"
    version:      "2.2.4p230"
    date:         "2015-12-16"
    platform:     "x86_64-linux"
    patchlevel:   "2015-12-16 revision 53155"
    full_version: "ruby 2.2.4p230 (2015-12-16 revision 53155) [x86_64-linux]"

  homes:
    gem:          "/home/kakra/.rvm/gems/ruby-2.2.4"
    ruby:         "not set"

  binaries:
    ruby:         "/home/kakra/.rvm/rubies/ruby-2.2.4/bin/ruby"
    irb:          "/home/kakra/.rvm/rubies/ruby-2.2.4/bin/irb"
    gem:          "/home/kakra/.rvm/rubies/ruby-2.2.4/bin/gem"
    rake:         "/home/kakra/.rvm/gems/ruby-2.2.4/bin/rake"

  environment:
    PATH:         "/home/kakra/.rvm/gems/ruby-2.2.4/bin:/home/kakra/.rvm/gems/ruby-2.2.4@global/bin:/home/kakra/.rvm/rubies/ruby-2.2.4/bin:/home/kakra/.rvm/bin:/usr/lib/llvm/8/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/bin:/usr/lib64/subversion/bin"
    GEM_HOME:     "/home/kakra/.rvm/gems/ruby-2.2.4"
    GEM_PATH:     "/home/kakra/.rvm/gems/ruby-2.2.4:/home/kakra/.rvm/gems/ruby-2.2.4@global"
    MY_RUBY_HOME: ""
    IRBRC:        ""
    RUBYOPT:      ""
    gemset:       ""
@kjalnes
Copy link

kjalnes commented Nov 15, 2019

Wow, I actually got the same issue above with this hanging on ruby-2.3.3 - #importing gemset .../global.gems - please wait, but then typing y into the ether and hitting enter caused the process to continue

@kakra
Copy link
Contributor Author

kakra commented Nov 15, 2019

Do you also use autolibs rvm_pkg?

@Gengar003
Copy link

Gengar003 commented Jun 8, 2021

I am encountering this in an unattended script - it spends ~15 minutes waiting here before continuing. There is no interactivity, so there is no way for a human to press 'y + enter'.

yes | rvm install .... doesn't seem fix it in a script, as the solution here suggests might work.

Is there a way to tell rvm itself to not ask the question? Or some other trick to have a script "press y and then enter" at the right moment?

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

3 participants