Unicorn with Ruby 2.4.1 causing strange crash

I am upgrading from Ruby 2.3.1 to Ruby 2.4.1, and by doing this, Unicorn seems to be incompatible with the new version. I get errors below. I am using Unicorn 5.1.0 and have tried Unicorn 5.3.1 to no avail. Do I need to compile with another library instead of Xcode Tools?

I get an error right after starting the server with foreman startand Procfile:

webpack: bin/webpack-dev-server
gulp: gulp
redis: ./scripts/start_redis_server.sh
sidekiq: bundle exec sidekiq -C config/sidekiq.yml
annotations_server: ./scripts/start_annotation_server.sh
rails: bundle exec unicorn_rails -p 3000 -c config/unicorn.rb

It seems to start and work fine if I use a simple bin/rails sone which, in my opinion, is specific to Unicorn.

objc[40847]: +[__NSPlaceholderDictionary initialize] may have been in progress in another thread when fork() was called.
objc[40846]: +[__NSPlaceholderDictionary initialize] may have been in progress in another thread when fork() was called.
objc[40846]: +[__NSPlaceholderDictionary initialize] may have been in progress in another thread when fork() was called. We cannot safely call it or ignore it in the fork() child process. Crashing instead. Set a breakpoint on objc_initializeAfterForkError to debug.
objc[40847]: +[__NSPlaceholderDictionary initialize] may have been in progress in another thread when fork() was called. We cannot safely call it or ignore it in the fork() child process. Crashing instead. Set a breakpoint on objc_initializeAfterForkError to debug.
E, [2017-10-05T12:12:01.618013 #40833] ERROR -- : reaped #<Process::Status: pid 40847 SIGABRT (signal 6)> worker=1
E, [2017-10-05T12:12:01.618064 #40833] ERROR -- : reaped #<Process::Status: pid 40846 SIGABRT (signal 6)> worker=0
I, [2017-10-05T12:12:01.619387 #40850]  INFO -- : Refreshing Gem list
I, [2017-10-05T12:12:01.620867 #40851]  INFO -- : Refreshing Gem list
+4
source share
1 answer

MacOS High Sierra changed the behavior of forksyscall , so that Objective-C API calls in forked processes are treated as errors.

Ruby macOS High Sierra , Ruby. Puma , , Unicorn ( Puma), Ruby.

Unicorn Puma .

, Ruby ( Unicorn/Puma), Ruby :

OBJC_DISABLE_INITIALIZE_FORK_SAFETY=YES
+16

Source: https://habr.com/ru/post/1686979/


All Articles