Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error in src/rdb_protocol/protocol.cc at line 737: Guarantee failed: [out->skey_version == resp->skey_version] #3976

Closed
pilt opened this issue Mar 25, 2015 · 14 comments
Assignees
Labels
Milestone

Comments

@pilt
Copy link

pilt commented Mar 25, 2015

This happened after an upgrade from 1.15 to 1.16 (1.16.2+1~0trusty). We rebuilt indexes long before this happened if that's relevant.

Log file:

2015-03-25T07:52:24.411662551 149301.999695s error: Error in src/rdb_protocol/protocol.cc at line 737:
2015-03-25T07:52:24.412349102 149302.000382s error: Guarantee failed: [out->skey_version == resp->skey_version]
2015-03-25T07:52:24.412362049 149302.000394s error: Backtrace:
2015-03-25T07:52:25.139231533 149302.727268s error: Wed Mar 25 07:52:24 2015\n\n1: backtrace_t::backtrace_t() at 0xb9d9f0 (/usr/bin/rethinkdb)\n2: format_backtrace(bool) at 0xb9dd83 (/usr/bin/rethinkdb)\n3: report_fatal_error(char const*, int, char const*, ...) at 0xd49fe5 (/usr/bin/rethinkdb)\n4: void rdb_r_unshard_visitor_t::unshard_range_batch<rget_read_response_t, rget_read_t>(rget_read_t const&, sorting_t) at 0xa85240 (/usr/bin/rethinkdb)\n5: read_t::unshard(read_response_t*, unsigned long, read_response_t*, rdb_context_t*, signal_t*) const at 0xa658cf (/usr/bin/rethinkdb)\n6: void cluster_namespace_interface_t::dispatch_immediate_op<read_t, fifo_enforcer_sink_t::exit_read_t, read_response_t>(void (master_access_t::*)(fifo_enforcer_sink_t::exit_read_t*), void (master_access_t::*)(read_t const&, read_response_t*, order_token_t, fifo_enforcer_sink_t::exit_read_t*, signal_t*), read_t const&, read_response_t*, order_token_t, signal_t*) at 0xd26121 (/usr/bin/rethinkdb)\n7: cluster_namespace_interface_t::read(read_t const&, read_response_t*, order_token_t, signal_t*) at 0xd1f7f9 (/usr/bin/rethinkdb)\n8: real_table_t::read_with_profile(ql::env_t*, read_t const&, read_response_t*, bool) at 0x98664c (/usr/bin/rethinkdb)\n9: ql::rget_response_reader_t::do_read(ql::env_t*, read_t const&) at 0x9a4cbb (/usr/bin/rethinkdb)\n10: ql::rget_reader_t::do_range_read(ql::env_t*, read_t const&) at 0x9a6208 (/usr/bin/rethinkdb)\n11: ql::rget_reader_t::load_items(ql::env_t*, ql::batchspec_t const&) at 0x9a6b7b (/usr/bin/rethinkdb)\n12: ql::rget_response_reader_t::next_batch(ql::env_t*, ql::batchspec_t const&) at 0x99fbf7 (/usr/bin/rethinkdb)\n13: ql::lazy_datum_stream_t::next_batch_impl(ql::env_t*, ql::batchspec_t const&) at 0x99be9b (/usr/bin/rethinkdb)\n14: ql::datum_stream_t::next_batch(ql::env_t*, ql::batchspec_t const&) at 0x99d182 (/usr/bin/rethinkdb)\n15: ql::slice_datum_stream_t::next_raw_batch(ql::env_t*, ql::batchspec_t const&) at 0x9a1570 (/usr/bin/rethinkdb)\n16: ql::eager_datum_stream_t::next_grouped_batch(ql::env_t*, ql::batchspec_t const&, std::map<ql::datum_t, std::vector<ql::datum_t, std::allocator<ql::datum_t> >, optional_datum_less_t, std::allocator<std::pair<ql::datum_t const, std::vector<ql::datum_t, std::allocator<ql::datum_t> > > > >*) at 0x99ed08 (/usr/bin/rethinkdb)\n17: ql::eager_datum_stream_t::next_batch_impl(ql::env_t*, ql::batchspec_t const&) at 0x99f2ce (/usr/bin/rethinkdb)\n18: ql::datum_stream_t::next_batch(ql::env_t*, ql::batchspec_t const&) at 0x99d182 (/usr/bin/rethinkdb)\n19: ql::slice_datum_stream_t::next_raw_batch(ql::env_t*, ql::batchspec_t const&) at 0x9a1570 (/usr/bin/rethinkdb)\n20: ql::eager_datum_stream_t::next_grouped_batch(ql::env_t*, ql::batchspec_t const&, std::map<ql::datum_t, std::vector<ql::datum_t, std::allocator<ql::datum_t> >, optional_datum_less_t, std::allocator<std::pair<ql::datum_t const, std::vector<ql::datum_t, std::allocator<ql::datum_t> > > > >*) at 0x99ed08 (/usr/bin/rethinkdb)\n21: ql::eager_datum_stream_t::next_batch_impl(ql::env_t*, ql::batchspec_t const&) at 0x99f2ce (/usr/bin/rethinkdb)\n22: ql::datum_stream_t::next_batch(ql::env_t*, ql::batchspec_t const&) at 0x99d182 (/usr/bin/rethinkdb)\n23: ql::stream_cache_t::serve(long, Response*, signal_t*) at 0x8f71c8 (/usr/bin/rethinkdb)\n24: ql::run(ql::protob_t<Query>, rdb_context_t*, signal_t*, ql::stream_cache_t*, ip_and_port_t const&, Response*) at 0xa499d2 (/usr/bin/rethinkdb)\n25: rdb_query_server_t::run_query(ql::protob_t<Query> const&, Response*, client_context_t*, ip_and_port_t const&) at 0x98021d (/usr/bin/rethinkdb)\n26: void query_server_t::connection_loop<json_protocol_t>(linux_tcp_conn_t*, client_context_t*) at 0xb993e6 (/usr/bin/rethinkdb)\n27: query_server_t::handle_conn(scoped_ptr_t<linux_tcp_conn_descriptor_t> const&, auto_drainer_t::lock_t) at 0xb95f8d (/usr/bin/rethinkdb)\n28: std::_Function_handler<void (scoped_ptr_t<linux_tcp_conn_descriptor_t>&), std::_Bind<std::_Mem_fn<void (query_server_t::*)(scoped_ptr_t<linux_tcp_conn_descriptor_t> const&, auto_drainer_t::lock_t)> (query_server_t*, std::_Placeholder<1>, auto_drainer_t::lock_t)> >::_M_invoke(std::_Any_data const&, scoped_ptr_t<linux_tcp_conn_descriptor_t>&) at 0xb97775 (/usr/bin/rethinkdb)\n29: linux_nonthrowing_tcp_listener_t::handle(int) at 0xab7c1c (/usr/bin/rethinkdb)\n30: coro_t::run() at 0xacfa68 (/usr/bin/rethinkdb)

Backtrace with newlines:

1: backtrace_t::backtrace_t() at 0xb9d9f0 (/usr/bin/rethinkdb)
2: format_backtrace(bool) at 0xb9dd83 (/usr/bin/rethinkdb)
3: report_fatal_error(char const*, int, char const*, ...) at 0xd49fe5 (/usr/bin/rethinkdb)
4: void rdb_r_unshard_visitor_t::unshard_range_batch<rget_read_response_t, rget_read_t>(rget_read_t const&, sorting_t) at 0xa85240 (/usr/bin/rethinkdb)
5: read_t::unshard(read_response_t*, unsigned long, read_response_t*, rdb_context_t*, signal_t*) const at 0xa658cf (/usr/bin/rethinkdb)
6: void cluster_namespace_interface_t::dispatch_immediate_op<read_t, fifo_enforcer_sink_t::exit_read_t, read_response_t>(void (master_access_t::*)(fifo_enforcer_sink_t::exit_read_t*), void (master_access_t::*)(read_t const&, read_response_t*, order_token_t, fifo_enforcer_sink_t::exit_read_t*, signal_t*), read_t const&, read_response_t*, order_token_t, signal_t*) at 0xd26121 (/usr/bin/rethinkdb)
7: cluster_namespace_interface_t::read(read_t const&, read_response_t*, order_token_t, signal_t*) at 0xd1f7f9 (/usr/bin/rethinkdb)
8: real_table_t::read_with_profile(ql::env_t*, read_t const&, read_response_t*, bool) at 0x98664c (/usr/bin/rethinkdb)
9: ql::rget_response_reader_t::do_read(ql::env_t*, read_t const&) at 0x9a4cbb (/usr/bin/rethinkdb)
10: ql::rget_reader_t::do_range_read(ql::env_t*, read_t const&) at 0x9a6208 (/usr/bin/rethinkdb)
11: ql::rget_reader_t::load_items(ql::env_t*, ql::batchspec_t const&) at 0x9a6b7b (/usr/bin/rethinkdb)
12: ql::rget_response_reader_t::next_batch(ql::env_t*, ql::batchspec_t const&) at 0x99fbf7 (/usr/bin/rethinkdb)
13: ql::lazy_datum_stream_t::next_batch_impl(ql::env_t*, ql::batchspec_t const&) at 0x99be9b (/usr/bin/rethinkdb)
14: ql::datum_stream_t::next_batch(ql::env_t*, ql::batchspec_t const&) at 0x99d182 (/usr/bin/rethinkdb)
15: ql::slice_datum_stream_t::next_raw_batch(ql::env_t*, ql::batchspec_t const&) at 0x9a1570 (/usr/bin/rethinkdb)
16: ql::eager_datum_stream_t::next_grouped_batch(ql::env_t*, ql::batchspec_t const&, std::map<ql::datum_t, std::vector<ql::datum_t, std::allocator<ql::datum_t> >, optional_datum_less_t, std::allocator<std::pair<ql::datum_t const, std::vector<ql::datum_t, std::allocator<ql::datum_t> > > > >*) at 0x99ed08 (/usr/bin/rethinkdb)
17: ql::eager_datum_stream_t::next_batch_impl(ql::env_t*, ql::batchspec_t const&) at 0x99f2ce (/usr/bin/rethinkdb)
18: ql::datum_stream_t::next_batch(ql::env_t*, ql::batchspec_t const&) at 0x99d182 (/usr/bin/rethinkdb)
19: ql::slice_datum_stream_t::next_raw_batch(ql::env_t*, ql::batchspec_t const&) at 0x9a1570 (/usr/bin/rethinkdb)
20: ql::eager_datum_stream_t::next_grouped_batch(ql::env_t*, ql::batchspec_t const&, std::map<ql::datum_t, std::vector<ql::datum_t, std::allocator<ql::datum_t> >, optional_datum_less_t, std::allocator<std::pair<ql::datum_t const, std::vector<ql::datum_t, std::allocator<ql::datum_t> > > > >*) at 0x99ed08 (/usr/bin/rethinkdb)
21: ql::eager_datum_stream_t::next_batch_impl(ql::env_t*, ql::batchspec_t const&) at 0x99f2ce (/usr/bin/rethinkdb)
22: ql::datum_stream_t::next_batch(ql::env_t*, ql::batchspec_t const&) at 0x99d182 (/usr/bin/rethinkdb)
23: ql::stream_cache_t::serve(long, Response*, signal_t*) at 0x8f71c8 (/usr/bin/rethinkdb)
24: ql::run(ql::protob_t<Query>, rdb_context_t*, signal_t*, ql::stream_cache_t*, ip_and_port_t const&, Response*) at 0xa499d2 (/usr/bin/rethinkdb)
25: rdb_query_server_t::run_query(ql::protob_t<Query> const&, Response*, client_context_t*, ip_and_port_t const&) at 0x98021d (/usr/bin/rethinkdb)
26: void query_server_t::connection_loop<json_protocol_t>(linux_tcp_conn_t*, client_context_t*) at 0xb993e6 (/usr/bin/rethinkdb)
27: query_server_t::handle_conn(scoped_ptr_t<linux_tcp_conn_descriptor_t> const&, auto_drainer_t::lock_t) at 0xb95f8d (/usr/bin/rethinkdb)
28: std::_Function_handler<void (scoped_ptr_t<linux_tcp_conn_descriptor_t>&), std::_Bind<std::_Mem_fn<void (query_server_t::*)(scoped_ptr_t<linux_tcp_conn_descriptor_t> const&, auto_drainer_t::lock_t)> (query_server_t*, std::_Placeholder<1>, auto_drainer_t::lock_t)> >::_M_invoke(std::_Any_data const&, scoped_ptr_t<linux_tcp_conn_descriptor_t>&) at 0xb97775 (/usr/bin/rethinkdb)
29: linux_nonthrowing_tcp_listener_t::handle(int) at 0xab7c1c (/usr/bin/rethinkdb)
30: coro_t::run() at 0xacfa68 (/usr/bin/rethinkdb)

Let me know if I can provide more information.

@danielmewes danielmewes added this to the 1.16.x milestone Mar 25, 2015
@danielmewes
Copy link
Member

@pilt sorry you had to run into this. Thank you for filing a bug report.
We'll try to fix this as quickly as possible.

A few questions:

  • Is the crash repeatable? Did it only happen once or does it happen every time you run a certain query?
  • Do you know which queries were running when this happened?
  • Do you run RethinkDB on a single server or a cluster? Are any of your tables sharded and/or replicated?
  • Have you created any new secondary indexes recently or changed the sharding/replication settings?

We might ask for a copy of your data files later for tracking down the issue. If it's possible, it would be awesome if you could shut down the server(s) and copy the RethinkDB data directory for later inspection before applying below work-around.

If the crash happens repeatedly, I suggest rebuilding all secondary indexes as a work-around. You can do that without downtime by following these steps:

  1. Build a new temporary index for each existing index. For an index with name "i" on table "t" in db "d", run the following query in the Data Explorer:
r.db("d").table("t").indexCreate("i_NEW", r.db("d").table("t").indexStatus("i")(0)("function"))
  1. Once the new index is done constructing, replace the old index with the new one:
r.db("d").table("t").indexRename("i_NEW", "i", {overwrite: true})

@mlucy Can you look into this please?

@chrisvariety
Copy link

Just ran into this myself, it didn't happen as part of an upgrade though.

I was playing around creating and deleting the same secondary index via the Web UI. I had just deleted the secondary index, then re-created it w/ slightly different definition. I went to query it (again via Web UI) and it said the index hadn't finished construction yet. So I tried the query again and the server crashed. There were no other queries running on the server.

Now whenever I try to access that index, the server crashes, so totally 100% reproducible with my data set when running a certain query, I assume the index is caught in some bad state? Maybe it wasn't fully deleted yet when I went to re-create it?

Happy to send my data directory to someone if you like!

Here's my backtrace if it is helpful:

Running rethinkdb 1.16.2-1 (CLANG 4.2 (clang-425.0.28))...
Running on Darwin 14.1.0 x86_64
Loading data from directory /Users/chrismcc/workspace/ti/rethinkdb_data
Listening for intracluster connections on port 29015
Listening for client driver connections on port 28015
Listening for administrative HTTP connections on port 8080
Listening on addresses: 127.0.0.1, ::1
To fully expose RethinkDB on the network, bind to all addresses by running rethinkdb with the `--bind all` command line option.
Server ready, "goldie_local_syz" 828ee31e-e0aa-4f93-aa1c-1612310a3e3b
Version: rethinkdb 1.16.2-1 (CLANG 4.2 (clang-425.0.28))
error: Error in src/rdb_protocol/protocol.cc at line 737:
error: Guarantee failed: [out->skey_version == resp->skey_version] 
error: Backtrace:
error: Wed Mar 25 20:42:44 2015

       1: 0   rethinkdb                           0x000000010852d6fb _Z11deserializeIL17cluster_version_t4EE16archive_result_tP13read_stream_tP17repli_timestamp_t + 539 at 0x10852d6fb ()
       2: 0   rethinkdb                           0x00000001081328ec _ZN26callable_action_instance_tI21pmap_runner_one_arg_tINSt3__16__bindIM29traversal_progress_combiner_tFviEJPS3_RNS1_12placeholders4__phILi1EEEEEExEED0Ev + 2684 at 0x1081328ec ()
       3: 0   rethinkdb                           0x0000000108133127 _ZN26callable_action_instance_tI21pmap_runner_one_arg_tINSt3__16__bindIM29traversal_progress_combiner_tFviEJPS3_RNS1_12placeholders4__phILi1EEEEEExEED0Ev + 4791 at 0x108133127 ()
       4: 0   rethinkdb                           0x000000010813250a _ZN26callable_action_instance_tI21pmap_runner_one_arg_tINSt3__16__bindIM29traversal_progress_combiner_tFviEJPS3_RNS1_12placeholders4__phILi1EEEEEExEED0Ev + 1690 at 0x10813250a ()
       5: 0   rethinkdb                           0x000000010832faec _Z11deserializeIL17cluster_version_t4EE16archive_result_tP13read_stream_tP13name_string_t + 8268 at 0x10832faec ()
       6: 0   rethinkdb                           0x0000000108444b1a _ZN23rdb_r_unshard_visitor_t19unshard_range_batchI20rget_read_response_t11rget_read_tEEvRKT0_9sorting_t + 874 at 0x108444b1a ()
       7: 0   rethinkdb                           0x0000000108440439 _ZN5boost6detail7variant13forced_returnIPKN7profile6stop_tEEET_v + 16345 at 0x108440439 ()
       8: 0   rethinkdb                           0x00000001082ebe78 _ZN29cluster_namespace_interface_t21dispatch_immediate_opI6read_tN20fifo_enforcer_sink_t11exit_read_tE15read_response_tEEvM15master_access_tFvPT0_EMS5_FvRKT_PT1_13order_token_tS7_P8signal_tESC_SE_SF_SH_ + 1928 at 0x1082ebe78 ()
       9: 0   rethinkdb                           0x00000001082e83ff _ZNK5boost6detail7variant9known_getIKN29reactor_business_card_details19primary_when_safe_tEEclIKNS3_9primary_tEEERS5_RT_ + 2927 at 0x1082e83ff ()
       10: 0   rethinkdb                           0x0000000108493b0f _ZNSt3__16__treeINS_4pairIPcP5cJSONEENS_19__map_value_compareIS2_S4_N14query_language21char_star_cmp_functorELb1EEENS_9allocatorIS5_EEE7destroyEPNS_11__tree_nodeIS5_PvEE + 2143 at 0x108493b0f ()
       11: 0   rethinkdb                           0x00000001083c6ba7 _ZNK2ql18datum_rcheckable_t12runtime_failENS_10base_exc_t6type_tEPKcS4_iNSt3__112basic_stringIcNS5_11char_traitsIcEENS5_9allocatorIcEEEE + 1799 at 0x1083c6ba7 ()
       12: 0   rethinkdb                           0x00000001083c7b7b _ZNK2ql18datum_rcheckable_t12runtime_failENS_10base_exc_t6type_tEPKcS4_iNSt3__112basic_stringIcNS5_11char_traitsIcEENS5_9allocatorIcEEEE + 5851 at 0x1083c7b7b ()
       13: 0   rethinkdb                           0x00000001083c853b _ZNK2ql18datum_rcheckable_t12runtime_failENS_10base_exc_t6type_tEPKcS4_iNSt3__112basic_stringIcNS5_11char_traitsIcEENS5_9allocatorIcEEEE + 8347 at 0x1083c853b ()
       14: 0   rethinkdb                           0x00000001083c6f16 _ZNK2ql18datum_rcheckable_t12runtime_failENS_10base_exc_t6type_tEPKcS4_iNSt3__112basic_stringIcNS5_11char_traitsIcEENS5_9allocatorIcEEEE + 2678 at 0x1083c6f16 ()
       15: 0   rethinkdb                           0x00000001083cdb5a _ZNK2ql18datum_rcheckable_t12runtime_failENS_10base_exc_t6type_tEPKcS4_iNSt3__112basic_stringIcNS5_11char_traitsIcEENS5_9allocatorIcEEEE + 30394 at 0x1083cdb5a ()
       16: 0   rethinkdb                           0x00000001083cca22 _ZNK2ql18datum_rcheckable_t12runtime_failENS_10base_exc_t6type_tEPKcS4_iNSt3__112basic_stringIcNS5_11char_traitsIcEENS5_9allocatorIcEEEE + 25986 at 0x1083cca22 ()
       17: 0   rethinkdb                           0x00000001084ba89a _ZN16backfill_chunk_t8sindexesERKNSt3__13mapINS0_12basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEE17secondary_index_tNS0_4lessIS7_EENS5_INS0_4pairIKS7_S8_EEEEEE + 1626 at 0x1084ba89a ()
       18: 0   rethinkdb                           0x00000001084bfc67 _ZN2ql11deserializeIL17cluster_version_t4EEE16archive_result_tP13read_stream_tPNS_5sym_tE + 18279 at 0x1084bfc67 ()
       19: 0   rethinkdb                           0x00000001084920de _ZN5boost9gregorian4dateC2ENS0_9greg_yearENS0_10greg_monthENS0_8greg_dayE + 3470 at 0x1084920de ()
       20: 0   rethinkdb                           0x000000010835b7e3 _ZNSt3__16__treeINS_4pairINS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEiEENS_19__map_value_compareIS7_iNS_4lessIS7_EELb1EEENS5_IS8_EEE7destroyEPNS_11__tree_nodeIS8_PvEE + 9203 at 0x10835b7e3 ()
       21: 0   rethinkdb                           0x0000000108351a7e _ZNKSt3__16__treeINS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEENS_4lessIS6_EENS4_IS6_EEE13__lower_boundIS6_EENS_21__tree_const_iteratorIS6_PKNS_11__tree_nodeIS6_PvEElEERKT_SH_SH_ + 1278 at 0x108351a7e ()
       22: 0   rethinkdb                           0x0000000108351a7e _ZNKSt3__16__treeINS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEENS_4lessIS6_EENS4_IS6_EEE13__lower_boundIS6_EENS_21__tree_const_iteratorIS6_PKNS_11__tree_nodeIS6_PvEElEERKT_SH_SH_ + 1278 at 0x108351a7e ()
       23: 0   rethinkdb                           0x0000000108346307 _ZNSt3__16__treeINS_4pairINS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEKS7_EENS_19__map_value_compareIS7_S8_NS_4lessIS7_EELb1EEENS5_IS9_EEE13__lower_boundIS7_EENS_15__tree_iteratorIS9_PNS_11__tree_nodeIS9_PvEElEERKT_SL_SL_ + 12551 at 0x108346307 ()
       24: 0   rethinkdb                           0x0000000108348df0 _ZN5boost3_bi5list3INS0_5valueIP13http_server_tEENS_3argILi1EEENS2_IN14auto_drainer_t6lock_tEEEEclINS_4_mfi3mf2IvS3_RK12scoped_ptr_tI27linux_tcp_conn_descriptor_tES9_EENS0_5list1IRSH_EEEEvNS0_4typeIvEERT_RT0_i + 80 at 0x108348df0 ()
       25: 0   rethinkdb                           0x0000000108348d60 _ZNSt3__110__function6__funcIN5boost3_bi6bind_tIvNS2_4_mfi3mf2Iv13http_server_tRK12scoped_ptr_tI27linux_tcp_conn_descriptor_tEN14auto_drainer_t6lock_tEEENS3_5list3INS3_5valueIPS7_EENS2_3argILi1EEENSH_ISE_EEEEEENS_9allocatorISO_EEFvRSA_EEclESR_ + 32 at 0x108348d60 ()
       26: 0   rethinkdb                           0x0000000108121d16 _ZN8signal_tD2Ev + 25046 at 0x108121d16 ()
       27: 0   rethinkdb                           0x0000000108128258 _ZN22threaded_context_ref_tC2Ev + 1304 at 0x108128258 ()
error: Exiting.
Trace/BPT trap: 5

@chrisvariety
Copy link

Actually, maybe not 100% reproducible, earlier I started the server back up (after the first crash) and re-ran the query and it blew up on me again, but after I made a sandwich and came back and started the server back up for a second time, the secondary index appears to be working now. Weird. I gzipped the directory in case you want it.

@pilt
Copy link
Author

pilt commented Mar 25, 2015

Shortly before we got this error we added a new index (on 1.16) and tried to use it before it was finished creating.

RqlRuntimeError: Index `foo_index` on table `db.table` was accessed before its construction was finished. in: r.table('table').between([27L, r.iso8601('1400-01-01T00:00:00+00:00')], [27L, r.iso8601('9999-12-31T23:59:59+00:00')], left_bound='closed', index='foo_index', right_bound='open').order_by(index=r.desc('foo_index')).without('id')

Just to clarify, what I meant earlier by that we had rebuilt all indexes was that we got warnings about indexes that needed to be rebuilt after we upgraded to 1.16. We had already done that when this error occurred.

We have not had this error again after the rethink daemon was restarted.

It's a clustered setup running on AWS.

@chrisvariety
Copy link

Could just be a coincidence but my index also involved date ranges!

On Wednesday, March 25, 2015, Simon Pantzare notifications@github.com
wrote:

Shortly before we got this error we added a new index (on 1.16) and tried
to use it before it was finished creating.

RqlRuntimeError: Index foo_index on table db.table was accessed before its construction was finished. in: r.table('table').between([27L, r.iso8601('1400-01-01T00:00:00+00:00')], [27L, r.iso8601('9999-12-31T23:59:59+00:00')], left_bound='closed', index='foo_index', right_bound='open').order_by(index=r.desc('foo_index')).without('id')


Reply to this email directly or view it on GitHub
#3976 (comment)
.

@danielmewes
Copy link
Member

Thanks @chrisvariety and @pilt !
We're looking into it.

@mlucy
Copy link
Member

mlucy commented Mar 25, 2015

Thanks for the report!

It looks like this bug occurs when you try and read from an sindex that is ready on some shards but not others. There's a fix in CR 2745 by @danielmewes .

@mlucy
Copy link
Member

mlucy commented Mar 25, 2015

The fix is in next, 2.0.x, and 1.16.x. @danielmewes -- should we do a point release for this?

@danielmewes
Copy link
Member

Even though this should rarely happen during normal operation, I think we should do a 1.16 point release since it's still a nasty crash. @AtnNn can you start the necessary steps please?
The new packages should be available in the next days.

The tested work around until then is to make a sandwich to give secondary index construction time to complete ;-)

@chrisvariety
Copy link

Fast work guys as usual! There's no sandwich emoji but here's a cookie: 🍪

@AtnNn AtnNn modified the milestones: 1.16.3, 1.16.x Mar 26, 2015
@pilt
Copy link
Author

pilt commented Mar 26, 2015

Impressed by how quickly you handled this, many thanks from Narrative!

@AtnNn
Copy link
Member

AtnNn commented Mar 27, 2015

@pilt @chrisvariety The newly released version, 1.16.3, contains a fix for this issue.

@chrisvariety
Copy link

you're the best ⭐

@pilt
Copy link
Author

pilt commented Mar 30, 2015

Awesome. :) ✨ 🍰 ✨

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants