環境
- System Version: macOS 10.13.3 (17D102)
- rails (5.0.3)
- sidekiq (5.0.0)
現象
macbook proを更新する時期になった。タッチバーのMacBook Porを選んだ。最新のMacOS High Sierraも搭載されてます。
ローカル環境でいつものようにsidekiqを起動しようとしたら、以下のエラーが出てきた
RAILS_ENV=development bundle exec sidekiq -C config/sidekiq.yml
objc[96412]: +[__NSPlaceholderDictionary initialize] may have been in progress in another thread when fork() was called.
objc[96412]: +[__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.
なにこれ?
調査
最初は自分のSidekiqが古くて、多分新しいバージョンが対応しているかなと思って、最新の5.1.3にアップグレードしてみたけど、同じエラーでした。
この問題についてのきちんとの説明はこれこちらを読んでいただければわかると思います。
おそらくsidekiqがプロセスをforkする時に、high sierraは許してないです。
現在Workaroundとして
export OBJC_DISABLE_INITIALIZE_FORK_SAFETY=YES