*** stack smashing detected ***: terminated RoR
Всем привет! Начал пользоваться macbook на m1 pro и возникли проблемы с запуском проекта из докера. До этого работал с ним на Ubuntu и подобных проблем не наблюдал. Дело в том что, после того как я собираю его командой docker-compose up --build локалка запускается, но после того как я перехожу на localhost работа прекращается с такой ошибкой
и при этом страница не отображается, "невозможно получить доступ к сайту". Текст с консоли
[+] Building 2.7s (14/14) FINISHED
=> [internal] load build definition from Dockerfile 0.0s
=> => transferring dockerfile: 32B 0.0s
=> [internal] load .dockerignore 0.0s
=> => transferring context: 2B 0.0s
=> [internal] load metadata for docker.io/library/ruby:2.4.10-slim-buste 2.6s
=> [1/9] FROM docker.io/library/ruby:2.4.10-slim-buster@sha256:ac34ee3f0 0.0s
=> [internal] load build context 0.0s
=> => transferring context: 28B 0.0s
=> CACHED [2/9] RUN apt-get update -qq && DEBIAN_FRONTEND=noninteracti 0.0s
=> CACHED [3/9] RUN curl -sL https://deb.nodesource.com/setup_10.x | bas 0.0s
=> CACHED [4/9] COPY Aptfile /tmp/Aptfile 0.0s
=> CACHED [5/9] RUN apt-get update -qq && DEBIAN_FRONTEND=noninteracti 0.0s
=> CACHED [6/9] RUN gem update --system && rm /usr/local/lib/ruby/ge 0.0s
=> CACHED [7/9] RUN npm install bower [email protected] -g 0.0s
=> CACHED [8/9] RUN mkdir -p /app 0.0s
=> CACHED [9/9] WORKDIR /app 0.0s
=> exporting to image 0.0s
=> => exporting layers 0.0s
=> => writing image sha256:8f1414ba14e1b7ab232d8f8b4dc14c8c055243eee7543 0.0s
=> => naming to docker.io/library/example-dev:1.1.0 0.0s
Use 'docker scan' to run Snyk tests against images to find vulnerabilities and learn how to fix them
[+] Running 5/0
⠿ Container ipsilon-redis-1 Created 0.0s
⠿ Container ipsilon-postgres-1 Created 0.0s
⠿ Container ipsilon-sidekiq-1 Created 0.0s
⠿ Container ipsilon-rails-1 Created 0.0s
⠿ Container ipsilon-runner-1 Created 0.0s
Attaching to ipsilon-postgres-1, ipsilon-rails-1, ipsilon-redis-1, ipsilon-runner-1, ipsilon-sidekiq-1
ipsilon-redis-1 | 1:C 14 Jul 07:31:28.228 # Warning: no config file specified, using the default config. In order to specify a config file use redis-server /path/to/redis.conf
ipsilon-redis-1 | _._
ipsilon-redis-1 | _.-``__ ''-._
ipsilon-redis-1 | _.-`` `. `_. ''-._ Redis 3.2.12 (00000000/0) 64 bit
ipsilon-redis-1 | .-`` .-```. ```\/ _.,_ ''-._
ipsilon-redis-1 | ( ' , .-` | `, ) Running in standalone mode
ipsilon-redis-1 | |`-._`-...-` __...-.``-._|'` _.-'| Port: 6379
ipsilon-redis-1 | | `-._ `._ / _.-' | PID: 1
ipsilon-redis-1 | `-._ `-._ `-./ _.-' _.-'
ipsilon-redis-1 | |`-._`-._ `-.__.-' _.-'_.-'|
ipsilon-redis-1 | | `-._`-._ _.-'_.-' | http://redis.io
ipsilon-redis-1 | `-._ `-._`-.__.-'_.-' _.-'
ipsilon-redis-1 | |`-._`-._ `-.__.-' _.-'_.-'|
ipsilon-redis-1 | | `-._`-._ _.-'_.-' |
ipsilon-redis-1 | `-._ `-._`-.__.-'_.-' _.-'
ipsilon-redis-1 | `-._ `-.__.-' _.-'
ipsilon-redis-1 | `-._ _.-'
ipsilon-redis-1 | `-.__.-'
ipsilon-redis-1 |
ipsilon-redis-1 | 1:M 14 Jul 07:31:28.229 # Server started, Redis version 3.2.12
ipsilon-redis-1 | 1:M 14 Jul 07:31:28.229 # WARNING you have Transparent Huge Pages (THP) support enabled in your kernel. This will create latency and memory usage issues with Redis. To fix this issue run the command 'echo never > /sys/kernel/mm/transparent_hugepage/enabled' as root, and add it to your /etc/rc.local in order to retain the setting after a reboot. Redis must be restarted after THP is disabled.
ipsilon-redis-1 | 1:M 14 Jul 07:31:28.229 * DB loaded from disk: 0.000 seconds
ipsilon-redis-1 | 1:M 14 Jul 07:31:28.229 * The server is now ready to accept connections on port 6379
ipsilon-postgres-1 |
ipsilon-postgres-1 | PostgreSQL Database directory appears to contain a database; Skipping initialization
ipsilon-postgres-1 |
ipsilon-postgres-1 | LOG: database system was shut down at 2022-07-14 07:31:21 UTC
ipsilon-postgres-1 | LOG: MultiXact member wraparound protections are now enabled
ipsilon-postgres-1 | LOG: autovacuum launcher started
ipsilon-postgres-1 | LOG: database system is ready to accept connections
ipsilon-rails-1 | /usr/local/bundle/gems/bundler-2.0.0.pre.3/lib/bundler/rubygems_integration.rb:200: warning: constant Gem::ConfigMap is deprecated
ipsilon-rails-1 | => Booting Thin
ipsilon-rails-1 | => Rails 4.2.11.3 application starting in development on http://0.0.0.0:5000
ipsilon-rails-1 | => Run `rails server -h` for more startup options
ipsilon-rails-1 | => Ctrl-C to shutdown server
ipsilon-rails-1 | [DEPRECATION] Rack::Attack.throttled_response is deprecated. Please use Rack::Attack.throttled_responder instead
ipsilon-rails-1 | [DEPRECATION] Rack::Attack.blocklisted_response is deprecated. Please use Rack::Attack.blocklisted_responder instead.
ipsilon-sidekiq-1 | [DEPRECATION] Rack::Attack.throttled_response is deprecated. Please use Rack::Attack.throttled_responder instead
ipsilon-sidekiq-1 | [DEPRECATION] Rack::Attack.blocklisted_response is deprecated. Please use Rack::Attack.blocklisted_responder instead.
ipsilon-sidekiq-1 | 2022-07-14T07:31:42.077Z 1 TID-x9ax6hes1 INFO: Booting Sidekiq 5.2.8 with redis options {:url=>"redis://redis:6379/12", :id=>"Sidekiq-server-PID-1"}
ipsilon-rails-1 | /usr/local/bundle/gems/thin-1.6.4/lib/thin/server.rb:107: warning: constant ::Fixnum is deprecated
ipsilon-rails-1 | Thin web server (v1.6.4 codename Gob Bluth)
ipsilon-rails-1 | Maximum connections set to 1024
ipsilon-rails-1 | Listening on 0.0.0.0:5000, CTRL+C to stop
ipsilon-rails-1 |
ipsilon-rails-1 |
ipsilon-rails-1 | Started GET "/users/sign_in" for 172.19.0.1 at 2022-07-14 07:31:52 +0000
ipsilon-rails-1 | ActiveRecord::SchemaMigration Load (2.6ms) SELECT "schema_migrations".* FROM "schema_migrations"
ipsilon-rails-1 | Processing by SessionsController#new as HTML
ipsilon-rails-1 | *** stack smashing detected ***: <unknown> terminated
ipsilon-rails-1 exited with code 133
ipsilon-sidekiq-1 |
ipsilon-sidekiq-1 |
ipsilon-sidekiq-1 | m,
ipsilon-sidekiq-1 | `$b
ipsilon-sidekiq-1 | .ss, $$: .,d$
ipsilon-sidekiq-1 | `$$P,d$P' .,md$P"'
ipsilon-sidekiq-1 | ,$$$$$bmmd$$$P^'
ipsilon-sidekiq-1 | .d$$$$$$$$$$P'
ipsilon-sidekiq-1 | $$^' `"^$$$' ____ _ _ _ _
ipsilon-sidekiq-1 | $: ,$$: / ___|(_) __| | ___| | _(_) __ _
ipsilon-sidekiq-1 | `b :$$ \___ \| |/ _` |/ _ \ |/ / |/ _` |
ipsilon-sidekiq-1 | $$: ___) | | (_| | __/ <| | (_| |
ipsilon-sidekiq-1 | $$ |____/|_|\__,_|\___|_|\_\_|\__, |
ipsilon-sidekiq-1 | .d$$ |_|
ipsilon-sidekiq-1 |
ipsilon-sidekiq-1 | 2022-07-14T07:32:05.356Z 1 TID-x9ax6hes1 INFO: Running in ruby 2.4.10p364 (2020-03-31 revision 67879) [aarch64-linux]
ipsilon-sidekiq-1 | 2022-07-14T07:32:05.356Z 1 TID-x9ax6hes1 INFO: See LICENSE and the LGPL-3.0 for licensing details.
ipsilon-sidekiq-1 | 2022-07-14T07:32:05.356Z 1 TID-x9ax6hes1 INFO: Upgrade to Sidekiq Pro for more features and support: http://sidekiq.org
ipsilon-sidekiq-1 | 2022-07-14T07:32:05.359Z 1 TID-x9ax6hes1 WARN: Sidekiq 6.0 will require Redis 4.0+, you are using Redis v3.2.12
ipsilon-sidekiq-1 | 2022-07-14T07:32:05.359Z 1 TID-x9ax6hes1 INFO: Starting processing, hit Ctrl-C to stop
ipsilon-redis-1 | 1:M 14 Jul 07:36:29.028 * 100 changes in 300 seconds. Saving...
ipsilon-redis-1 | 1:M 14 Jul 07:36:29.030 * Background saving started by pid 1697
ipsilon-redis-1 | 1697:C 14 Jul 07:36:29.039 * DB saved on disk
ipsilon-redis-1 | 1697:C 14 Jul 07:36:29.040 * RDB: 0 MB of memory used by copy-on-write
ipsilon-redis-1 | 1:M 14 Jul 07:36:29.131 * Background saving terminated with success
ipsilon-redis-1 | 1:M 14 Jul 07:41:30.078 * 100 changes in 300 seconds. Saving...
ipsilon-redis-1 | 1:M 14 Jul 07:41:30.079 * Background saving started by pid 3385
ipsilon-redis-1 | 3385:C 14 Jul 07:41:30.083 * DB saved on disk
ipsilon-redis-1 | 3385:C 14 Jul 07:41:30.084 * RDB: 0 MB of memory used by copy-on-write
ipsilon-redis-1 | 1:M 14 Jul 07:41:30.182 * Background saving terminated with success
ipsilon-redis-1 | 1:M 14 Jul 07:46:31.057 * 100 changes in 300 seconds. Saving...
ipsilon-redis-1 | 1:M 14 Jul 07:46:31.058 * Background saving started by pid 5081
ipsilon-redis-1 | 5081:C 14 Jul 07:46:31.061 * DB saved on disk
ipsilon-redis-1 | 5081:C 14 Jul 07:46:31.061 * RDB: 0 MB of memory used by copy-on-write
ipsilon-redis-1 | 1:M 14 Jul 07:46:31.161 * Background saving terminated with success
ipsilon-rails-1 | /usr/local/bundle/gems/bundler-2.0.0.pre.3/lib/bundler/rubygems_integration.rb:200: warning: constant Gem::ConfigMap is deprecated
ipsilon-rails-1 | => Booting Thin
ipsilon-rails-1 | => Rails 4.2.11.3 application starting in development on http://0.0.0.0:5000
ipsilon-rails-1 | => Run `rails server -h` for more startup options
ipsilon-rails-1 | => Ctrl-C to shutdown server
ipsilon-rails-1 | [DEPRECATION] Rack::Attack.throttled_response is deprecated. Please use Rack::Attack.throttled_responder instead
ipsilon-rails-1 | [DEPRECATION] Rack::Attack.blocklisted_response is deprecated. Please use Rack::Attack.blocklisted_responder instead.
ipsilon-rails-1 | /usr/local/bundle/gems/thin-1.6.4/lib/thin/server.rb:107: warning: constant ::Fixnum is deprecated
ipsilon-rails-1 | Thin web server (v1.6.4 codename Gob Bluth)
ipsilon-rails-1 | Maximum connections set to 1024
ipsilon-rails-1 | Listening on 0.0.0.0:5000, CTRL+C to stop
ipsilon-rails-1 |
ipsilon-rails-1 |
ipsilon-rails-1 | Started GET "/users/sign_in" for 172.19.0.1 at 2022-07-14 07:47:22 +0000
ipsilon-rails-1 | ActiveRecord::SchemaMigration Load (0.5ms) SELECT "schema_migrations".* FROM "schema_migrations"
ipsilon-rails-1 | Processing by SessionsController#new as HTML
ipsilon-rails-1 | *** stack smashing detected ***: <unknown> terminated
ipsilon-rails-1 exited with code 133
UPD: Действительно, руби версия слишком старая и из-за этого все ломает gem mini_racer, я попытался обновиться внутри Docker, но ничего не вышло, не подскажите как править файлы компоновки чтобы версия руби была >=2.6. DockerFile
ARG RUBY_VERSION=2.4.10
FROM ruby:$RUBY_VERSION-slim-buster
ARG NODE_MAJOR=10
ARG BUNDLER_VERSION=1.17.3
ARG YARN_VERSION=1.13.0
# Common dependencies
RUN apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -yq --no-install-recommends \
build-essential \
gnupg2 \
curl \
less \
git \
shared-mime-info \
&& apt-get clean \
&& rm -rf /var/cache/apt/archives/* /var/lib/apt/lists/* /tmp/* /var/tmp/* \
&& truncate -s 0 /var/log/*log
# Add NodeJS to sources list
RUN curl -sL https://deb.nodesource.com/setup_$NODE_MAJOR.x | bash -
# Install dependencies
COPY Aptfile /tmp/Aptfile
RUN apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -yq --no-install-recommends \
libpq-dev \
postgresql-client \
nodejs \
$(grep -Ev '^\s*#' /tmp/Aptfile | xargs) \
&& apt-get clean \
&& rm -rf /var/cache/apt/archives/* /var/lib/apt/lists/* /tmp/* /var/tmp/* \
&& truncate -s 0 /var/log/*log
# Configure bundler
ENV LANG=C.UTF-8 \
BUNDLE_JOBS=4 \
BUNDLE_RETRY=3
# Uncomment this line if you store Bundler settings in the project's root
# ENV BUNDLE_APP_CONFIG=.bundle
# Uncomment this line if you want to run binstubs without prefixing with `bin/` or `bundle exec`
# ENV PATH /app/bin:$PATH
# Upgrade RubyGems and install required Bundler version
# See https://github.com/evilmartians/terraforming-rails/pull/24 for discussion
RUN gem update --system && \
rm /usr/local/lib/ruby/gems/*/specifications/default/bundler-*.gemspec && \
gem uninstall bundler && \
gem install bundler -v $BUNDLER_VERSION
RUN npm install bower yarn@$YARN_VERSION -g
# Create a directory for the app code
RUN mkdir -p /app
WORKDIR /app
docker compose
version: '2.4'
x-app: &app
build:
context: .dockerdev
dockerfile: Dockerfile
args:
RUBY_VERSION: '2.4.10'
NODE_MAJOR: '10'
YARN_VERSION: '1.13.0'
BUNDLER_VERSION: '1.17.3'
environment: &env
NODE_ENV: ${NODE_ENV:-development}
RAILS_ENV: ${RAILS_ENV:-development}
YARN_CACHE_FOLDER: /app/node_modules/.yarn-cache
image: example-dev:1.1.0
tmpfs:
- /tmp
- /app/tmp/pids
x-backend: &backend
<<: *app
stdin_open: true
tty: true
volumes:
- .:/app:cached
- rails_cache:/app/tmp/cache
- bundle:/usr/local/bundle
- node_modules:/app/node_modules
- packs:/app/public/packs
- .dockerdev/.psqlrc:/root/.psqlrc:ro
- .dockerdev/.bashrc:/root/.bashrc:ro
environment:
<<: *env
REDIS_URL: redis://redis:6379/
DATABASE_URL: postgres://postgres:postgres@postgres:5432
BOOTSNAP_CACHE_DIR: /usr/local/bundle/_bootsnap
WEBPACKER_DEV_SERVER_HOST: webpacker
WEB_CONCURRENCY: 1
HISTFILE: /app/log/.bash_history
PSQL_HISTFILE: /app/log/.psql_history
EDITOR: vi
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
services:
runner:
<<: *backend
command: /bin/bash
ports:
- '3000:3000'
- '3002:3002'
rails:
<<: *backend
command: bundle exec rails server -b 0.0.0.0 -p 5000
ports:
- '5000:5000'
sidekiq:
<<: *backend
command: bundle exec sidekiq -C config/sidekiq.yml
postgres:
image: postgres:9.6.21
volumes:
- .dockerdev/.psqlrc:/root/.psqlrc:ro
- postgres:/var/lib/postgresql/data
- ./log:/root/log:cached
environment:
PSQL_HISTFILE: /root/log/.psql_history
POSTGRES_PASSWORD: postgres
ports:
- 5432
healthcheck:
test: pg_isready -U postgres -h 127.0.0.1
interval: 5s
redis:
image: redis:3.2-alpine
volumes:
- redis:/data
ports:
- 6379
healthcheck:
test: redis-cli ping
interval: 1s
timeout: 3s
retries: 30
volumes:
postgres:
redis:
bundle:
node_modules:
rails_cache:
packs: