Skip to content

Crash in next during replication #1389

Closed

Description

@mlucy

I created a 4-shard table on a 4-node cluster with ~1mil 2-kilobyte documents, then set the number of replicas and write acks to 2, producing this crash:

Version: rethinkdb 1.8.1-120-g038317-dirty (CLANG 3.2 (tags/RELEASE_32/final))
error: Error in ../src/rdb_protocol/lazy_json.cc at line 18:
error: Guarantee failed: [res == 0]  (errno 11 - Resource temporarily unavailable) disk corruption (or programmer error) detected
error: Backtrace:
Version: rethinkdb 1.8.1-120-g038317-dirty (CLANG 3.2 (tags/RELEASE_32/final))
error: Error in ../src/rdb_protocol/lazy_json.cc at line 18:
Version: rethinkdb 1.8.1-120-g038317-dirty (CLANG 3.2 (tags/RELEASE_32/final))
error: Error in ../src/rdb_protocol/lazy_json.cc at line 18:
error: Guarantee failed: [res == 0]  (errno 11 - Resource temporarily unavailable) disk corruption (or programmer error) detected
error: Guarantee failed: [res == 0]  (errno 11 - Resource temporarily unavailable) disk corruption (or programmer error) detected
error: Backtrace:
error: Backtrace:
error: Thu Aug 29 21:17:52 2013

       1: lazy_backtrace_t::lazy_backtrace_t() at backtrace.cc:250
       2: format_backtrace(bool) at backtrace.cc:196
       3: report_fatal_error(char const*, int, char const*, ...) at basic_string.h:287
       4: get_data(rdb_value_t const*, mc_transaction_t*) at lazy_json.cc:18
       5: post_construct_traversal_helper_t::process_a_leaf(mc_transaction_t*, mc_buf_lock_t*, btree_key_t const*, btree_key_t const*, signal_t*, int*) at lazy_json.hpp:13
       6: process_a_leaf_node(traversal_state_t*, scoped_ptr_t<mc_buf_lock_t>*, int, btree_key_t const*, btree_key_t const*) at parallel_traversal.cc:476
       7: do_a_subtree_traversal_fsm_t::on_node_ready(scoped_ptr_t<mc_buf_lock_t>*) at parallel_traversal.cc:421
       8: acquire_a_node_fsm_t::you_may_acquire() at scoped.hpp:63
       9: coro_pool_t<acquisition_waiter_callback_t*>::worker_run(acquisition_waiter_callback_t*, auto_drainer_t::lock_t) at coro_pool.hpp:70
       10: void boost::_bi::list3<boost::_bi::value<coro_pool_t<acquisition_waiter_callback_t*>*>, boost::_bi::value<acquisition_waiter_callback_t*>, boost::_bi::value<auto_drainer_t::lock_t> >::operator()<boost::_mfi::mf2<void, coro_pool_t<acquisition_waiter_callback_t*>, acquisition_waiter_callback_t*, auto_drainer_t::lock_t>, boost::_bi::list0>(boost::_bi::type<void>, boost::_mfi::mf2<void, coro_pool_t<acquisition_waiter_callback_t*>, acquisition_waiter_callback_t*, auto_drainer_t::lock_t>&, boost::_bi::list0&, int) at mem_fn_template.hpp:280
       11: callable_action_instance_t<boost::_bi::bind_t<void, boost::_mfi::mf2<void, coro_pool_t<acquisition_waiter_callback_t*>, acquisition_waiter_callback_t*, auto_drainer_t::lock_t>, boost::_bi::list3<boost::_bi::value<coro_pool_t<acquisition_waiter_callback_t*>*>, boost::_bi::value<acquisition_waiter_callback_t*>, boost::_bi::value<auto_drainer_t::lock_t> > > >::run_action() at callable_action.hpp:28
       12: coro_t::run() at coroutines.cc:186
error: Exiting.

@srh -- Cursory googling says errno 11 is EAGAIN; do we just need to put a loop around a system call somewhere, or is this a more serious problem?

Activity

  1. mlucy commented on Aug 30, 2013

    @mlucy
    MemberAuthor

    This happened again when I repeated the workload. The core file and the binary that produced it are in ~mlucy/bugs/1389 on newton.

  2. mlucy commented on Aug 30, 2013

    @mlucy
    MemberAuthor

    Oh, I also created three secondary indexes right after starting replication.

  3. jdoliner commented on Aug 30, 2013

    @jdoliner
    Contributor

    The EAGAIN is a red herring here it has nothing to do with the crash.

  4. jdoliner commented on Aug 30, 2013

    @jdoliner
    Contributor

    At least I don't think it does. It seems like someone just put a guarantee_err where it didn't belong.

  5. jdoliner commented on Aug 30, 2013

    @jdoliner
    Contributor

    Why is this in 1.9.x? We clearly can't ship 1.9 until this is fixed.

  6. coffeemug commented on Aug 30, 2013

    @coffeemug
    Contributor

    @jdoliner -- @mlucy said he found the issue in next, so I assumed it's something we did aside from the 1.9 changes. If this issue has always existed, or was introduced in next after 1.9 changes, then I think it's cool to do a point-release fix in 1.9.x. If it's actually been introduced with 1.9 changes, then it's another story and we should move it to 1.9 milestone.

  7. jdoliner commented on Aug 30, 2013

    @jdoliner
    Contributor

    lazy_json was added as part of #1295. This is almost certainly something caused by the 1.9 changes.

  8. jdoliner commented on Aug 30, 2013

    @jdoliner
    Contributor

    @srh can you take a look at this?

  9. coffeemug commented on Aug 30, 2013

    @coffeemug
    Contributor

    Ah I see, thanks.

  10. ghost assigned on Sep 1, 2013
  11. srh commented on Sep 2, 2013

    @srh
    Contributor

    It's a problem with buffer_group_read_stream_t if anything, it's what's getting an EAGAIN and crying about it.

  12. srh commented on Sep 2, 2013

    @srh
    Contributor

    get_data was moved to lazy_json.cc from btree.cc. The lazy_json_t code could cause a problem if its reference to the value was held past the valid lifetime, but I strongly doubt that's the case.

  13. srh commented on Sep 3, 2013

    @srh
    Contributor

    I need to work on #1328, which is very necessary and every day that gets pushed off creates more merge conflicts. It doesn't seem like this would have been caused by the introduction of lazy_json_t, for the reasons mentioned in the previous comment. I'm going to reassign this to nobody.

  14. jdoliner commented on Sep 3, 2013

    @jdoliner
    Contributor

    @mlucy can you show me how to reproduce this today? I can't get it to reproduce.

  15. ghost assigned on Sep 3, 2013
  16. 39 remaining items

  17. jdoliner commented on Dec 14, 2013

    @jdoliner
    Contributor

    While it might not be the cache's fault due to the structure of the new cache the need for this logic completely goes away so I'll be very surprised if it doesn't fix this bug.

  18. danielmewes commented on Dec 27, 2013

    @danielmewes
    Member

    @wildattire, @janpieper For database corruption following the deletion of a secondary index, see #1789

  19. modified the milestones: 1.12, subsequent on Feb 21, 2014
  20. mlucy commented on Feb 21, 2014

    @mlucy
    MemberAuthor

    Moving to 1.12 now that the cache is in next.

  21. danielmewes commented on Feb 21, 2014

    @danielmewes
    Member

    I will test this again.

  22. self-assigned this
    on Feb 21, 2014
  23. modified the milestones: , 1.12 on Mar 1, 2014
  24. danielmewes commented on Mar 13, 2014

    @danielmewes
    Member

    There were some regressions about this in 'next'.
    The fixes are in code review 1302 by @srh.
    I've tested the original scenario successfully with these changes applied.

  25. modified the milestones: 1.12, on Mar 13, 2014
  26. danielmewes commented on Mar 14, 2014

    @danielmewes
    Member

    The only thing that still sometimes stops this from working is #2073. Everything else seems fine. Closing in favor of #2073.

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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions