Closed
Description
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
mlucy commentedon Aug 30, 2013
This happened again when I repeated the workload. The core file and the binary that produced it are in ~mlucy/bugs/1389 on newton.
mlucy commentedon Aug 30, 2013
Oh, I also created three secondary indexes right after starting replication.
jdoliner commentedon Aug 30, 2013
The EAGAIN is a red herring here it has nothing to do with the crash.
jdoliner commentedon Aug 30, 2013
At least I don't think it does. It seems like someone just put a guarantee_err where it didn't belong.
jdoliner commentedon Aug 30, 2013
Why is this in 1.9.x? We clearly can't ship 1.9 until this is fixed.
coffeemug commentedon Aug 30, 2013
@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.
jdoliner commentedon Aug 30, 2013
lazy_json was added as part of #1295. This is almost certainly something caused by the 1.9 changes.
jdoliner commentedon Aug 30, 2013
@srh can you take a look at this?
coffeemug commentedon Aug 30, 2013
Ah I see, thanks.
srh commentedon Sep 2, 2013
It's a problem with buffer_group_read_stream_t if anything, it's what's getting an EAGAIN and crying about it.
srh commentedon Sep 2, 2013
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.
srh commentedon Sep 3, 2013
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.
jdoliner commentedon Sep 3, 2013
@mlucy can you show me how to reproduce this today? I can't get it to reproduce.
39 remaining items
jdoliner commentedon Dec 14, 2013
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.
danielmewes commentedon Dec 27, 2013
@wildattire, @janpieper For database corruption following the deletion of a secondary index, see #1789
mlucy commentedon Feb 21, 2014
Moving to 1.12 now that the cache is in next.
danielmewes commentedon Feb 21, 2014
I will test this again.
danielmewes commentedon Mar 13, 2014
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.
danielmewes commentedon Mar 14, 2014
The only thing that still sometimes stops this from working is #2073. Everything else seems fine. Closing in favor of #2073.