Project

General

Profile

Bug #17879

Updated by byroot (Jean Boussier) over 3 years ago

I recently re-enabled our ruby-head CI with `-DRUBY_DEBUG`, and we're hitting this bug consistently, and early in during the test suite. application boot. 

 What's very weird is that we're not using Ractors at all. 

 ``` 
 /app/lib/active_support/cache/versioned_memcached_store.rb:160: [BUG] id == 0 but not shareable 
 ruby 3.1.0dev (2021-05-21T19:16:35Z shopify b2fc592c30) [x86_64-linux] 
 -- C level backtrace information ------------------------------------------- 
 /usr/local/bin/ruby(rb_print_backtrace+0x11) [0x55c4b1f0ecf7] vm_dump.c:759 
 /usr/local/bin/ruby(rb_vm_bugreport) vm_dump.c:1041 
 /usr/local/bin/ruby(bug_report_end+0x0) [0x55c4b1d42a1f] error.c:777 
 /usr/local/bin/ruby(rb_bug_without_die) error.c:777 
 /usr/local/bin/ruby(die+0x0) [0x55c4b1d1157a] error.c:785 
 /usr/local/bin/ruby(rb_bug) error.c:787 
 /usr/local/bin/ruby(rb_ractor_confirm_belonging+0x29) [0x55c4b1ee0af5] ractor_core.h:328 
 /usr/local/bin/ruby(rb_ractor_confirm_belonging) ractor_core.h:321 
 /usr/local/bin/ruby(vm_exec_core+0x3231) [0x55c4b1efea71] vm.inc:2561 
 /usr/local/bin/ruby(rb_vm_exec+0xbc) [0x55c4b1ef0f2c] vm.c:2169 
 /usr/local/bin/ruby(rb_ec_ractor_ptr+0x0) [0x55c4b1ef1e8a] vm.c:1290 
 /usr/local/bin/ruby(rb_ec_ractor_hooks) vm_core.h:2004 
 /usr/local/bin/ruby(invoke_bmethod) vm.c:1292 
 /usr/local/bin/ruby(invoke_iseq_block_from_c) vm.c:1335 
 /usr/local/bin/ruby(invoke_block_from_c_proc) vm.c:1432 
 /usr/local/bin/ruby(rb_vm_invoke_bmethod) vm.c:1468 
 /usr/local/bin/ruby(vm_call_bmethod+0x16b) [0x55c4b1ef22ab] vm_insnhelper.c:3002 
 /usr/local/bin/ruby(vm_sendish+0x30e) [0x55c4b1ef070e] vm_insnhelper.c:4521 
 /usr/local/bin/ruby(vm_exec_core+0x3302) [0x55c4b1efeb42] insns.def:860 
 /usr/local/bin/ruby(rb_vm_exec+0xbc) [0x55c4b1ef0f2c] vm.c:2169 
 /usr/local/bin/ruby(vm_call0_body+0x40f) [0x55c4b1ef6aff] vm_eval.c:178 
 /usr/local/bin/ruby(rb_vm_call0+0xfb) [0x55c4b1ef712b] vm_eval.c:57 
 /usr/local/bin/ruby(umethod_bind_call+0x11e) [0x55c4b1e0b2ee] proc.c:2437 
 /usr/local/bin/ruby(vm_call_cfunc_with_frame+0x10e) [0x55c4b1ee4c6e] vm_insnhelper.c:2943 
 /usr/local/bin/ruby(vm_sendish+0x30e) [0x55c4b1ef070e] vm_insnhelper.c:4521 
 /usr/local/bin/ruby(vm_exec_core+0x16c) [0x55c4b1efb9ac] insns.def:754 
 /usr/local/bin/ruby(rb_vm_exec+0xbc) [0x55c4b1ef0f2c] vm.c:2169 
 /usr/local/bin/ruby(rb_ec_ractor_ptr+0x0) [0x55c4b1ef1e8a] vm.c:1290 
 /usr/local/bin/ruby(rb_ec_ractor_hooks) vm_core.h:2004 
 /usr/local/bin/ruby(invoke_bmethod) vm.c:1292 
 /usr/local/bin/ruby(invoke_iseq_block_from_c) vm.c:1335 
 /usr/local/bin/ruby(invoke_block_from_c_proc) vm.c:1432 
 /usr/local/bin/ruby(rb_vm_invoke_bmethod) vm.c:1468 
 /usr/local/bin/ruby(vm_call_bmethod+0x16b) [0x55c4b1ef22ab] vm_insnhelper.c:3002 
 /usr/local/bin/ruby(vm_sendish+0x30e) [0x55c4b1ef070e] vm_insnhelper.c:4521 
 /usr/local/bin/ruby(vm_exec_core+0xf7) [0x55c4b1efb937] insns.def:773 
 /usr/local/bin/ruby(rb_vm_exec+0xbc) [0x55c4b1ef0f2c] vm.c:2169 
 /usr/local/bin/ruby(vm_call0_body+0x40f) [0x55c4b1ef6aff] vm_eval.c:178 
 /usr/local/bin/ruby(rb_vm_call0+0xfb) [0x55c4b1ef712b] vm_eval.c:57 
 /usr/local/bin/ruby(umethod_bind_call+0x11e) [0x55c4b1e0b2ee] proc.c:2437 
 /usr/local/bin/ruby(vm_call_cfunc_with_frame+0x10e) [0x55c4b1ee4c6e] vm_insnhelper.c:2943 
 /usr/local/bin/ruby(vm_sendish+0x30e) [0x55c4b1ef070e] vm_insnhelper.c:4521 
 /usr/local/bin/ruby(vm_exec_core+0x16c) [0x55c4b1efb9ac] insns.def:754 
 /usr/local/bin/ruby(rb_vm_exec+0xbc) [0x55c4b1ef0f2c] vm.c:2169 
 /usr/local/bin/ruby(rb_ec_ractor_ptr+0x0) [0x55c4b1ef1e8a] vm.c:1290 
 /usr/local/bin/ruby(rb_ec_ractor_hooks) vm_core.h:2004 
 /usr/local/bin/ruby(invoke_bmethod) vm.c:1292 
 /usr/local/bin/ruby(invoke_iseq_block_from_c) vm.c:1335 
 /usr/local/bin/ruby(invoke_block_from_c_proc) vm.c:1432 
 /usr/local/bin/ruby(rb_vm_invoke_bmethod) vm.c:1468 
 /usr/local/bin/ruby(vm_call_bmethod+0x16b) [0x55c4b1ef22ab] vm_insnhelper.c:3002 
 /usr/local/bin/ruby(vm_sendish+0x30e) [0x55c4b1ef070e] vm_insnhelper.c:4521 
 /usr/local/bin/ruby(vm_exec_core+0xf7) [0x55c4b1efb937] insns.def:773 
 /usr/local/bin/ruby(rb_vm_exec+0xbc) [0x55c4b1ef0f2c] vm.c:2169 
 /usr/local/bin/ruby(vm_call0_body+0x40f) [0x55c4b1ef6aff] vm_eval.c:178 
 /usr/local/bin/ruby(rb_vm_call0+0xfb) [0x55c4b1ef712b] vm_eval.c:57 
 /usr/local/bin/ruby(umethod_bind_call+0x11e) [0x55c4b1e0b2ee] proc.c:2437 
 /usr/local/bin/ruby(vm_call_cfunc_with_frame+0x10e) [0x55c4b1ee4c6e] vm_insnhelper.c:2943 
 /usr/local/bin/ruby(vm_sendish+0x30e) [0x55c4b1ef070e] vm_insnhelper.c:4521 
 /usr/local/bin/ruby(vm_exec_core+0x16c) [0x55c4b1efb9ac] insns.def:754 
 /usr/local/bin/ruby(rb_vm_exec+0xbc) [0x55c4b1ef0f2c] vm.c:2169 
 /usr/local/bin/ruby(rb_ec_ractor_ptr+0x0) [0x55c4b1ef1e8a] vm.c:1290 
 /usr/local/bin/ruby(rb_ec_ractor_hooks) vm_core.h:2004 
 /usr/local/bin/ruby(invoke_bmethod) vm.c:1292 
 /usr/local/bin/ruby(invoke_iseq_block_from_c) vm.c:1335 
 /usr/local/bin/ruby(invoke_block_from_c_proc) vm.c:1432 
 /usr/local/bin/ruby(rb_vm_invoke_bmethod) vm.c:1468 
 /usr/local/bin/ruby(vm_call_bmethod+0x16b) [0x55c4b1ef22ab] vm_insnhelper.c:3002 
 /usr/local/bin/ruby(vm_sendish+0x30e) [0x55c4b1ef070e] vm_insnhelper.c:4521 
 /usr/local/bin/ruby(vm_exec_core+0xf7) [0x55c4b1efb937] insns.def:773 
 /usr/local/bin/ruby(rb_vm_exec+0xbc) [0x55c4b1ef0f2c] vm.c:2169 
 /usr/local/bin/ruby(yield_under+0x264) [0x55c4b1ef4f24] vm.c:1387 
 /usr/local/bin/ruby(vm_call_cfunc_with_frame+0x10e) [0x55c4b1ee4c6e] vm_insnhelper.c:2943 
 /usr/local/bin/ruby(vm_call_method_each_type+0x7d) [0x55c4b1ef23ad] vm_insnhelper.c:3433 
 /usr/local/bin/ruby(vm_call_method+0x11f) [0x55c4b1ef2bff] vm_insnhelper.c:3551 
 /usr/local/bin/ruby(vm_call_symbol+0x15d) [0x55c4b1ef32dd] vm_insnhelper.c:3157 
 /usr/local/bin/ruby(vm_sendish+0x30e) [0x55c4b1ef070e] vm_insnhelper.c:4521 
 /usr/local/bin/ruby(vm_exec_core+0x16c) [0x55c4b1efb9ac] insns.def:754 
 /usr/local/bin/ruby(rb_vm_exec+0xbc) [0x55c4b1ef0f2c] vm.c:2169 
 /usr/local/bin/ruby(rb_ec_ractor_ptr+0x0) [0x55c4b1ef1e8a] vm.c:1290 
 /usr/local/bin/ruby(rb_ec_ractor_hooks) vm_core.h:2004 
 /usr/local/bin/ruby(invoke_bmethod) vm.c:1292 
 /usr/local/bin/ruby(invoke_iseq_block_from_c) vm.c:1335 
 /usr/local/bin/ruby(invoke_block_from_c_proc) vm.c:1432 
 /usr/local/bin/ruby(rb_vm_invoke_bmethod) vm.c:1468 
 /usr/local/bin/ruby(vm_call_bmethod+0x16b) [0x55c4b1ef22ab] vm_insnhelper.c:3002 
 /usr/local/bin/ruby(vm_call_method_each_type+0x1b5) [0x55c4b1ef24e5] vm_insnhelper.c:3459 
 /usr/local/bin/ruby(vm_call_method+0x11f) [0x55c4b1ef2bff] vm_insnhelper.c:3551 
 /usr/local/bin/ruby(vm_call_symbol+0x15d) [0x55c4b1ef32dd] vm_insnhelper.c:3157 
 /usr/local/bin/ruby(vm_call_method_each_type+0x62d) [0x55c4b1ef295d] vm_insnhelper.c:3469 
 /usr/local/bin/ruby(vm_call_method+0x11f) [0x55c4b1ef2bff] vm_insnhelper.c:3551 
 /usr/local/bin/ruby(vm_sendish+0x30e) [0x55c4b1ef070e] vm_insnhelper.c:4521 
 /usr/local/bin/ruby(vm_exec_core+0xf7) [0x55c4b1efb937] insns.def:773 
 /usr/local/bin/ruby(rb_vm_exec+0xbc) [0x55c4b1ef0f2c] vm.c:2169 
 /usr/local/bin/ruby(catch_i+0x9d) [0x55c4b1ef59ad] vm.c:1395 
 /usr/local/bin/ruby(vm_catch_protect+0x107) [0x55c4b1eeb087] vm_eval.c:2418 
 /usr/local/bin/ruby(rb_catch_obj+0x28) [0x55c4b1eeb31d] vm_eval.c:2444 
 /usr/local/bin/ruby(rb_f_catch) vm_eval.c:2394 
 /usr/local/bin/ruby(vm_call_cfunc_with_frame+0x10e) [0x55c4b1ee4c6e] vm_insnhelper.c:2943 
 /usr/local/bin/ruby(vm_sendish+0x30e) [0x55c4b1ef070e] vm_insnhelper.c:4521 
 /usr/local/bin/ruby(vm_exec_core+0x16c) [0x55c4b1efb9ac] insns.def:754 
 /usr/local/bin/ruby(rb_vm_exec+0xbc) [0x55c4b1ef0f2c] vm.c:2169 
 /usr/local/bin/ruby(rb_vm_invoke_proc+0x6f) [0x55c4b1ef664f] vm.c:1482 
 /usr/local/bin/ruby(rb_proc_call+0x117) [0x55c4b1e080b7] proc.c:1001 
 /usr/local/bin/ruby(exec_end_procs_chain+0x44) [0x55c4b1d4cd6d] eval_jump.c:105 
 /usr/local/bin/ruby(rb_ec_exec_end_proc) eval_jump.c:120 
 /usr/local/bin/ruby(rb_ec_teardown+0xdd) [0x55c4b1d4cf6d] eval.c:175 
 /usr/local/bin/ruby(rb_ec_cleanup+0x1f1) [0x55c4b1d4d221] eval.c:243 
 /usr/local/bin/ruby(ruby_run_node+0x62) [0x55c4b1d4dcb2] eval.c:375 
 /usr/local/bin/ruby(main+0x73) [0x55c4b1d3f4d3] ./main.c:47 
 ``` 

Back