#StackBounty: #ruby-on-rails #ruby #testing #segmentation-fault #apple-m1 Segmentation fault on M1 running a Rails System Test

Bounty: 50

I’m running a system test in a Rails app on a MacBook M1 Big Sur OS and it’s giving me a segmentation fault error.

I’m using Ruby 2.7.1 installed via rbenv

➜ which ruby
➜ ruby -v
ruby 2.7.1p83 (2020-03-31 revision a0c7c23c9c) [-darwin20]

Now, the issue comes whenever I run a rails system test.
Our system tests are congigured with the headless_chrome Capybara driver, which has probably (not sure about this) something to do with the segmentation fault error.

This is what I get when I run the test:

    [BUG] Segmentation fault at 0x000000001b543e20
ruby 2.7.1p83 (2020-03-31 revision a0c7c23c9c) [-darwin20]

-- 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:0001 p:---- s:0003 e:000002 (none) [FINISH]

-- Other runtime information -----------------------------------------------

* Loaded script: rails_test

* Loaded features:

    0 enumerator.so
    1 thread.rb
    2 rational.so
    3 complex.so
    4 ruby2_keywords.rb
    5 /Users/sc/.rbenv/versions/2.7.1/lib/ruby/2.7.0/-darwin20/enc/encdb.bundle
    6 /Users/sc/.rbenv/versions/2.7.1/lib/ruby/2.7.0/-darwin20/enc/trans/transdb.bundle
    7 /Users/sc/.rbenv/versions/2.7.1/lib/ruby/2.7.0/-darwin20/rbconfig.rb
    8 /Users/sc/.rbenv/versions/2.7.1/lib/ruby/2.7.0/rubygems/compatibility.rb
    9 /Users/sc/.rbenv/versions/2.7.1/lib/ruby/2.7.0/rubygems/defaults.rb
   10 /Users/sc/.rbenv/versions/2.7.1/lib/ruby/2.7.0/rubygems/deprecate.rb
   And many more lines...

Any ideas on what’s causing this error?

Get this bounty!!!

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.