Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-66920

Crash in debug builds due to WiredTigerIndexCursorBase::seekWTCursor assertion not following search_near comparison semantics

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 6.0.4, 6.1.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      None
    • Fully Compatible
    • ALL
    • v6.0
    • Hide

      Apply the following patch (this comment from a ticket where the issue was first observed)

      --- a/src/third_party/wiredtiger/src/btree/bt_delete.c
      +++ b/src/third_party/wiredtiger/src/btree/bt_delete.c
      @@ -318,6 +318,9 @@ __wt_delete_page_instantiate(WT_SESSION_IMPL *session, WT_REF *ref)
           if (btree->modified)
               __wt_page_modify_set(session, page);
       
      +    /* Hack to get these fast deleted pages scheduled for eviction regularly */
      +    __wt_page_evict_soon(session, ref);
      +
           /* Allocate the per-page update array if one doesn't already exist. */
           if (page->entries != 0 && page->modify->mod_row_update == NULL)
               WT_PAGE_ALLOC_AND_SWAP(
      

      Run the unit test:

      ninja +storage_wiredtiger_record_store_and_index_test
      
      Show
      Apply the following patch ( this comment from a ticket where the issue was first observed) --- a/src/third_party/wiredtiger/src/btree/bt_delete.c +++ b/src/third_party/wiredtiger/src/btree/bt_delete.c @@ -318,6 +318,9 @@ __wt_delete_page_instantiate(WT_SESSION_IMPL *session, WT_REF *ref) if (btree->modified) __wt_page_modify_set(session, page); + /* Hack to get these fast deleted pages scheduled for eviction regularly */ + __wt_page_evict_soon(session, ref); + /* Allocate the per-page update array if one doesn't already exist. */ if (page->entries != 0 && page->modify->mod_row_update == NULL) WT_PAGE_ALLOC_AND_SWAP( Run the unit test: ninja +storage_wiredtiger_record_store_and_index_test
    • Execution Team 2022-06-27, Execution Team 2022-07-11, Execution Team 2022-07-25
    • 129

      The comparison between the cursor's current key and the search key should follow the same semantics as the previous search_near call, whereby a search key that is fully a prefix of a larger cursor key should return that we've landed past the search key (or after the search key for a backward cursor).

      Failing to do so can fail this assertion on debug builds. This happens when search_near lands - by design - on a key that is lower than the search key (or after the search key on backward cursors).

            Assignee:
            sulabh.mahajan@mongodb.com Sulabh Mahajan
            Reporter:
            josef.ahmad@mongodb.com Josef Ahmad
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: