Red Hat Bugzilla – Bug 846108
passenger-status command throws exception when executed from user's application shell
Last modified: 2015-05-14 18:57:36 EDT
Created attachment 602579 [details]
passenger-status exception log
Description of problem:
When executing the passenger-status command from a user's Ruby 1.9 application shell,
an exception is thrown.
Version-Release number of selected component (if applicable):
Create a new Ruby 1.9 application, SSH into the shell, and attempt
to execute the command.
Steps to Reproduce:
1. Create a new ruby-1.9 application
2. Log in to the application's shell as the user
3. Execute 'passenger-status'
An exception is thrown (see attachment).
Typical passenger-status output.
This exception is specific to the ruby-1.9 cartridge; everything is fine
Assigning this to Troy as the passenger rpm (3.0.12) [some utilities inside it] require fastthread and daemon_controller.
To get this working I needed to run this on devenv:
root# scl enable ruby193 bash
scl# gem install fastthread
scl# gem install daemon_controller
Once those 2 gems are installed (fastthread + daemon_controller) into ruby1.9 gems, I can then ssh into my ruby-1.9 app and run 'passenger-status' or passenger-memory-stats.
Also changing sev/pri to low/low as it just affects us internally.
ruby193-rubygem-daemon_controller is already in the li repo.
All you have to do is yum install ruby193-rubygem-daemon_controller to fix that problem.
As far as fastthread, it isn't needed in ruby1.9.
"Fastthread corrected problems on Ruby 1.8 implementation of array,
mutex and synchronize.
These corrections where merged to trunk and are available under
--disable-fastthread option of configure.
Also, ruby 1.8.6 ships with these changes, so dependency of fastthread
is only required for ruby < 1.8.6"
Could you try it with only the daemon_controller and not fastthread?
I have setup my test, and you are correct, it needs both fastthread and daemon-controller.
Even more interesting, once I have them installed, if I try to remove either of them, gem tells me that it will break passenger.
I am going to try two different things and see which works best
1 - build ruby193 passenger so that it doesn't require fastthread
2 - build ruby193 fastthread (I've already tried and failed for this, but I could try again)
So, in the end, it looks like building ruby193-rubygem-fastthread worked the best.
I have created
And tagged it into the libra-candidate repo. I think they've already pushed the candidate repo for tonight, so it should go in tomorrow night.
A few things to note, because they were interesting.
1 - In a pure ruby 1.9 enviroment, gem does not build the native fastthread.so library. I guess it knows it isn't needed or something.
2 - This non-building of the native library was what was breaking the rpmbuilds I was working on before.
3 - rubygem-passenger, in the scl enviroment, doesn't seem to care that the native fastthread.so library is not there. It just cares that the gem is installed.
So now the question is, what do you think should be pulling in ruby193-rubygem-fastthread and ruby193-rubygem-daemon_controller ?
cartridge-ruby-1.9.spec should be pulling them in?
Thanks Troy -- that was quick.
Yup, the ruby-1.9 cartridge spec should pull that in.
I'll take care of that + take ownership of this bug.
Waiting for pull request to get merged https://github.com/openshift/crankcase/pull/401
Merged and in devenv_2024
Verified on INT
1.Create a ruby-1.9 application
2.ssh into application
[r19-jhou.int.rhcloud.com ~]\> passenger-status
----------- General information -----------
max = 6
count = 0
active = 0
inactive = 0
Waiting on global queue: 0
----------- Application groups -----------
No exception is thrown.
Adding a workaround as the issue exists on PROD until the next release rolls out. So if someone's looking at bug in the interim:
A workaround for now, might be to ssh into your app and do something like:
GEM_HOME=$OPENSHIFT_DATA_DIR gem install fastthread daemon_controller