Skip to content

Panic with "Guarantee failed: [d.has()]" in _debug_table_status access #3487

Closed

Description

@larkost

On next 254911a I am getting a panic with Guarantee failed: [d.has()] reliably when I open a connection to the new database and run the following commands:

import rethinkdb as r
r.connect().repl() # adjust port as needed
r.table_create('bob').run()
r.table('bob').insert([{'id':x} for x in xrange(1, 10001)]).run()
r.db('rethinkdb').table('_debug_table_status').filter({'db':r.db_config('test').nth(0)['id'], 'name':'bob'}).nth(0).run()

I get the panic both on newton and locally. If I remove the final nth(0) things work as expected. Here is the backtrace from the server:

Version: rethinkdb 1.15.2-1529-g47943e (debug) (GCC 4.6.3)
error: Error in src/rdb_protocol/val.cc at line 135:
error: Guarantee failed: [d.has()] 
error: Backtrace:
error: Fri Jan  2 18:21:58 2015

       1: rethinkdb_backtrace(void**, int) at rethinkdb_backtrace.cc:101
       2: backtrace_t::backtrace_t() at backtrace.cc:203
       3: lazy_backtrace_formatter_t::lazy_backtrace_formatter_t() at backtrace.cc:283
       4: format_backtrace(bool) at backtrace.cc:198
       5: report_fatal_error(char const*, int, char const*, ...) at errors.cc:83
       6: ql::single_selection_t::from_row(ql::env_t*, ql::protob_t<Backtrace const>, counted_t<ql::table_t>, ql::datum_t) at val.cc:135
       7: ql::nth_term_direct_impl(ql::term_t const*, ql::scope_env_t*, scoped_ptr_t<ql::val_t>, ql::val_t const*) at arr.cc:131
       8: ql::nth_term_impl(ql::term_t const*, ql::scope_env_t*, scoped_ptr_t<ql::val_t>, scoped_ptr_t<ql::val_t> const&) at arr.cc:161
       9: ql::nth_term_t::eval_impl(ql::scope_env_t*, ql::args_t*, ql::eval_flags_t) const at arr.cc:175
       10: ql::op_term_t::term_eval(ql::scope_env_t*, ql::eval_flags_t) const at op.cc:212
       11: ql::runtime_term_t::eval(ql::scope_env_t*, ql::eval_flags_t) const at term.cc:431
       12: ql::run(ql::protob_t<Query>, rdb_context_t*, signal_t*, ql::stream_cache_t*, ip_and_port_t const&, Response*) at term.cc:264
       13: rdb_query_server_t::run_query(ql::protob_t<Query> const&, Response*, client_context_t*, ip_and_port_t const&) at query_server.cc:61
       14: void query_server_t::connection_loop<json_protocol_t>(linux_tcp_conn_t*, client_context_t*) at protob.cc:315
       15: query_server_t::handle_conn(scoped_ptr_t<linux_tcp_conn_descriptor_t> const&, auto_drainer_t::lock_t) at protob.cc:277
       16: std::_Mem_fn<void (query_server_t::*)(scoped_ptr_t<linux_tcp_conn_descriptor_t> const&, auto_drainer_t::lock_t)>::operator()(query_server_t*, scoped_ptr_t<linux_tcp_conn_descriptor_t> const&, auto_drainer_t::lock_t) const at functional:551
       17: void 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)>::__call<void, scoped_ptr_t<linux_tcp_conn_descriptor_t>&, 0, 1, 2>(std::tuple<scoped_ptr_t<linux_tcp_conn_descriptor_t>&>&&, std::_Index_tuple<0, 1, 2>) at functional:1146
       18: void 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)>::operator()<scoped_ptr_t<linux_tcp_conn_descriptor_t>&, void>(scoped_ptr_t<linux_tcp_conn_descriptor_t>&&&) at functional:1206
       19: 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 functional:1780
       20: std::function<void (scoped_ptr_t<linux_tcp_conn_descriptor_t>&)>::operator()(scoped_ptr_t<linux_tcp_conn_descriptor_t>&) const at functional:2162
       21: linux_nonthrowing_tcp_listener_t::handle(int) at network.cc:930
       22: std::_Mem_fn<void (linux_nonthrowing_tcp_listener_t::*)(int)>::operator()(linux_nonthrowing_tcp_listener_t*, int) const at functional:551
       23: void std::_Bind<std::_Mem_fn<void (linux_nonthrowing_tcp_listener_t::*)(int)> (linux_nonthrowing_tcp_listener_t*, int)>::__call<void, , 0, 1>(std::tuple<>&&, std::_Index_tuple<0, 1>) at functional:1147
       24: void std::_Bind<std::_Mem_fn<void (linux_nonthrowing_tcp_listener_t::*)(int)> (linux_nonthrowing_tcp_listener_t*, int)>::operator()<, void>() at functional:1206
       25: callable_action_instance_t<std::_Bind<std::_Mem_fn<void (linux_nonthrowing_tcp_listener_t::*)(int)> (linux_nonthrowing_tcp_listener_t*, int)> >::run_action() at callable_action.hpp:31
       26: callable_action_wrapper_t::run() at runtime_utils.cc:43
       27: coro_t::run() at coroutines.cc:199
       28: void coro_t::spawn_now_dangerously<std::_Bind<std::_Mem_fn<void (linux_nonthrowing_tcp_listener_t::*)(int)> (linux_nonthrowing_tcp_listener_t*, int)> >(std::_Bind<std::_Mem_fn<void (linux_nonthrowing_tcp_listener_t::*)(int)> (linux_nonthrowing_tcp_listener_t*, int)>&&) at coroutines.hpp:52
       29: linux_nonthrowing_tcp_listener_t::accept_loop(auto_drainer_t::lock_t) at network.cc:898
       30: std::_Mem_fn<void (linux_nonthrowing_tcp_listener_t::*)(auto_drainer_t::lock_t)>::operator()(linux_nonthrowing_tcp_listener_t*, auto_drainer_t::lock_t) const at functional:551
       31: void std::_Bind<std::_Mem_fn<void (linux_nonthrowing_tcp_listener_t::*)(auto_drainer_t::lock_t)> (linux_nonthrowing_tcp_listener_t*, auto_drainer_t::lock_t)>::__call<void, , 0, 1>(std::tuple<>&&, std::_Index_tuple<0, 1>) at functional:1146
       32: void std::_Bind<std::_Mem_fn<void (linux_nonthrowing_tcp_listener_t::*)(auto_drainer_t::lock_t)> (linux_nonthrowing_tcp_listener_t*, auto_drainer_t::lock_t)>::operator()<, void>() at functional:1206
       33: callable_action_instance_t<std::_Bind<std::_Mem_fn<void (linux_nonthrowing_tcp_listener_t::*)(auto_drainer_t::lock_t)> (linux_nonthrowing_tcp_listener_t*, auto_drainer_t::lock_t)> >::run_action() at callable_action.hpp:31
       34: callable_action_wrapper_t::run() at runtime_utils.cc:43
       35: coro_t::run() at coroutines.cc:199
       36: coro_t* coro_t::spawn_sometime<std::_Bind<std::_Mem_fn<void (linux_nonthrowing_tcp_listener_t::*)(auto_drainer_t::lock_t)> (linux_nonthrowing_tcp_listener_t*, auto_drainer_t::lock_t)> >(std::_Bind<std::_Mem_fn<void (linux_nonthrowing_tcp_listener_t::*)(auto_drainer_t::lock_t)> (linux_nonthrowing_tcp_listener_t*, auto_drainer_t::lock_t)>&&) at coroutines.hpp:58
       37: linux_nonthrowing_tcp_listener_t::begin_listening() at network.cc:677
       38: linux_tcp_listener_t::linux_tcp_listener_t(std::set<ip_address_t, std::less<ip_address_t>, std::allocator<ip_address_t> > const&, int, std::function<void (scoped_ptr_t<linux_tcp_conn_descriptor_t>&)> const&) at network.cc:963
       39: query_server_t::query_server_t(rdb_context_t*, std::set<ip_address_t, std::less<ip_address_t>, std::allocator<ip_address_t> > const&, int, query_handler_t*, boost::shared_ptr<semilattice_readwrite_view_t<auth_semilattice_metadata_t> >) at protob.cc:177
       40: rdb_query_server_t::rdb_query_server_t(std::set<ip_address_t, std::less<ip_address_t>, std::allocator<ip_address_t> > const&, int, rdb_context_t*) at query_server.cc:18
       41: do_serve(io_backender_t*, bool, base_path_t const&, metadata_persistence::cluster_persistent_file_t*, metadata_persistence::auth_persistent_file_t*, serve_info_t const&, os_signal_cond_t*) at serve.cc:381
       42: serve(io_backender_t*, base_path_t const&, metadata_persistence::cluster_persistent_file_t*, metadata_persistence::auth_persistent_file_t*, serve_info_t const&, os_signal_cond_t*) at serve.cc:534
       43: run_rethinkdb_serve(base_path_t const&, serve_info_t*, file_direct_io_mode_t, int, boost::optional<boost::optional<unsigned long> > const&, uuid_u const*, cluster_semilattice_metadata_t const*, directory_lock_t*, bool*) at command_line.cc:797
       44: run_rethinkdb_porcelain(base_path_t const&, name_string_t const&, std::set<name_string_t, std::less<name_string_t>, std::allocator<name_string_t> > const&, file_direct_io_mode_t, int, boost::optional<boost::optional<unsigned long> > const&, bool, serve_info_t*, directory_lock_t*, bool*) at command_line.cc:868
       45: void std::_Bind<void (*(base_path_t, name_string_t, std::set<name_string_t, std::less<name_string_t>, std::allocator<name_string_t> >, file_direct_io_mode_t, int, boost::optional<boost::optional<unsigned long> >, bool, serve_info_t*, directory_lock_t*, bool*))(base_path_t const&, name_string_t const&, std::set<name_string_t, std::less<name_string_t>, std::allocator<name_string_t> > const&, file_direct_io_mode_t, int, boost::optional<boost::optional<unsigned long> > const&, bool, serve_info_t*, directory_lock_t*, bool*)>::__call<void, , 0, 1, 2, 3, 4, 5, 6, 7, 8, 9>(std::tuple<>&&, std::_Index_tuple<0, 1, 2, 3, 4, 5, 6, 7, 8, 9>) at functional:1147
       46: void std::_Bind<void (*(base_path_t, name_string_t, std::set<name_string_t, std::less<name_string_t>, std::allocator<name_string_t> >, file_direct_io_mode_t, int, boost::optional<boost::optional<unsigned long> >, bool, serve_info_t*, directory_lock_t*, bool*))(base_path_t const&, name_string_t const&, std::set<name_string_t, std::less<name_string_t>, std::allocator<name_string_t> > const&, file_direct_io_mode_t, int, boost::optional<boost::optional<unsigned long> > const&, bool, serve_info_t*, directory_lock_t*, bool*)>::operator()<, void>() at functional:1206
       47: std::_Function_handler<void (), std::_Bind<void (*(base_path_t, name_string_t, std::set<name_string_t, std::less<name_string_t>, std::allocator<name_string_t> >, file_direct_io_mode_t, int, boost::optional<boost::optional<unsigned long> >, bool, serve_info_t*, directory_lock_t*, bool*))(base_path_t const&, name_string_t const&, std::set<name_string_t, std::less<name_string_t>, std::allocator<name_string_t> > const&, file_direct_io_mode_t, int, boost::optional<boost::optional<unsigned long> > const&, bool, serve_info_t*, directory_lock_t*, bool*)> >::_M_invoke(std::_Any_data const&) at functional:1780
       48: std::function<void ()>::operator()() const at functional:2162
       49: starter_t::run_wrapper(std::function<void ()> const&) at runtime.cc:61
       50: std::_Mem_fn<void (starter_t::*)(std::function<void ()> const&)>::operator()(starter_t*, std::function<void ()> const&) const at functional:551
       51: void std::_Bind<std::_Mem_fn<void (starter_t::*)(std::function<void ()> const&)> (starter_t*, std::function<void ()>)>::__call<void, , 0, 1>(std::tuple<>&&, std::_Index_tuple<0, 1>) at functional:1147
       52: void std::_Bind<std::_Mem_fn<void (starter_t::*)(std::function<void ()> const&)> (starter_t*, std::function<void ()>)>::operator()<, void>() at functional:1206
       53: std::_Function_handler<void (), std::_Bind<std::_Mem_fn<void (starter_t::*)(std::function<void ()> const&)> (starter_t*, std::function<void ()>)> >::_M_invoke(std::_Any_data const&) at functional:1780
       54: std::function<void ()>::operator()() const at functional:2162
       55: callable_action_instance_t<std::function<void ()>&>::run_action() at callable_action.hpp:31
       56: callable_action_wrapper_t::run() at runtime_utils.cc:43
       57: coro_t::run() at coroutines.cc:199
       58: coro_t* coro_t::spawn_sometime<std::function<void ()>&>(std::function<void ()>&&&) at coroutines.hpp:58
       59: starter_t::on_thread_switch() at runtime.cc:57
       60: linux_message_hub_t::on_event(int) at message_hub.cc:154
       61: epoll_event_queue_t::run() at epoll.cc:115
       62: linux_thread_pool_t::start_thread(void*) at thread_pool.cc:160
       63: /lib/x86_64-linux-gnu/libpthread.so.0(+0x7e9a) [0x7f54bee0ce9a] at 0x7f54bee0ce9a (/lib/x86_64-linux-gnu/libpthread.so.0)
       64: clone+0x6d at 0x7f54beb3a2ed (/lib/x86_64-linux-gnu/libc.so.6)
error: Exiting.
Trace/breakpoint trap (core dumped)

Activity

  1. added this to the 1.16 milestone on Jan 3, 2015
  2. danielmewes commented on Jan 3, 2015

    @danielmewes
    Member

    @Tryneus or @timmaxw can you pick this?

  3. Tryneus commented on Jan 6, 2015

    @Tryneus
    Member

    Looking into this (and #3501).

  4. self-assigned this
    on Jan 6, 2015
  5. Tryneus commented on Jan 6, 2015

    @Tryneus
    Member

    This was caused by an assertion that the row had a field corresponding to the primary key of the table - same as #3501, just a different assertion. Up in review 2431.

  6. Tryneus commented on Jan 6, 2015

    @Tryneus
    Member

    The fix has been approved and merged to next in commit 6598f54. Will be in release 1.16.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions