rethinkdb / rethinkdb

The open-source database for the realtime web.
https://rethinkdb.com
Other
26.75k stars 1.86k forks source link

Full Crash on getAll with multiple keys, one or more of which doesn't exist #5102

Closed timshannon closed 8 years ago

timshannon commented 8 years ago

I'm simply doing

r.db("database").table("table").getAll(
"key-that-exists" ,
"key-that-doesnot-exist" 
)

And I'm getting a crash of the rethink service. Here's an excerpt from my /var/lib/rethinkdb/default/data/log_file.

2015-11-16T22:15:40.874666199 0.009073s notice: Running rethinkdb 2.2.0~0wily (GCC 5.2.1)...
2015-11-16T22:15:40.876807369 0.011216s notice: Running on Linux 4.1.5-x86_64-linode61 x86_64
2015-11-16T22:15:40.876842456 0.011249s notice: Loading data from directory /var/lib/rethinkdb/default/data
2015-11-16T22:15:40.889597826 0.024005s info: Automatically using cache size of 100 MB
2015-11-16T22:15:40.889776940 0.024183s warn: Cache size does not leave much memory for server and query overhead (available memory: 516 MB).
2015-11-16T22:15:40.889781920 0.024189s warn: Cache size is very low and may impact performance.
2015-11-16T22:15:40.891735106 0.026142s notice: Listening for intracluster connections on port 29015
2015-11-16T22:15:41.069716351 0.204123s notice: Listening for client driver connections on port 28015
2015-11-16T22:15:41.070024377 0.204431s notice: Listening for administrative HTTP connections on port 8090
2015-11-16T22:15:41.071891738 0.206298s notice: Listening on addresses: 127.0.0.1, 127.0.1.1, 45.33.4.171, ::1, 2600:3c00::f03c:91ff:fe18:43bf, fe80::f03c:91ff:fe18:43bf%3
2015-11-16T22:15:41.071942225 0.206349s notice: Server ready, "git_re0" 9be289cd-d0da-4ba5-af9a-8e560b04207c
2015-11-16T22:15:42.147424316 1.281831s info: Table 58b0f7e8-7f13-4b34-9af1-80b4d6af50f3: Starting a new Raft election for term 23.
2015-11-16T22:15:42.148564596 1.282971s info: Table 58b0f7e8-7f13-4b34-9af1-80b4d6af50f3: This server is Raft leader for term 23. Latest log index is 66.
2015-11-16T22:15:42.323683837 1.458091s info: Table 4b8d709b-7445-4e6b-ab6b-56a7dbc955dd: Starting a new Raft election for term 23.
2015-11-16T22:15:42.330414188 1.464821s info: Table 4b8d709b-7445-4e6b-ab6b-56a7dbc955dd: This server is Raft leader for term 23. Latest log index is 70.
2015-11-16T22:15:42.373351350 1.507758s info: Table 78bbcad4-e709-4c17-afde-217d75d0c9e7: Starting a new Raft election for term 23.
2015-11-16T22:15:42.385452540 1.519859s info: Table 78bbcad4-e709-4c17-afde-217d75d0c9e7: This server is Raft leader for term 23. Latest log index is 74.
2015-11-16T22:15:42.477917275 1.612324s info: Table 9a7df46c-774f-4ec5-af6a-a54d55e25489: Starting a new Raft election for term 23.
2015-11-16T22:15:42.483758187 1.618165s info: Table 9a7df46c-774f-4ec5-af6a-a54d55e25489: This server is Raft leader for term 23. Latest log index is 66.
2015-11-16T22:15:42.498694937 1.633102s info: Table 35eabd4a-b751-4a1e-a0db-9f4d9effd709: Starting a new Raft election for term 23.
2015-11-16T22:15:42.511101714 1.645509s info: Table 35eabd4a-b751-4a1e-a0db-9f4d9effd709: This server is Raft leader for term 23. Latest log index is 69.
2015-11-16T22:15:42.568432109 1.702839s info: Table 1baac53b-c51e-4631-b4b8-903a3901c0ca: Starting a new Raft election for term 15.
2015-11-16T22:15:42.569079357 1.703486s info: Table 1baac53b-c51e-4631-b4b8-903a3901c0ca: This server is Raft leader for term 15. Latest log index is 45.
2015-11-16T22:15:42.670013432 1.804420s info: Table 39b0d5f7-b6db-47a6-8dae-5ef520a14789: Starting a new Raft election for term 23.
2015-11-16T22:15:42.671119861 1.805527s info: Table 39b0d5f7-b6db-47a6-8dae-5ef520a14789: This server is Raft leader for term 23. Latest log index is 82.
2015-11-16T22:15:42.717384200 1.851791s info: Table c1cdf52a-592d-4a8c-af30-62de68a77ca1: Starting a new Raft election for term 17.
2015-11-16T22:15:42.727786291 1.862193s info: Table c1cdf52a-592d-4a8c-af30-62de68a77ca1: This server is Raft leader for term 17. Latest log index is 74.
2015-11-16T22:18:27.280453025 166.414860s error: Error in src/rdb_protocol/datum_stream.cc at line 855:
2015-11-16T22:18:27.280530128 166.414937s error: Guarantee failed: [found_hash_pair]
2015-11-16T22:18:27.280547255 166.414954s error: Backtrace:
2015-11-16T22:18:27.456227938 166.590638s error: Mon Nov 16 22:18:27 2015\n\n1 [0xad3fca]: backtrace_t::backtrace_t() at ??:?\n2 [0xad44aa]: format_backtrace[abi:cxx11](bool) at ??:?\n3 [0xd60416]: report_fatal_error(char const*, int, char const*, ...) at ??:?\n4 [0x82fb9b]: ql::primary_readgen_t::restrict_active_ranges(sorting_t, ql::active_ranges_t*) const at ??:?\n5 [0x82d466]: ql::rget_response_reader_t::unshard(sorting_t, rget_read_response_t&&) at ??:?\n6 [0x8353c3]: ql::rget_reader_t::do_range_read(ql::env_t*, read_t const&) at ??:?\n7 [0x8358be]: ql::rget_reader_t::load_items(ql::env_t*, ql::batchspec_t const&) at ??:?\n8 [0x828268]: ql::rget_response_reader_t::next_batch(ql::env_t*, ql::batchspec_t const&) at ??:?\n9 [0x8239cd]: ql::lazy_datum_stream_t::next_batch_impl(ql::env_t*, ql::batchspec_t const&) at ??:?\n10 [0x825727]: ql::datum_stream_t::next_batch(ql::env_t*, ql::batchspec_t const&) at ??:?\n11 [0x73325e]: ql::query_cache_t::ref_t::serve(ql::env_t*, ql::response_t*) at ??:?\n12 [0x735332]: ql::query_cache_t::ref_t::fill_response(ql::response_t*) at ??:?\n13 [0x80701b]: rdb_query_server_t::run_query(ql::query_params_t*, ql::response_t*, signal_t*) at ??:?\n14 [0xacd64d]: query_server_t::handle(http_req_t const&, http_res_t*, signal_t*) at ??:?\n15 [0xa2e37a]: routing_http_app_t::handle(http_req_t const&, http_res_t*, signal_t*) at ??:?\n16 [0xa2e37a]: routing_http_app_t::handle(http_req_t const&, http_res_t*, signal_t*) at ??:?\n17 [0xa3979c]: http_server_t::handle_conn(scoped_ptr_t<linux_tcp_conn_descriptor_t> const&, auto_drainer_t::lock_t) at ??:?\n18 [0xa3a1d6]: std::_Function_handler<void (scoped_ptr_t<linux_tcp_conn_descriptor_t>&), boost::_bi::bind_t<void, boost::_mfi::mf2<void, http_server_t, scoped_ptr_t<linux_tcp_conn_descriptor_t> const&, auto_drainer_t::lock_t>, boost::_bi::list3<boost::_bi::value<http_server_t*>, boost::arg<1>, boost::_bi::value<auto_drainer_t::lock_t> > > >::_M_invoke(std::_Any_data const&, scoped_ptr_t<linux_tcp_conn_descriptor_t>&) at ??:?\n19 [0x9c65ac]: linux_nonthrowing_tcp_listener_t::handle(int) at ??:?\n20 [0x9e1452]: coro_t::run() at ??:?
2015-11-16T22:18:27.456311799 166.590718s error: Exiting.

I can send you a data file or whatever else you guys need.

edited to remove redundant instances of the error in the log entry copy

timshannon commented 8 years ago

Apologies. Looks like this is the same as issue #5085

danielmewes commented 8 years ago

Sorry for running into it @timshannon . The updated version should be out by late tomorrow. You can build from source from the branch mlucy_5085 if you need the fix before then.

timshannon commented 8 years ago

No worries, that's what the dev environment is for :smile: