celluloid: Deadlock in version 0.16.0

Last time mine Sidekiq client instace hangs - it is showing that all workers are busy but actually they are not doing nothing. I’ve send SIGSEGV signal to Sidekiq process so in result I’ve got full bactrace of hanged code and it looks that it is fully related to Celluloid. Looks like some kind of deadlock. Ruby version: 2.2.0 Rails version: 4.1.10 Sidekiq version: 3.3.4

-- Control frame information -----------------------------------------------
c:0015 p:---- s:0054 e:000053 CFUNC  :sleep
c:0014 p:---- s:0052 e:000051 CFUNC  :wait
c:0013 p:0034 s:0047 e:000046 BLOCK  /opt/ruby-2.2.0/lib/ruby/gems/2.2.0/gems/celluloid-0.16.0/lib/celluloid/mailbox.rb:62
c:0012 p:0041 s:0044 e:000043 METHOD /opt/ruby-2.2.0/lib/ruby/gems/2.2.0/gems/timers-4.0.1/lib/timers/wait.rb:33
c:0011 p:0025 s:0040 e:000039 METHOD /opt/ruby-2.2.0/lib/ruby/gems/2.2.0/gems/timers-4.0.1/lib/timers/wait.rb:11
c:0010 p:0055 s:0034 E:001fd8 METHOD /opt/ruby-2.2.0/lib/ruby/gems/2.2.0/gems/celluloid-0.16.0/lib/celluloid/mailbox.rb:57
c:0009 p:0027 s:0028 e:000027 BLOCK  /opt/ruby-2.2.0/lib/ruby/gems/2.2.0/gems/celluloid-0.16.0/lib/celluloid/actor.rb:153
c:0008 p:0016 s:0024 e:000023 METHOD /opt/ruby-2.2.0/lib/ruby/gems/2.2.0/gems/timers-4.0.1/lib/timers/group.rb:52
c:0007 p:0019 s:0019 E:000ac8 METHOD /opt/ruby-2.2.0/lib/ruby/gems/2.2.0/gems/celluloid-0.16.0/lib/celluloid/actor.rb:150
c:0006 p:0013 s:0015 e:000014 BLOCK  /opt/ruby-2.2.0/lib/ruby/gems/2.2.0/gems/celluloid-0.16.0/lib/celluloid/actor.rb:130
c:0005 p:0024 s:0013 e:000012 BLOCK  /opt/ruby-2.2.0/lib/ruby/gems/2.2.0/gems/celluloid-0.16.0/lib/celluloid/thread_handle.rb:13
c:0004 p:0023 s:0011 e:000010 BLOCK  /opt/ruby-2.2.0/lib/ruby/gems/2.2.0/gems/celluloid-0.16.0/lib/celluloid/actor_system.rb:32 [FINISH]
c:0003 p:---- s:0009 e:000008 CFUNC  :call
c:0002 p:0018 s:0006 e:000005 BLOCK  /opt/ruby-2.2.0/lib/ruby/gems/2.2.0/gems/celluloid-0.16.0/lib/celluloid/internal_pool.rb:130 [FINISH]
c:0001 p:---- s:0002 e:000001 TOP    [FINISH]

-- Ruby level backtrace information ----------------------------------------
/opt/ruby-2.2.0/lib/ruby/gems/2.2.0/gems/celluloid-0.16.0/lib/celluloid/internal_pool.rb:130:in `block in create'
/opt/ruby-2.2.0/lib/ruby/gems/2.2.0/gems/celluloid-0.16.0/lib/celluloid/internal_pool.rb:130:in `call'
/opt/ruby-2.2.0/lib/ruby/gems/2.2.0/gems/celluloid-0.16.0/lib/celluloid/actor_system.rb:32:in `block in get_thread'
/opt/ruby-2.2.0/lib/ruby/gems/2.2.0/gems/celluloid-0.16.0/lib/celluloid/thread_handle.rb:13:in `block in initialize'
/opt/ruby-2.2.0/lib/ruby/gems/2.2.0/gems/celluloid-0.16.0/lib/celluloid/actor.rb:130:in `block in start'
/opt/ruby-2.2.0/lib/ruby/gems/2.2.0/gems/celluloid-0.16.0/lib/celluloid/actor.rb:150:in `run'
/opt/ruby-2.2.0/lib/ruby/gems/2.2.0/gems/timers-4.0.1/lib/timers/group.rb:52:in `wait'
/opt/ruby-2.2.0/lib/ruby/gems/2.2.0/gems/celluloid-0.16.0/lib/celluloid/actor.rb:153:in `block in run'
/opt/ruby-2.2.0/lib/ruby/gems/2.2.0/gems/celluloid-0.16.0/lib/celluloid/mailbox.rb:57:in `check'
/opt/ruby-2.2.0/lib/ruby/gems/2.2.0/gems/timers-4.0.1/lib/timers/wait.rb:11:in `for'
/opt/ruby-2.2.0/lib/ruby/gems/2.2.0/gems/timers-4.0.1/lib/timers/wait.rb:33:in `while_time_remaining'
/opt/ruby-2.2.0/lib/ruby/gems/2.2.0/gems/celluloid-0.16.0/lib/celluloid/mailbox.rb:62:in `block in check'
/opt/ruby-2.2.0/lib/ruby/gems/2.2.0/gems/celluloid-0.16.0/lib/celluloid/mailbox.rb:62:in `wait'
/opt/ruby-2.2.0/lib/ruby/gems/2.2.0/gems/celluloid-0.16.0/lib/celluloid/mailbox.rb:62:in `sleep'

-- Machine register context ------------------------------------------------
 RIP: 0x00007f2d42923923 RBP: 0x0000000000e425f0 RSP: 0x00007fffbd7ef680
 RAX: 0xfffffffffffffffc RBX: 0x0000000000000080 RCX: 0xffffffffffffffff
 RDX: 0x0000000000000000 RDI: 0x0000000000000013 RSI: 0x000000000a17fb70
  R8: 0x0000000000000000  R9: 0x0000000004000001 R10: 0x0000000000000000
 R11: 0x0000000000000293 R12: 0x0000000000000012 R13: 0x0000000000000000
 R14: 0x0000000000000000 R15: 0x0000000000e425f0 EFL: 0x0000000000000293

-- C level backtrace information -------------------------------------------
/opt/ruby-2.2.0/lib/libruby.so.2.2(rb_vm_bugreport+0x51f) [0x7f2d4372ad9f] vm_dump.c:693
/opt/ruby-2.2.0/lib/libruby.so.2.2(rb_bug_context+0xcb) [0x7f2d435bf00b] error.c:389
/opt/ruby-2.2.0/lib/libruby.so.2.2(sigsegv+0x52) [0x7f2d4369ebb2] signal.c:878
/lib64/libpthread.so.0(pthread_setaffinity_np@@GLIBC_2.3.4+0xb0) [0x7f2d433345b0]
/lib64/libc.so.6(gaih_inet+0x473) [0x7f2d42923923]
/opt/ruby-2.2.0/lib/libruby.so.2.2(rb_thread_fd_select+0x392) [0x7f2d4373ac12] thread_pthread.c:1015
/opt/ruby-2.2.0/lib/libruby.so.2.2(select_call+0x32f) [0x7f2d435f4adf] io.c:8414
/opt/ruby-2.2.0/lib/libruby.so.2.2(rb_ensure+0xb8) [0x7f2d435c7618] eval.c:907
/opt/ruby-2.2.0/lib/libruby.so.2.2(rb_f_select+0x90) [0x7f2d435f14e0] io.c:8836
/opt/ruby-2.2.0/lib/libruby.so.2.2(vm_call_cfunc+0x11e) [0x7f2d43712aee] vm_insnhelper.c:1360
/opt/ruby-2.2.0/lib/libruby.so.2.2(vm_call_method+0x11e) [0x7f2d437292de] vm_insnhelper.c:1656
/opt/ruby-2.2.0/lib/libruby.so.2.2(vm_exec_core+0x1ada) [0x7f2d437198ba] insns.def:1054
/opt/ruby-2.2.0/lib/libruby.so.2.2(vm_exec+0x84) [0x7f2d4371d854] vm.c:1407
/opt/ruby-2.2.0/lib/libruby.so.2.2(rb_iseq_eval+0x1a6) [0x7f2d4371ef76] vm.c:1664
/opt/ruby-2.2.0/lib/libruby.so.2.2(rb_load_internal0+0x127) [0x7f2d435ca367] load.c:614
/opt/ruby-2.2.0/lib/libruby.so.2.2(rb_f_load+0x82) [0x7f2d435ca662] load.c:643
/opt/ruby-2.2.0/lib/libruby.so.2.2(vm_call_cfunc+0x11e) [0x7f2d43712aee] vm_insnhelper.c:1360
/opt/ruby-2.2.0/lib/libruby.so.2.2(vm_call_method+0x11e) [0x7f2d437292de] vm_insnhelper.c:1656
/opt/ruby-2.2.0/lib/libruby.so.2.2(vm_exec_core+0x1ada) [0x7f2d437198ba] insns.def:1054
/opt/ruby-2.2.0/lib/libruby.so.2.2(vm_exec+0x84) [0x7f2d4371d854] vm.c:1407
/opt/ruby-2.2.0/lib/libruby.so.2.2(rb_iseq_eval_main+0x1f3) [0x7f2d4371f1e3] vm.c:1677
/opt/ruby-2.2.0/lib/libruby.so.2.2(ruby_exec_internal+0xc4) [0x7f2d435c44b4] eval.c:252
/opt/ruby-2.2.0/lib/libruby.so.2.2(ruby_exec_node+0x1d) [0x7f2d435c682d] eval.c:317
/opt/ruby-2.2.0/lib/libruby.so.2.2(ruby_run_node+0x1c) [0x7f2d435c918c] eval.c:309

About this issue

  • Original URL
  • State: closed
  • Created 9 years ago
  • Comments: 22 (12 by maintainers)

Most upvoted comments

As long as you bundle update you can likely avoid listing celluloid-essentials a la carte. I’ve updated that github repository referenced by Celluloid already. Let me know what else you run into.