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

"*** stack smashing detected ***: terminated" on M1 Apple Silicon #984

Closed
4ndv opened this issue Nov 4, 2021 · 4 comments
Closed

"*** stack smashing detected ***: terminated" on M1 Apple Silicon #984

4ndv opened this issue Nov 4, 2021 · 4 comments

Comments

@4ndv
Copy link

4ndv commented Nov 4, 2021

Follow up to #980 and #968

When installing using docker on M1 Mac, when trying to visit http://localhost:4000/admin there is this error in the logs:

spree_starter-web-1       | Processing by Spree::Admin::UserSessionsController#new as HTML
spree_starter-web-1       |   Rendering layout /bundle/ruby/3.0.0/gems/spree_auth_devise-4.4.0/lib/views/backend/spree/layouts/login.html.erb
spree_starter-web-1       |   Rendering /bundle/ruby/3.0.0/gems/spree_auth_devise-4.4.0/lib/views/backend/spree/admin/user_sessions/new.html.erb within spree/layouts/login
spree_starter-web-1       |   Rendered /bundle/ruby/3.0.0/gems/spree_auth_devise-4.4.0/lib/views/backend/spree/admin/user_sessions/new.html.erb within spree/layouts/login (Duration: 1421.1ms | Allocations: 1869480)
spree_starter-web-1       | *** stack smashing detected ***: terminated
spree_starter-web-1       | [1] - Worker 1 (PID: 275) booted in 0.02s, phase: 0
spree_starter-web-1       | Started GET "/admin/login" for 172.18.0.1 at 2021-11-04 10:26:33 +0000

Steps to reproduce:

$ git clone [email protected]:spree/spree_starter.git

$ bin/setup

visit http://localhost:4000/admin

Looks like the problem is related to mini_racer gem

@4ndv
Copy link
Author

4ndv commented Nov 4, 2021

Here's how to fix it until there is new version of mini_racer out of prerelease:

In Gemfile change gem 'mini_racer' to gem 'mini_racer', github: 'rubyjs/mini_racer'

Then docker compose run --rm web bash -c 'bundle install'

Then docker compose build web worker

Then bin/start and everything should work fine.

@4ndv
Copy link
Author

4ndv commented Nov 4, 2021

Related to rubyjs/mini_racer#190

@tisba
Copy link

tisba commented Nov 10, 2021

You could give mini_racer 0.5.0.pre a try. It seems to have fixed the issue rubyjs/mini_racer#190

gem "mini_racer", "0.5.0.pre"
gem "libv8-node", "16.10.0.0"

@damianlegawiec
Copy link
Member

We've dropped mini_racer in favour of the native node as we're using https://github.com/rails/jsbundling-rails now

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

No branches or pull requests

3 participants