Skip to content

Server crash with index manipulation #1789

Closed

Description

@olimart

Using the nobrainer gem (ruby) to create index I get the following error when I add/drop/re-add the same index

Version: rethinkdb 1.11.2 (CLANG 5.0 (clang-500.2.79))
error: Error in src/buffer_cache/mirrored/mirrored.cc at line 178:
error: Guarantee failed: [data_token.has()] 
error: Backtrace:
error: Wed Dec 18 21:52:00 2013

       1: 0   rethinkdb                           0x000000010a31b33f _ZStlsIN2ql5sym_tEER15write_message_tS3_RKNSt3__16vectorIT_NS4_9allocatorIS6_EEEE + 753 at 0x10a31b33f ()
       2: 0   rethinkdb                           0x0000000109f50146 _ZNSt3__113__vector_baseIP20traversal_progress_tNS_9allocatorIS2_EEED2Ev + 1962 at 0x109f50146 ()
       3: 0   rethinkdb                           0x0000000109f507a0 _ZNSt3__113__vector_baseIP20traversal_progress_tNS_9allocatorIS2_EEED2Ev + 3588 at 0x109f507a0 ()
       4: 0   rethinkdb                           0x0000000109f4fdee _ZNSt3__113__vector_baseIP20traversal_progress_tNS_9allocatorIS2_EEED2Ev + 1106 at 0x109f4fdee ()
       5: 0   rethinkdb                           0x000000010a1fa8eb _ZNSt3__16vectorIhNS_9allocatorIhEEE8__appendEm + 8731 at 0x10a1fa8eb ()
       6: 0   rethinkdb                           0x0000000109f70466 _ZNSt3__112__deque_baseIyNS_9allocatorIyEEE5clearEv + 422 at 0x109f70466 ()
       7: 0   rethinkdb                           0x0000000109f7484a _ZN26callable_action_instance_tIN5boost3_bi6bind_tIvNS0_4_mfi3mf2Iv14mc_inner_buf_tbP14file_account_tEENS1_5list3INS1_5valueIPS5_EENSA_IbEENSA_IS7_EEEEEEE10run_actionEv + 28 at 0x109f7484a ()
       8: 0   rethinkdb                           0x0000000109f49fb5 _ZN22linux_thread_message_tD0Ev + 885 at 0x109f49fb5 ()
error: Exiting.
Trace/BPT trap: 5

Activity

  1. coffeemug commented on Dec 19, 2013

    @coffeemug
    Contributor

    @olimart -- thanks for reporting this. This buffer cache has a number of issues that are exposed/exacerbated by secondary indexes. @srh is currently working on a full rewrite, which will make all these problems go away in one fell swoop. You can track progress via #1642, the new cache will be in 1.12.

    Sorry you ran into this. Moving to subsequent, we'll retest when the new cache is in.

  2. olimart commented on Dec 19, 2013

    @olimart
    Author

    @coffeemug Thanks. Excellent.

    FYI @nviennot

  3. nviennot commented on Dec 19, 2013

    @nviennot
    Contributor

    yay 👍

  4. danielmewes commented on Dec 27, 2013

    @danielmewes
    Member

    I'm absolutely not convinced that this is a cache issue. If we want to have this fixed in 1.12 (which I assume we do), waiting for the new cache to be ready before looking into this might result in further delays.

  5. danielmewes commented on Dec 27, 2013

    @danielmewes
    Member

    For reproducing this: The fields that are indexed must exist in at least some of the documents. Furthermore the documents must not all be stored inline in the tree, i.e. need to have a certain size (> ~250 bytes).

  6. danielmewes commented on Dec 27, 2013

    @danielmewes
    Member

    Also: Re-creating the index is not necessary. Creating and then deleting the index is enough to corrupt the database. A subsequent table scan (r.table(...)) triggers the crash.

  7. danielmewes commented on Dec 27, 2013

    @danielmewes
    Member

    Somehow btree_store_t::drop_sindex() gets passed in an instance of rdb_value_deleter_t instead of rdb_value_non_deleter_t. So dropping the index deletes the blobs which it should not.

  8. added a commit that references this issue on Dec 27, 2013
  9. danielmewes commented on Dec 27, 2013

    @danielmewes
    Member

    The fix is in code review 1099 by @jdoliner

  10. coffeemug commented on Dec 28, 2013

    @coffeemug
    Contributor

    @danielmewes -- awesome work! I'll try to be more careful about inadvertently jumping to conclusions on issues like this.

  11. added a commit that references this issue on Dec 30, 2013
  12. danielmewes commented on Dec 30, 2013

    @danielmewes
    Member

    Merged into next 73c4401
    and v1.11.x 54338d8

    @AtnNn , @coffeemug I think we should prepare a point-release. Probably together with a fix for #1796 ?

  13. coffeemug commented on Dec 31, 2013

    @coffeemug
    Contributor

    Yep, let's do a point release next week. There are a couple of other candidates that might go into it: #1796, #1793, #1798, #1733.

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