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

Combination of ruby-1.9.3-p286, passenger-enterprise 4.0.5 and rvm 1.25.17 creates endless pid spawn #2603

Closed
everestx opened this issue Feb 6, 2014 · 13 comments

Comments

@everestx
Copy link

everestx commented Feb 6, 2014

Recently I upgraded to rvm version 1.25.17 from 1.24.8 and I got very erratic behavior. I'm guessing it's related to the use of gem-wrappers in the new version of rvm.

The combination of ruby-1.9.3-p286 and passenger-enterprise 4.0.5 worked just fine with rvm 1.28.4, but with rvm version 1.25.17, passenger appears to spawn child processes indefinitely.

See this snippet from the process listing, where passenger fails to startup a ruby app and eventually crashes apache. Note that this occurred for every child 'httpd' process that the parent 'httpd' process started up.

root       547     1  /usr/sbin/httpd
root       585   547   \_ PassengerWatchdog
apache     590   585   |   \_ PassengerHelperAgent
apache     655   590   |   |   \_ bash -lc exec "$@" SpawnPreparerShell /usr/local/rvm/gems/ruby-1.9.3-p286/gems/passenger-enterprise-server-4.0.5/
apache     794   655   |   |   |   \_ bash -lc exec "$@" SpawnPreparerShell /usr/local/rvm/gems/ruby-1.9.3-p286/gems/passenger-enterprise-server-4.
apache     816   794   |   |   |       \_ bash -lc exec "$@" SpawnPreparerShell /usr/local/rvm/gems/ruby-1.9.3-p286/gems/passenger-enterprise-serve
apache     838   816   |   |   |           \_ bash -lc exec "$@" SpawnPreparerShell /usr/local/rvm/gems/ruby-1.9.3-p286/gems/passenger-enterprise-s
apache     864   838   |   |   |               \_ bash -lc exec "$@" SpawnPreparerShell /usr/local/rvm/gems/ruby-1.9.3-p286/gems/passenger-enterpri
apache     886   864   |   |   |                   \_ bash -lc exec "$@" SpawnPreparerShell /usr/local/rvm/gems/ruby-1.9.3-p286/gems/passenger-ente
apache     910   886   |   |   |                       \_ bash -lc exec "$@" SpawnPreparerShell /usr/local/rvm/gems/ruby-1.9.3-p286/gems/passenger-
apache     934   910   |   |   |                           \_ bash -lc exec "$@" SpawnPreparerShell /usr/local/rvm/gems/ruby-1.9.3-p286/gems/passen
apache     956   934   |   |   |                               \_ bash -lc exec "$@" SpawnPreparerShell /usr/local/rvm/gems/ruby-1.9.3-p286/gems/pa
apache     978   956   |   |   |                                   \_ bash -lc exec "$@" SpawnPreparerShell /usr/local/rvm/gems/ruby-1.9.3-p286/gem
apache    1063   978   |   |   |                                       \_ bash -lc exec "$@" SpawnPreparerShell /usr/local/rvm/gems/ruby-1.9.3-p286
apache    1086  1063   |   |   |                                           \_ bash -lc exec "$@" SpawnPreparerShell /usr/local/rvm/gems/ruby-1.9.3-
apache    1108  1086   |   |   |                                               \_ bash -lc exec "$@" SpawnPreparerShell /usr/local/rvm/gems/ruby-1.
apache    1132  1108   |   |   |                                                   \_ bash -lc exec "$@" SpawnPreparerShell /usr/local/rvm/gems/rub
apache    1156  1132   |   |   |                                                       \_ bash -lc exec "$@" SpawnPreparerShell /usr/local/rvm/gems
apache    1180  1156   |   |   |                                                           \_ bash -lc exec "$@" SpawnPreparerShell /usr/local/rvm/
apache    1202  1180   |   |   |                                                               \_ bash -lc exec "$@" SpawnPreparerShell /usr/local/
apache    1228  1202   |   |   |                                                                   \_ bash -lc exec "$@" SpawnPreparerShell /usr/lo
apache    1252  1228   |   |   |                                                                       \_ bash -lc exec "$@" SpawnPreparerShell /us
apache    1279  1252   |   |   |                                                                           \_ bash -lc exec "$@" SpawnPreparerShell
apache    1303  1279   |   |   |                                                                               \_ bash -lc exec "$@" SpawnPreparerS
apache    1327  1303   |   |   |                                                                                   \_ bash -lc exec "$@" SpawnPrepa
apache    1351  1327   |   |   |                                                                                       \_ bash -lc exec "$@" SpawnP
@mpapis
Copy link
Member

mpapis commented Feb 7, 2014

  1. show me your passenger config
  2. show the ruby script used and the environment file mentioned in it

gist it if it is longer then few lines

@mpapis
Copy link
Member

mpapis commented Feb 23, 2014

closing as there was no feedback in over 2 weeks, please let me know if you can provide details and I will reopen

@everestx
Copy link
Author

Hi there, I totally forgot about your request for feedback. I've created a Gist, which I think gives you what you're asking for. Did I miss anything?

https://gist.github.com/everestx/7aa392b039c2ad446d8a

@mpapis mpapis reopened this Feb 24, 2014
@mpapis
Copy link
Member

mpapis commented Feb 28, 2014

show the /usr/local/rvm/wrappers/ruby-1.9.3-p286/ruby and the environment file mentioned in it

@everestx
Copy link
Author

Hi There:

/usr/local/rvm/wrappers/ruby-1.9.3-p286/ruby

#!/usr/bin/env bash

if [[ -s "/usr/local/rvm/environments/ruby-1.9.3-p286" ]]
then
  source "/usr/local/rvm/environments/ruby-1.9.3-p286"
  exec ruby "$@"
else
  echo "ERROR: Missing RVM environment file: '/usr/local/rvm/environments/ruby-1.9.3-p286'" >&2
  exit 1
fi

and /usr/local/rvm/environments/ruby-1.9.3-p286

export PATH ; PATH="/usr/local/rvm/gems/ruby-1.9.3-p286/bin:/usr/local/rvm/gems/ruby-1.9.3-p286@global/bin:/usr/local/rvm/rubies/ruby-1.9.3-p286/bin:/usr/local/rvm/bin:$PATH"
export rvm_env_string ; rvm_env_string='ruby-1.9.3-p286'
export rvm_path ; rvm_path='/usr/local/rvm'
export rvm_ruby_string ; rvm_ruby_string='ruby-1.9.3-p286'
unset rvm_gemset_name
export RUBY_VERSION ; RUBY_VERSION='ruby-1.9.3-p286'
export GEM_HOME ; GEM_HOME='/usr/local/rvm/gems/ruby-1.9.3-p286'
export GEM_PATH ; GEM_PATH='/usr/local/rvm/gems/ruby-1.9.3-p286:/usr/local/rvm/gems/ruby-1.9.3-p286@global'
export MY_RUBY_HOME ; MY_RUBY_HOME='/usr/local/rvm/rubies/ruby-1.9.3-p286'
export IRBRC ; IRBRC='/usr/local/rvm/rubies/ruby-1.9.3-p286/.irbrc'
unset MAGLEV_HOME
unset RBXOPT

@mpapis
Copy link
Member

mpapis commented Feb 28, 2014

this looks good, the other thing I see here is bash -lc exec, can you run:

rvm get stable --auto-dotfiles --debug

and show me all output (gist it)

@everestx
Copy link
Author

This is a pseudo-production host, so can't do it at the moment. I'll get back to you.

@kassi
Copy link

kassi commented Mar 18, 2014

I ran into the exact same problem. Here's my gist.

At least for me it looks like it's a permission problem after upgrading rvm (see log).
Now I'm figuring out how to better set the users/permissions.
rvm has been installed as root.

@mpapis
Copy link
Member

mpapis commented Mar 18, 2014

hmm, maybe try rvm fix-permissions?

@digininja
Copy link

that says it set a few permissions but didn't change anything to do with
the rvm get head. The bug is in the script and the way it is calling sed,
not in the installed app, that is why it caused the problem on the very
first install as well as the upgrades.

On 18 March 2014 17:10, Michal Papis [email protected] wrote:

hmm, maybe try rvm fix-permissions?

Reply to this email directly or view it on GitHubhttps://github.com//issues/2603#issuecomment-37959879
.

@eriko
Copy link

eriko commented May 30, 2014

Has this been fixed? I seem to have run into it with rvm 1.25.26 (stable) and a new install of ruby-2.0.0-p451 .

Him a missing gemset for the newly installed ruby was causing it for me.

@digininja
Copy link

It was fixed in the cases where I had a problem.
On 30 May 2014 02:34, "Erik Ordway" [email protected] wrote:

Has this been fixed? I seem to have run into it with rvm 1.25.26 (stable)
and a new install of ruby-2.0.0-p451 .


Reply to this email directly or view it on GitHub
#2603 (comment).

@mpapis
Copy link
Member

mpapis commented Jun 25, 2014

I assume this is fixed, if anyone else hits such problem please open a new ticket with details of the problem.

@mpapis mpapis closed this as completed Jun 25, 2014
@pkuczynski pkuczynski added this to the rvm-1.27.0-before milestone May 8, 2019
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

6 participants