Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: remove mini_racer to prevent segfaults (and because we don't use it) #4478

Merged
merged 2 commits into from
Jul 3, 2024

Conversation

elasticspoon
Copy link
Collaborator

@elasticspoon elasticspoon commented Jun 23, 2024

Currently when I run rails assets:precompile the application segfaults.

$ > rails assets:precompile
/home/bandito/.asdf/installs/ruby/3.2.2/lib/ruby/gems/3.2.0/gems/mini_racer-0.12.0/lib/mini_racer.rb:228: [BUG] Segmentation fault at 0x00007ff911d85008
ruby 3.2.2 (2023-03-30 revision e51014f9c0) [x86_64-linux]

-- Control frame information -----------------------------------------------
c:0064 p:---- s:0428 e:000427 CFUNC  :eval_unsafe
c:0063 p:0009 s:0422 e:000421 BLOCK  /home/bandito/.asdf/installs/ruby/3.2.2/lib/ruby/gems/3.2.0/gems/mini_racer-0.12.0/lib/mini_racer.rb:228
c:0062 p:0010 s:0419 e:000418 METHOD /home/bandito/.asdf/installs/ruby/3.2.2/lib/ruby/gems/3.2.0/gems/mini_racer-0.12.0/lib/mini_racer.rb:348
c:0061 p:0008 s:0408 e:000407 BLOCK  /home/bandito/.asdf/installs/ruby/3.2.2/lib/ruby/gems/3.2.0/gems/mini_racer-0.12.0/lib/mini_racer.rb:227 [FINISH]
c:0060 p:---- s:0405 e:000404 CFUNC  :synchronize
c:0059 p:0045 s:0401 e:000400 METHOD /home/bandito/.asdf/installs/ruby/3.2.2/lib/ruby/gems/3.2.0/gems/mini_racer-0.12.0/lib/mini_racer.rb:225
c:0058 p:0007 s:0394 e:000393 BLOCK  /home/bandito/.asdf/installs/ruby/3.2.2/lib/ruby/gems/3.2.0/gems/execjs-2.9.1/lib/execjs/mini_racer_runtime.rb:11
c:0057 p:0003 s:0391 e:000389 METHOD /home/bandito/.asdf/installs/ruby/3.2.2/lib/ruby/gems/3.2.0/gems/execjs-2.9.1/lib/execjs/mini_racer_runtime.rb:67
c:0056 p:0035 s:0383 e:000382 METHOD /home/bandito/.asdf/installs/ruby/3.2.2/lib/ruby/gems/3.2.0/gems/execjs-2.9.1/lib/execjs/mini_racer_runtime.rb:10 [FINISH]
c:0055 p:---- s:0376 e:000375 CFUNC  :new
c:0054 p:0038 s:0369 e:000368 METHOD /home/bandito/.asdf/installs/ruby/3.2.2/lib/ruby/gems/3.2.0/gems/execjs-2.9.1/lib/execjs/runtime.rb:68
c:0053 p:0013 s:0363 e:000362 METHOD /home/bandito/.asdf/installs/ruby/3.2.2/lib/ruby/gems/3.2.0/gems/execjs-2.9.1/lib/execjs/module.rb:27

This seems to be related to mini_racer. The easiest solution is to downgrade to a version of mini_racer without these issues. Just kidding, we aren't using it so we might as well remove it!

See rubyjs/mini_racer#300 for more info.

Currently when I run `rails assets:precompile` the application
segfaults. This seems to be related to mini_racer.

The easiest solution is to downgrade to a version of mini_rancer without
these issues.

See rubyjs/mini_racer#300 for more info.
@elasticspoon elasticspoon marked this pull request as ready for review June 23, 2024 20:46
@elasticspoon elasticspoon requested a review from dorner June 23, 2024 20:46
@dorner
Copy link
Collaborator

dorner commented Jun 26, 2024

@elasticspoon I don't think we need mini_racer in the Gemfile at all. I don't think it's used anywhere. Try removing it and see if anything breaks. :)

@elasticspoon elasticspoon changed the title fix: downgrade mini_racer to prevent segfaults fix: remove mini_racer to prevent segfaults (and because we don't use it) Jun 26, 2024
@elasticspoon
Copy link
Collaborator Author

@dorner you are right. I did not expect that.

@dorner dorner merged commit 3ca0ed9 into rubyforgood:main Jul 3, 2024
19 checks passed
@dorner
Copy link
Collaborator

dorner commented Jul 3, 2024

Thanks!

@elasticspoon elasticspoon deleted the fix/downgrade-mini-racer branch July 3, 2024 15:58
Copy link
Contributor

GitHub Actions bot commented Jul 7, 2024

@elasticspoon: Your PR fix: remove mini_racer to prevent segfaults (and because we don't use it) is part of today's Human Essentials production release: 2024.07.07.
Thank you very much for your contribution!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants