Bug 843337 - Can't do thread dump success for ruby1.8 and ruby1.9 application
Can't do thread dump success for ruby1.8 and ruby1.9 application
Product: OpenShift Origin
Classification: Red Hat
Component: Containers (Show other bugs)
Unspecified Unspecified
medium Severity medium
: ---
: ---
Assigned To: Rob Millner
libra bugs
: Regression, Triaged
Depends On:
  Show dependency treegraph
Reported: 2012-07-26 00:51 EDT by Rony Gong
Modified: 2015-05-14 18:57 EDT (History)
6 users (show)

See Also:
Fixed In Version: devenv_1920
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2012-08-07 16:43:02 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Rony Gong 2012-07-26 00:51:08 EDT
Description of problem:
Can't do thread dump success for ruby1.8 and ruby1.9 application

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1.Create ruby1.8 or ruby-1.9 app
2.Then use: rhc app threaddump -a ruby
Actual results:
[root@localhost mytest]# rhc app threaddump -a qruby18


Expected results:
Could show like

The thread dump file will be available via: rhc app tail -a qjboss -f qjboss/jbossas-7/standalone/tmp/qjboss.log -o '-n 250'

Additional info:
log from development.log
Started POST "/broker/cartridge" for at Thu Jul 26 00:40:50 -0400 2012
  Processing by LegacyBrokerController#cartridge_post as 
  Parameters: {"json_data"=>"{\"api\":\"1.1.3\",\"action\":\"threaddump\",\"rhlogin\":\"qgong@redhat.com\",\"app_name\":\"qsruby19\"}", "password"=>"[FILTERED]"}
User-Agent = ''
MongoDataStore.find(CloudUser, qgong@redhat.com, qgong@redhat.com)

DEBUG: rpc_exec_direct: rpc_client=#<MCollective::RPC::Client:0x7f973100cf10>
DEBUG: rpc_client.custom_request('cartridge_do', {:action=>"threaddump", :cartridge=>"ruby-1.9", :args=>"'qsruby19' 'qgong6' '17c6263a074d45b1a73fd0e2d672d893'"}, @id, {'identity' => @id})
DEBUG: [#<MCollective::RPC::Result:0x7f97313cf4b8 @action="cartridge_do", @results={:statuscode=>0, :statusmsg=>"OK", :data=>{:exitcode=>0, :output=>"/usr/libexec/stickshift/cartridges/ruby-1.9/info/bin/threaddump.sh: line 17: [5142: command not found\n/usr/libexec/stickshift/cartridges/ruby-1.9/info/hooks/threaddump: line 39: [17c6263a074d45b1a73fd0e2d672d893: command not found\nCLIENT_RESULT:  17c6263a074d45b1a73fd0e2d672d893\n17c6263a074d45b1a73fd0e2d672d893\n"}, :sender=>"ip-10-28-203-164"}, @agent="stickshift">]
DEBUG: Cartridge command ruby-1.9::threaddump exitcode = 0
[REQ_ID=67057b0dc1e143f9b4d19efce0910870] ACTION=LEGACY_CARTRIDGE_POST Processed event threaddump for application qsruby19
Completed 200 OK in 776ms (Views: 1.8ms)

jbossas and jbosseap work well.
Comment 1 John Poelstra 2012-07-27 14:39:55 EDT
pull request in process
Comment 3 Rob Millner 2012-07-27 19:52:57 EDT
Pull requests accepted.
Comment 4 Rony Gong 2012-07-30 01:51:03 EDT
Reopen it on devenv_1920, Since the thread dump still can't work, now it works as below, I have accessed the app, but still show thread dump error.
[root@localhost non_scalable]# rhc app status -a redmine

Total Accesses: 16
Total kBytes: 317
Uptime: 3071
ReqPerSec: .00521003
BytesPerSec: 105.701
BytesPerReq: 20288
BusyWorkers: 1
IdleWorkers: 1
Scoreboard: _W...

[root@localhost non_scalable]# rhc app threaddump -a redmine

 Application is inactive. Ruby/Rack applications must be accessed by their URL (http://redmine-qgong1.dev.rhcloud.com) before you can take a thread dump.
Comment 5 Dan McPherson 2012-07-31 13:24:00 EDT
This error is saying you must hit your app's url (http://redmine-qgong1.dev.rhcloud.com) before you can thread dump it.  This is required for the threads to be running for your application so there is something to threaddump.

I tried an example and this works fine.  If there is another issue and I am missing it please reopen.
Comment 6 Rony Gong 2012-07-31 21:35:01 EDT
This error pass on devenv_1923, but didn't pass on INT, so let this bug wait for new patch to INT.
Now in INT:
[root@localhost mytest]# rhc app threaddump -a q11ruby19
1Password: ******

Comment 7 joycezhang 2012-08-03 03:25:37 EDT
This issue is still reproduced with current stg env, but it works well with devenv-stage_228. 

Here's the result for your reference:

On stage: (This issue is still reproduced.)
# rhc app threaddump -a ruby19 -p redhat


On devenv-stage_228: (This issue doesn't exist)
#rhc app threaddump -a ruby19 -p redhat


The thread dump file will be available via: rhc app tail -a ruby19 -f ruby19/logs/error_log-20120803-000000-EST -o '-n 250'

So assign it back. Thanks.
Comment 8 Rob Millner 2012-08-03 16:52:49 EDT
The namespace.init file was being maintained separate.  Had to provide instructions via the release ticket to update the file.
Comment 9 Thomas Wiest 2012-08-03 17:59:49 EDT
The fix has been pushed to both INT and STG.

Please test it in both.

The fix is part of the release ticket and so will be pushed when we do the PROD push.
Comment 10 Rony Gong 2012-08-05 22:07:39 EDT
Verified on INT and STG
[root@localhost mytest]# rhc app threaddump -a qruby18
Password: ******


The thread dump file will be available via: rhc app tail -a qruby18 -f qruby18/logs/error_log-20120806-000000-EST -o '-n 250'

[root@localhost rhc]# rhc app threaddump -a qruby19
Password: ******


The thread dump file will be available via: rhc app tail -a qruby19 -f qruby19/logs/error_log-20120806-000000-EST -o '-n 250'

Note You need to log in before you can comment on or make changes to this bug.