diff options
author | Douwe Maan <douwe@gitlab.com> | 2018-07-25 15:39:16 +0000 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2018-07-25 15:39:16 +0000 |
commit | d8e759802ec28c89ab0b07d6d748748dda3254a6 (patch) | |
tree | 53f3fb71b4addf2e161448a3d69a161f93c2c2a5 | |
parent | 3f14c56bfe77e83084b58dc2bd3c34e3c84c6cae (diff) | |
parent | b755673fb63b57751657a55f568ca809e5c7901e (diff) | |
download | gitlab-ce-d8e759802ec28c89ab0b07d6d748748dda3254a6.tar.gz |
Merge branch 'sh-include-rbtrace' into 'master'
Add rbtrace to Gemfile
See merge request gitlab-org/gitlab-ce!20831
-rw-r--r-- | Gemfile | 1 | ||||
-rw-r--r-- | Gemfile.lock | 6 | ||||
-rw-r--r-- | Gemfile.rails5.lock | 6 | ||||
-rw-r--r-- | changelogs/unreleased/sh-include-rbtrace.yml | 5 | ||||
-rw-r--r-- | config/initializers/rbtrace.rb | 3 | ||||
-rw-r--r-- | doc/administration/troubleshooting/debug.md | 13 |
6 files changed, 34 insertions, 0 deletions
@@ -400,6 +400,7 @@ gem 'email_reply_trimmer', '~> 0.1' gem 'html2text' gem 'ruby-prof', '~> 0.17.0' +gem 'rbtrace', '~> 0.4', require: false # OAuth gem 'oauth2', '~> 1.4' diff --git a/Gemfile.lock b/Gemfile.lock index 5bb7bc53962..f370adfc810 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -700,6 +700,10 @@ GEM ffi (>= 0.5.0, < 2) rblineprof (0.3.6) debugger-ruby_core_source (~> 1.3) + rbtrace (0.4.10) + ffi (>= 1.0.6) + msgpack (>= 0.4.3) + trollop (>= 1.16.2) rdoc (6.0.4) re2 (1.1.1) recaptcha (3.0.0) @@ -911,6 +915,7 @@ GEM parslet (~> 1.5.0) toml-rb (1.0.0) citrus (~> 3.0, > 3.0) + trollop (2.1.3) truncato (0.7.10) htmlentities (~> 4.3.1) nokogiri (~> 1.8.0, >= 1.7.0) @@ -1133,6 +1138,7 @@ DEPENDENCIES rainbow (~> 2.2) raindrops (~> 0.18) rblineprof (~> 0.3.6) + rbtrace (~> 0.4) rdoc (~> 6.0) re2 (~> 1.1.1) recaptcha (~> 3.0) diff --git a/Gemfile.rails5.lock b/Gemfile.rails5.lock index 8c14316a67a..cb64fe554ff 100644 --- a/Gemfile.rails5.lock +++ b/Gemfile.rails5.lock @@ -709,6 +709,10 @@ GEM ffi (>= 0.5.0, < 2) rblineprof (0.3.6) debugger-ruby_core_source (~> 1.3) + rbtrace (0.4.10) + ffi (>= 1.0.6) + msgpack (>= 0.4.3) + trollop (>= 1.16.2) rdoc (6.0.4) re2 (1.1.1) recaptcha (3.0.0) @@ -918,6 +922,7 @@ GEM parslet (~> 1.5.0) toml-rb (1.0.0) citrus (~> 3.0, > 3.0) + trollop (2.1.3) truncato (0.7.10) htmlentities (~> 4.3.1) nokogiri (~> 1.8.0, >= 1.7.0) @@ -1144,6 +1149,7 @@ DEPENDENCIES rainbow (~> 2.2) raindrops (~> 0.18) rblineprof (~> 0.3.6) + rbtrace (~> 0.4) rdoc (~> 6.0) re2 (~> 1.1.1) recaptcha (~> 3.0) diff --git a/changelogs/unreleased/sh-include-rbtrace.yml b/changelogs/unreleased/sh-include-rbtrace.yml new file mode 100644 index 00000000000..41f0655e3f8 --- /dev/null +++ b/changelogs/unreleased/sh-include-rbtrace.yml @@ -0,0 +1,5 @@ +--- +title: Add rbtrace to Gemfile +merge_request: 20831 +author: +type: other diff --git a/config/initializers/rbtrace.rb b/config/initializers/rbtrace.rb new file mode 100644 index 00000000000..3a076c99ad0 --- /dev/null +++ b/config/initializers/rbtrace.rb @@ -0,0 +1,3 @@ +# frozen_string_literal: true + +require 'rbtrace' if ENV['ENABLE_RBTRACE'] diff --git a/doc/administration/troubleshooting/debug.md b/doc/administration/troubleshooting/debug.md index 83a714810c1..7ae4f7c1515 100644 --- a/doc/administration/troubleshooting/debug.md +++ b/doc/administration/troubleshooting/debug.md @@ -66,6 +66,19 @@ On CentOS: sudo yum install gdb ``` +### rbtrace + +GitLab 11.2 ships with [rbtrace](https://github.com/tmm1/rbtrace), which +allows you to trace Ruby code, view all running threads, take memory dumps, +and more. However, this is not enabled by default. To enable it, define the +`ENABLE_RBTRACE` variable to the environment. For example, in Omnibus: + +```ruby +gitlab_rails['env'] = {"ENABLE_RBTRACE" => "1"} +``` + +Then reconfigure the system and restart Unicorn and Sidekiq. + ## Common Problems Many of the tips to diagnose issues below apply to many different situations. We'll use one |