Details
Description
NB: The affected version is 1.3.14 ( https://rubygems.org/gems/couchbase/versions/1.3.14 ), not 1.3.15. I selected version 1.3.15 since I cannot select 1.3.14.
By doing some requests on Couchbase with N1QL sometimes I hit a segmentation fault.
The error does not occur at each occurrence, so it is not so easy to recreate.
Here the request:
N1QL request: SELECT `:id` AS `:id` FROM `bastard` WHERE `_system`.`type_obj` = 'session' AND `user`='c9ce85ad-1edd-46cc-97a7-7a494fa4913e'
And here the backlog:
(eval):3: [BUG] Segmentation fault at 0x00000000000018
ruby 2.3.1p112 (2016-04-26 revision 54768) [x86_64-linux]
– Control frame information -----------------------------------------------
c:0011 p:---- s:0041 e:000040 CFUNC :query
c:0010 p:0018 s:0037 e:000036 BLOCK (eval):3
c:0009 p:0008 s:0034 e:000033 BLOCK /home/stefanoseluxit/.rvm/gems/ruby-2.3.1@rest_service/gems/connection_pool-2.2.1/lib/connection_pool.rb:64 [FINISH]
c:0008 p:---- s:0032 e:000031 CFUNC :handle_interrupt
c:0007 p:0038 s:0028 e:000027 BLOCK /home/stefanoseluxit/.rvm/gems/ruby-2.3.1@rest_service/gems/connection_pool-2.2.1/lib/connection_pool.rb:63 [FINISH]
c:0006 p:---- s:0025 e:000024 CFUNC :handle_interrupt
c:0005 p:0030 s:0021 e:000020 METHOD /home/stefanoseluxit/.rvm/gems/ruby-2.3.1@rest_service/gems/connection_pool-2.2.1/lib/connection_pool.rb:60
c:0004 p:0011 s:0017 e:000016 METHOD (eval):2
c:0003 p:0030 s:0012 e:000011 BLOCK /home/stefanoseluxit/Documents/filemercurial/rest_service/database/couchbase.rb:38 [FINISH]
c:0002 p:0059 s:0009 e:000008 BLOCK /home/stefanoseluxit/.rvm/gems/ruby-2.3.1@rest_service/gems/eventmachine-1.2.0.1/lib/eventmachine.rb:1076 [FINISH]
c:0001 p:---- s:0002 e:000001 (none) [FINISH]
– Ruby level backtrace information ----------------------------------------
/home/stefanoseluxit/.rvm/gems/ruby-2.3.1@rest_service/gems/eventmachine-1.2.0.1/lib/eventmachine.rb:1076:in `block in spawn_threadpool'
/home/stefanoseluxit/Documents/filemercurial/rest_service/database/couchbase.rb:38:in `block in query_request'
(eval):2:in `query'
/home/stefanoseluxit/.rvm/gems/ruby-2.3.1@rest_service/gems/connection_pool-2.2.1/lib/connection_pool.rb:60:in `with'
/home/stefanoseluxit/.rvm/gems/ruby-2.3.1@rest_service/gems/connection_pool-2.2.1/lib/connection_pool.rb:60:in `handle_interrupt'
/home/stefanoseluxit/.rvm/gems/ruby-2.3.1@rest_service/gems/connection_pool-2.2.1/lib/connection_pool.rb:63:in `block in with'
/home/stefanoseluxit/.rvm/gems/ruby-2.3.1@rest_service/gems/connection_pool-2.2.1/lib/connection_pool.rb:63:in `handle_interrupt'
/home/stefanoseluxit/.rvm/gems/ruby-2.3.1@rest_service/gems/connection_pool-2.2.1/lib/connection_pool.rb:64:in `block (2 levels) in with'
(eval):3:in `block in query'
(eval):3:in `query'
– Machine register context ------------------------------------------------
RIP: 0x00007fb94a155fa8 RBP: 0x0000000000000008 RSP: 0x00007fb93afc8200
RAX: 0x000000000526fbb0 RBX: 0x0000000000000008 RCX: 0x0000000000000000
RDX: 0x0000000000000008 RDI: 0x0000000000000008 RSI: 0x000000000526fbb0
R8: 0x0000000000000008 R9: 0x00000000007dc9e0 R10: 0x000000000526fc62
R11: 0x0000000003001810 R12: 0x00007fb93afc82cb R13: 0x00007fb93afc8270
R14: 0x00007fb9080077a0 R15: 0x00000000052e0888 EFL: 0x0000000000010206
– C level backtrace information -------------------------------------------
/home/stefanoseluxit/.rvm/rubies/ruby-2.3.1/bin/../lib/libruby.so.2.3(rb_vm_bugreport+0x4ea) [0x7fb94a29368a] vm_dump.c:688
/home/stefanoseluxit/.rvm/rubies/ruby-2.3.1/bin/../lib/libruby.so.2.3(rb_bug_context+0xd4) [0x7fb94a125294] error.c:435
/home/stefanoseluxit/.rvm/rubies/ruby-2.3.1/bin/../lib/libruby.so.2.3(sigsegv+0x3e) [0x7fb94a20207e] signal.c:890
/lib/x86_64-linux-gnu/libc.so.6 [0x7fb949d124b0]
/home/stefanoseluxit/.rvm/rubies/ruby-2.3.1/bin/../lib/libruby.so.2.3(rb_hash_lookup2+0x8) [0x7fb94a155fa8] hash.c:802
/home/stefanoseluxit/.rvm/gems/ruby-2.3.1@rest_service/gems/couchbase-1.3.14/lib/couchbase_ext.so(n1ql_callback+0x1da) [0x7fb9438e02ba] n1ql.c:37
/usr/lib/x86_64-linux-gnu/libcouchbase.so.2 [0x7fb94365abb4]
/usr/lib/x86_64-linux-gnu/libcouchbase.so.2 [0x7fb943652ac2]
/usr/lib/x86_64-linux-gnu/libcouchbase.so.2 [0x7fb943631195]
/home/stefanoseluxit/.rvm/gems/ruby-2.3.1@rest_service/gems/couchbase-1.3.14/lib/couchbase_ext.so(timers_run+0x5a) [0x7fb9438d667a] multithread_plugin.c:384
/home/stefanoseluxit/.rvm/gems/ruby-2.3.1@rest_service/gems/couchbase-1.3.14/lib/couchbase_ext.so(loop_run_select+0x390) [0x7fb9438d6e80] multithread_plugin.c:651
/home/stefanoseluxit/.rvm/rubies/ruby-2.3.1/bin/../lib/libruby.so.2.3(rb_ensure+0xb0) [0x7fb94a12e310] eval.c:901
/home/stefanoseluxit/.rvm/gems/ruby-2.3.1@rest_service/gems/couchbase-1.3.14/lib/couchbase_ext.so(lcb_io_run_event_loop+0xa6) [0x7fb9438d7306] multithread_plugin.c:899
/usr/lib/x86_64-linux-gnu/libcouchbase.so.2(lcb_wait+0x53) [0x7fb943679673]
/home/stefanoseluxit/.rvm/gems/ruby-2.3.1@rest_service/gems/couchbase-1.3.14/lib/couchbase_ext.so(cb_bucket_query+0x128) [0x7fb9438e0648] n1ql.c:103
/home/stefanoseluxit/.rvm/rubies/ruby-2.3.1/bin/../lib/libruby.so.2.3(vm_call_cfunc+0xf0) [0x7fb94a27c5c0] vm_insnhelper.c:1638
/home/stefanoseluxit/.rvm/rubies/ruby-2.3.1/bin/../lib/libruby.so.2.3(vm_call_method_each_type+0x5e) [0x7fb94a28bf6e] vm_insnhelper.c:2022
/home/stefanoseluxit/.rvm/rubies/ruby-2.3.1/bin/../lib/libruby.so.2.3(vm_call_method+0xe3) [0x7fb94a28c4e3] vm_insnhelper.c:2172
/home/stefanoseluxit/.rvm/rubies/ruby-2.3.1/bin/../lib/libruby.so.2.3(vm_call_opt_send+0x14e) [0x7fb94a28c8fe] vm_insnhelper.c:1846
/home/stefanoseluxit/.rvm/rubies/ruby-2.3.1/bin/../lib/libruby.so.2.3(vm_exec_core+0x124b) [0x7fb94a2858cb] insns.def:964
/home/stefanoseluxit/.rvm/rubies/ruby-2.3.1/bin/../lib/libruby.so.2.3(vm_exec+0x86) [0x7fb94a28a4f6] vm.c:1650
/home/stefanoseluxit/.rvm/rubies/ruby-2.3.1/bin/../lib/libruby.so.2.3(invoke_block_from_c_0+0x2be) [0x7fb94a28b19e] vm.c:921
/home/stefanoseluxit/.rvm/rubies/ruby-2.3.1/bin/../lib/libruby.so.2.3(rb_yield+0x5c) [0x7fb94a28b40c] vm.c:988
/home/stefanoseluxit/.rvm/rubies/ruby-2.3.1/bin/../lib/libruby.so.2.3(rb_thread_s_handle_interrupt+0x115) [0x7fb94a2a2025] thread.c:1835
/home/stefanoseluxit/.rvm/rubies/ruby-2.3.1/bin/../lib/libruby.so.2.3(vm_call_cfunc+0xf0) [0x7fb94a27c5c0] vm_insnhelper.c:1638
/home/stefanoseluxit/.rvm/rubies/ruby-2.3.1/bin/../lib/libruby.so.2.3(vm_exec_core+0x124b) [0x7fb94a2858cb] insns.def:964
/home/stefanoseluxit/.rvm/rubies/ruby-2.3.1/bin/../lib/libruby.so.2.3(vm_exec+0x86) [0x7fb94a28a4f6] vm.c:1650
/home/stefanoseluxit/.rvm/rubies/ruby-2.3.1/bin/../lib/libruby.so.2.3(invoke_block_from_c_0+0x2be) [0x7fb94a28b19e] vm.c:921
/home/stefanoseluxit/.rvm/rubies/ruby-2.3.1/bin/../lib/libruby.so.2.3(rb_yield+0x5c) [0x7fb94a28b40c] vm.c:988
/home/stefanoseluxit/.rvm/rubies/ruby-2.3.1/bin/../lib/libruby.so.2.3(rb_thread_s_handle_interrupt+0x115) [0x7fb94a2a2025] thread.c:1835
/home/stefanoseluxit/.rvm/rubies/ruby-2.3.1/bin/../lib/libruby.so.2.3(vm_call_cfunc+0xf0) [0x7fb94a27c5c0] vm_insnhelper.c:1638
/home/stefanoseluxit/.rvm/rubies/ruby-2.3.1/bin/../lib/libruby.so.2.3(vm_exec_core+0x124b) [0x7fb94a2858cb] insns.def:964
/home/stefanoseluxit/.rvm/rubies/ruby-2.3.1/bin/../lib/libruby.so.2.3(vm_exec+0x86) [0x7fb94a28a4f6] vm.c:1650
/home/stefanoseluxit/.rvm/rubies/ruby-2.3.1/bin/../lib/libruby.so.2.3(invoke_block_from_c_0+0x2be) [0x7fb94a28b19e] vm.c:921
/home/stefanoseluxit/.rvm/rubies/ruby-2.3.1/bin/../lib/libruby.so.2.3(vm_invoke_proc+0xc3) [0x7fb94a28b273] vm.c:996
/home/stefanoseluxit/.rvm/rubies/ruby-2.3.1/bin/../lib/libruby.so.2.3(vm_call_opt_call+0xa4) [0x7fb94a28be94] vm.c:1072
/home/stefanoseluxit/.rvm/rubies/ruby-2.3.1/bin/../lib/libruby.so.2.3(vm_exec_core+0x1318) [0x7fb94a285998] insns.def:995
/home/stefanoseluxit/.rvm/rubies/ruby-2.3.1/bin/../lib/libruby.so.2.3(vm_exec+0x86) [0x7fb94a28a4f6] vm.c:1650
/home/stefanoseluxit/.rvm/rubies/ruby-2.3.1/bin/../lib/libruby.so.2.3(invoke_block_from_c_0+0x2be) [0x7fb94a28b19e] vm.c:921
/home/stefanoseluxit/.rvm/rubies/ruby-2.3.1/bin/../lib/libruby.so.2.3(vm_invoke_proc+0xc3) [0x7fb94a28b273] vm.c:996
/home/stefanoseluxit/.rvm/rubies/ruby-2.3.1/bin/../lib/libruby.so.2.3(thread_start_func_2+0x671) [0x7fb94a2a1001] thread.c:584
/home/stefanoseluxit/.rvm/rubies/ruby-2.3.1/bin/../lib/libruby.so.2.3(thread_start_func_1+0xd0) [0x7fb94a2a15c0] thread_pthread.c:882
/lib/x86_64-linux-gnu/libpthread.so.0(start_thread+0xca) [0x7fb949ac76ba]
/lib/x86_64-linux-gnu/libc.so.6(clone+0x6d) [0x7fb949de43dd] ../sysdeps/unix/sysv/linux/x86_64/clone.S:109
NB: At the moment I switched to Couchbase 1.3.15. I will add a comment if I will it this error on this version too.