Search code examples
ruby-on-railsrubysidekiqbigdecimalactivesupport

sidekiq suddenly stops working


I'm using sidekiq to run background processes in a rails application.
It was working fine since yesterday, but now when i try to run it with sidekiq in a command line interface I get

WARN: Unresolved specs during Gem::Specification.reset:
      minitest (~> 5.1)
      rails-dom-testing (>= 1.0.5, ~> 1.0)
WARN: Clearing out unresolved specs.
Please report a bug if this causes problems.
/usr/lib/ruby/2.2.0/armv6l-linux-eabihf/bigdecimal.so: warning: already initialized constant BigDecimal::BASE
/usr/lib/ruby/2.2.0/armv6l-linux-eabihf/bigdecimal.so: warning: already initialized constant BigDecimal::EXCEPTION_ALL
/usr/lib/ruby/2.2.0/armv6l-linux-eabihf/bigdecimal.so: warning: already initialized constant BigDecimal::EXCEPTION_NaN
/usr/lib/ruby/2.2.0/armv6l-linux-eabihf/bigdecimal.so: warning: already initialized constant BigDecimal::EXCEPTION_INFINITY
/usr/lib/ruby/2.2.0/armv6l-linux-eabihf/bigdecimal.so: warning: already initialized constant BigDecimal::EXCEPTION_UNDERFLOW
/usr/lib/ruby/2.2.0/armv6l-linux-eabihf/bigdecimal.so: warning: already initialized constant BigDecimal::EXCEPTION_OVERFLOW
/usr/lib/ruby/2.2.0/armv6l-linux-eabihf/bigdecimal.so: warning: already initialized constant BigDecimal::EXCEPTION_ZERODIVIDE
/usr/lib/ruby/2.2.0/armv6l-linux-eabihf/bigdecimal.so: warning: already initialized constant BigDecimal::ROUND_MODE
/usr/lib/ruby/2.2.0/armv6l-linux-eabihf/bigdecimal.so: warning: already initialized constant BigDecimal::ROUND_UP
/usr/lib/ruby/2.2.0/armv6l-linux-eabihf/bigdecimal.so: warning: already initialized constant BigDecimal::ROUND_DOWN
/usr/lib/ruby/2.2.0/armv6l-linux-eabihf/bigdecimal.so: warning: already initialized constant BigDecimal::ROUND_HALF_UP
/usr/lib/ruby/2.2.0/armv6l-linux-eabihf/bigdecimal.so: warning: already initialized constant BigDecimal::ROUND_HALF_DOWN
/usr/lib/ruby/2.2.0/armv6l-linux-eabihf/bigdecimal.so: warning: already initialized constant BigDecimal::ROUND_CEILING
/usr/lib/ruby/2.2.0/armv6l-linux-eabihf/bigdecimal.so: warning: already initialized constant BigDecimal::ROUND_FLOOR
/usr/lib/ruby/2.2.0/armv6l-linux-eabihf/bigdecimal.so: warning: already initialized constant BigDecimal::ROUND_HALF_EVEN
/usr/lib/ruby/2.2.0/armv6l-linux-eabihf/bigdecimal.so: warning: already initialized constant BigDecimal::SIGN_NaN
/usr/lib/ruby/2.2.0/armv6l-linux-eabihf/bigdecimal.so: warning: already initialized constant BigDecimal::SIGN_POSITIVE_ZERO
/usr/lib/ruby/2.2.0/armv6l-linux-eabihf/bigdecimal.so: warning: already initialized constant BigDecimal::SIGN_NEGATIVE_ZERO
/usr/lib/ruby/2.2.0/armv6l-linux-eabihf/bigdecimal.so: warning: already initialized constant BigDecimal::SIGN_POSITIVE_FINITE
/usr/lib/ruby/2.2.0/armv6l-linux-eabihf/bigdecimal.so: warning: already initialized constant BigDecimal::SIGN_NEGATIVE_FINITE
/usr/lib/ruby/2.2.0/armv6l-linux-eabihf/bigdecimal.so: warning: already initialized constant BigDecimal::SIGN_POSITIVE_INFINITE
/usr/lib/ruby/2.2.0/armv6l-linux-eabihf/bigdecimal.so: warning: already initialized constant BigDecimal::SIGN_NEGATIVE_INFINITE
/usr/lib/ruby/2.2.0/armv6l-linux-eabihf/bigdecimal.so: warning: already initialized constant BigDecimal::INFINITY
/usr/lib/ruby/2.2.0/armv6l-linux-eabihf/bigdecimal.so: warning: already initialized constant BigDecimal::NAN
2015-08-17T13:50:43.622Z 1730 TID-5eckc INFO: Booting Sidekiq 3.4.2 with redis options {:url=>"redis://localhost:6379/3", :namespace=>"s
idekiq"}
undefined method `add_builtin_type' for Psych:Module
/home/roberto/.gem/ruby/2.2.0/gems/activesupport-4.2.3/lib/active_support/ordered_hash.rb:3:in `<top (required)>'
/home/roberto/.gem/ruby/2.2.0/gems/activesupport-4.2.3/lib/active_support/dependencies.rb:274:in `require'
/home/roberto/.gem/ruby/2.2.0/gems/activesupport-4.2.3/lib/active_support/dependencies.rb:274:in `block in require'
/home/roberto/.gem/ruby/2.2.0/gems/activesupport-4.2.3/lib/active_support/dependencies.rb:240:in `load_dependency'
/home/roberto/.gem/ruby/2.2.0/gems/activesupport-4.2.3/lib/active_support/dependencies.rb:274:in `require'
/home/roberto/.gem/ruby/2.2.0/gems/activesupport-4.2.3/lib/active_support/dependencies/autoload.rb:70:in `block in eager_load!'
/home/roberto/.gem/ruby/2.2.0/gems/activesupport-4.2.3/lib/active_support/dependencies/autoload.rb:70:in `each_value'
/home/roberto/.gem/ruby/2.2.0/gems/activesupport-4.2.3/lib/active_support/dependencies/autoload.rb:70:in `eager_load!'
/home/roberto/.gem/ruby/2.2.0/gems/activesupport-4.2.3/lib/active_support.rb:69:in `eager_load!'
/home/roberto/.gem/ruby/2.2.0/gems/railties-4.2.3/lib/rails/application/finisher.rb:56:in `each'
/home/roberto/.gem/ruby/2.2.0/gems/railties-4.2.3/lib/rails/application/finisher.rb:56:in `block in <module:Finisher>'
/home/roberto/.gem/ruby/2.2.0/gems/railties-4.2.3/lib/rails/initializable.rb:30:in `instance_exec'
/home/roberto/.gem/ruby/2.2.0/gems/railties-4.2.3/lib/rails/initializable.rb:30:in `run'
/home/roberto/.gem/ruby/2.2.0/gems/railties-4.2.3/lib/rails/initializable.rb:55:in `block in run_initializers'
/usr/lib/ruby/2.2.0/tsort.rb:226:in `block in tsort_each'
/usr/lib/ruby/2.2.0/tsort.rb:348:in `block (2 levels) in each_strongly_connected_component'
/usr/lib/ruby/2.2.0/tsort.rb:429:in `each_strongly_connected_component_from'
/usr/lib/ruby/2.2.0/tsort.rb:347:in `block in each_strongly_connected_component'
/usr/lib/ruby/2.2.0/tsort.rb:345:in `each'
/usr/lib/ruby/2.2.0/tsort.rb:345:in `call'
/usr/lib/ruby/2.2.0/tsort.rb:345:in `each_strongly_connected_component'
/usr/lib/ruby/2.2.0/tsort.rb:224:in `tsort_each'
/usr/lib/ruby/2.2.0/tsort.rb:203:in `tsort_each'
/home/roberto/.gem/ruby/2.2.0/gems/railties-4.2.3/lib/rails/initializable.rb:54:in `run_initializers'
/home/roberto/.gem/ruby/2.2.0/gems/railties-4.2.3/lib/rails/application.rb:352:in `initialize!'
/home/roberto/web/boardInterface/config/environment.rb:5:in `<top (required)>'
/home/roberto/.gem/ruby/2.2.0/gems/sidekiq-3.4.2/lib/sidekiq/cli.rb:241:in `require'
/home/roberto/.gem/ruby/2.2.0/gems/sidekiq-3.4.2/lib/sidekiq/cli.rb:241:in `boot_system'
/home/roberto/.gem/ruby/2.2.0/gems/sidekiq-3.4.2/lib/sidekiq/cli.rb:50:in `run'
/home/roberto/.gem/ruby/2.2.0/gems/sidekiq-3.4.2/bin/sidekiq:13:in `<top (required)>'
/home/roberto/.gem/ruby/2.2.0/bin/sidekiq:23:in `load'
/home/roberto/.gem/ruby/2.2.0/bin/sidekiq:23:in `<main>'

I do have redis-server running in port 6379.
I've tried to gem update, but it changes nothing.
Removing the gem bigdecimal gets rid of the already initialized warnings, but the undefined method error persists and causes sidekiq to crash.
Googling it yielded no useful results from what I've found in a day of researches.
Thanks in advance.

Software in use

uname -a

Linux PiServer 4.0.8-2-ARCH #1 PREEMPT Tue Jul 14 18:45:50 MDT 2015 armv6l GNU/Linux

ruby --version

ruby 2.2.2p95 (2015-04-13 revision 50295) [armv6l-linux-eabihf]

rails --version

Rails 4.2.3

sidekiq --version

Sidekiq 3.4.2

gem list --local | grep psych

psych (2.0.13, 2.0.8)

Hardware in use

Raspberry pi model B+

Solution

  • I would suggest the following steps:

    • Remove current version of ruby along with all libraries, gems and files that depend on it.

    • Install ruby via RVM. It takes a lifetime to compile on the RPi but might help avoid the BigDecimal error.

    • In your project require 'grape' according to issue #181 on GitHub, might help with the add_builtin_type error.

    I can't reproduce the error on my Πs.