Uploaded image for project: 'WiredTiger'
  1. WiredTiger
  2. WT-11242

format failure: rec_upd_select selected update already written to history store

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Critical - P2 Critical - P2
    • WT11.2.0, 7.1.0-rc0, 7.0.0-rc8
    • Affects Version/s: None
    • Component/s: None
    • 8
    • 2023-07-11 WiredTractor
    • v7.0

      A few days ago I kicked off the CONFIG for WT-11223 on kodkod-aws. That ticket is understood. This morning when I checked the run, it failed with a different failure:

      [1687985821:74459][11706:0x7f277a7ec700], t, file:T00002.wt,
      WT_SESSION.checkpoint: [WT_VERB_DEFAULT][ERROR]:
      int __rec_upd_select(WT_SESSION_IMPL *, WT_RECONCILE *, WT_UPDATE *, WT_UPDATE_SELECT *, WT_UPDATE **, _Bool *, size_t *), 657:
      WiredTiger assertion failed: 'upd_select->upd == ((void*)0) || !((((upd_select->upd)->flags) & (0x02u)) != 0) || ((((upd_select->upd)->flags) & (0x40u)) != 0) || (!((((r)->flags) & (0x020u)) != 0) && seen_prepare)'. Selected update that has already been written to the history store
      

      The stack is a normal checkpoint:

      (gdb) bt
      #0  0x00007f27d9d49e87 in raise () from /lib/x86_64-linux-gnu/libc.so.6
      #1  0x00007f27d9d4b7f1 in abort () from /lib/x86_64-linux-gnu/libc.so.6
      #2  0x00007f27da9d9474 in __wt_abort (session=0x16a7cf8) at ../src/os_common/os_abort.c:30
      #3  0x00007f27daa25e1a in __rec_upd_select (session=0x16a7cf8, r=0x7f27280acaf0, 
          first_upd=0x7f27740b2490, upd_select=0x7f277a7e71c8, first_txn_updp=0x7f277a7e68a8, 
          has_newer_updatesp=0x7f277a7e6887, upd_memsizep=0x7f277a7e6888)
          at ../src/reconcile/rec_visibility.c:653
      #4  0x00007f27daa243ab in __wt_rec_upd_select (session=0x16a7cf8, r=0x7f27280acaf0, 
          ins=0x7f2774041370, rip=0x0, vpack=0x0, upd_select=0x7f277a7e71c8)
          at ../src/reconcile/rec_visibility.c:834
      #5  0x00007f27daa1614e in __rec_row_leaf_insert (session=0x16a7cf8, r=0x7f27280acaf0, 
          ins=0x7f2774041370) at ../src/reconcile/rec_row.c:522
      #6  0x00007f27daa15fb4 in __wt_rec_row_leaf (session=0x16a7cf8, r=0x7f27280acaf0, 
          pageref=0x2072810, salvage=0x0) at ../src/reconcile/rec_row.c:1011
      #7  0x00007f27daa2cf62 in __reconcile (session=0x16a7cf8, ref=0x2072810, salvage=0x0, 
          flags=68, page_lockedp=0x7f277a7e935e) at ../src/reconcile/rec_write.c:291
      #8  0x00007f27daa2be46 in __wt_reconcile (session=0x16a7cf8, ref=0x2072810, salvage=0x0, 
          flags=68) at ../src/reconcile/rec_write.c:99
      #9  0x00007f27da82cfe1 in __wt_sync_file (session=0x16a7cf8, syncop=WT_SYNC_CHECKPOINT)
          at ../src/btree/bt_sync.c:432
      #10 0x00007f27daaef5f5 in __checkpoint_tree (session=0x16a7cf8, is_checkpoint=true, 
          cfg=0x7f277a7eb990) at ../src/txn/txn_ckpt.c:2249
      #11 0x00007f27daaf3d71 in __checkpoint_tree_helper (session=0x16a7cf8, cfg=0x7f277a7eb990)
          at ../src/txn/txn_ckpt.c:2368
      #12 0x00007f27daaf3c56 in __checkpoint_apply_to_dhandles (session=0x16a7cf8, 
          cfg=0x7f277a7eb990, op=0x7f27daaf3cb0 <__checkpoint_tree_helper>)
          at ../src/txn/txn_ckpt.c:341
      #13 0x00007f27daaf0e60 in __txn_checkpoint (session=0x16a7cf8, cfg=0x7f277a7eb990)
          at ../src/txn/txn_ckpt.c:1140
      #14 0x00007f27daaee9a9 in __txn_checkpoint_wrapper (session=0x16a7cf8, cfg=0x7f277a7eb990)
          at ../src/txn/txn_ckpt.c:1423
      #15 0x00007f27daaee3b8 in __wt_txn_checkpoint (session=0x16a7cf8, cfg=0x7f277a7eb990, 
          waiting=true) at ../src/txn/txn_ckpt.c:1500
      #16 0x00007f27daa78de3 in __session_checkpoint (wt_session=0x16a7cf8, config=0x0)
          at ../src/session/session_api.c:2369
      #17 0x0000000000407a7d in checkpoint (arg=0x0) at ../test/format/checkpoint.c:144
      #18 0x00007f27da50f6db in start_thread () from /lib/x86_64-linux-gnu/libpthread.so.0
      #19 0x00007f27d9e2c61f in clone () from /lib/x86_64-linux-gnu/libc.so.6
      

            Assignee:
            etienne.petrel@mongodb.com Etienne Petrel
            Reporter:
            sue.loverso@mongodb.com Susan LoVerso
            Chenhao Qu
            Votes:
            0 Vote for this issue
            Watchers:
            11 Start watching this issue

              Created:
              Updated:
              Resolved: