Merge branch 'sh-include-rbtrace' into 'master'

Add rbtrace to Gemfile

See merge request gitlab-org/gitlab-ce!20831
This commit is contained in:
Douwe Maan 2018-07-25 15:39:16 +00:00
commit d8e759802e
6 changed files with 34 additions and 0 deletions

View file

@ -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'

View file

@ -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)

View file

@ -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)

View file

@ -0,0 +1,5 @@
---
title: Add rbtrace to Gemfile
merge_request: 20831
author:
type: other

View file

@ -0,0 +1,3 @@
# frozen_string_literal: true
require 'rbtrace' if ENV['ENABLE_RBTRACE']

View file

@ -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