"[BUG] Segmentation fault" when running RSpec tests
When running rspec
tests locally, I'm intermittently getting a [BUG] Segmentation fault
error:
~/source/gdk-ce/gitlab (nfriend-update-merge-request-widget-pipeline-block) $ bundle exec rspec spec/features/merge_request/user_sees_merge_widget_spec.rb
==> Setting up GitLab Shell...
GitLab Shell set up in 0.083988 seconds...
==> Setting up Gitaly...
Checking gitaly-ruby bundle...
Warning: the running version of Bundler (1.17.1) is older than the version that created the lockfile (1.17.3). We suggest you upgrade to the latest version of Bundler by running `gem install bundler`.
The Gemfile's dependencies are satisfied
Trying to connect to gitaly: OK
Gitaly set up in 0.900988 seconds...
Starting the Capybara driver server...
.............../Users/nathanfriend/.rvm/gems/ruby-2.5.3/gems/actionview-5.0.7.1/lib/action_view/template/resolver.rb:276: [BUG] Segmentation fault at 0x000070000c84a900
ruby 2.5.3p105 (2018-10-18 revision 65156) [x86_64-darwin18]
-- Crash Report log information --------------------------------------------
See Crash Report log file under the one of following:
* ~/Library/Logs/DiagnosticReports
* /Library/Logs/DiagnosticReports
for more details.
Don't forget to include the above Crash Report log file in bug reports.
-- Control frame information -----------------------------------------------
c:0245 p:---- s:1538 e:001537 CFUNC :split
c:0244 p:0017 s:1533 e:001532 METHOD /Users/nathanfriend/.rvm/gems/ruby-2.5.3/gems/actionview-5.0.7.1/lib/action_view/template/resolver.rb:276
c:0243 p:0009 s:1522 e:001521 BLOCK /Users/nathanfriend/.rvm/gems/ruby-2.5.3/gems/actionview-5.0.7.1/lib/action_view/template/resolver.rb:212 [FINISH]
c:0242 p:---- s:1514 e:001513 CFUNC :map
c:0241 p:0036 s:1510 e:001509 METHOD /Users/nathanfriend/.rvm/gems/ruby-2.5.3/gems/actionview-5.0.7.1/lib/action_view/template/resolver.rb:211
c:0240 p:0039 s:1500 e:001499 METHOD /Users/nathanfriend/.rvm/gems/ruby-2.5.3/gems/actionview-5.0.7.1/lib/action_view/template/resolver.rb:202
c:0239 p:0013 s:1490 e:001489 BLOCK /Users/nathanfriend/.rvm/gems/ruby-2.5.3/gems/actionview-5.0.7.1/lib/action_view/template/resolver.rb:129
c:0238 p:0004 s:1487 e:001485 BLOCK /Users/nathanfriend/.rvm/gems/ruby-2.5.3/gems/actionview-5.0.7.1/lib/action_view/template/resolver.rb:169
c:0237 p:0067 s:1483 e:001482 METHOD /Users/nathanfriend/.rvm/gems/ruby-2.5.3/gems/actionview-5.0.7.1/lib/action_view/template/resolver.rb:67
c:0236 p:0045 s:1472 e:001471 METHOD /Users/nathanfriend/.rvm/gems/ruby-2.5.3/gems/actionview-5.0.7.1/lib/action_view/template/resolver.rb:168
c:0235 p:0037 s:1461 e:001460 METHOD /Users/nathanfriend/.rvm/gems/ruby-2.5.3/gems/actionview-5.0.7.1/lib/action_view/template/resolver.rb:128
c:0234 p:0040 s:1451 e:001450 BLOCK /Users/nathanfriend/.rvm/gems/ruby-2.5.3/gems/actionview-5.0.7.1/lib/action_view/path_set.rb:79 [FINISH]
c:0233 p:---- s:1446 e:001445 CFUNC :each
...
The full log can be seen here: error.log
The stack trace isn't consistent between runs - it often point to different gems under the Control frame information
section.
@brodock mentioned (in Slack) that this issue might be related to not having enough free memory on my machine. Here's my current allocation:
Things I've tried
- Restarting my machine
bundle install --force
- Killing the GDK, running
rm -rf tmp/cache
, restarting the GDK, rerunning the tests- This seemed to work once, but it could just have been a coincidence. It hasn't worked since.