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

Fix a bug reconciling metadata

    XMLWordPrintable

    Details

      Description

      In some cases, we are still evicting uncommitted changes in metadata.

          /*
           * The checkpoint transaction is special. Make sure we never write metadata updates from a
           * checkpoint in a concurrent session.
           */
          WT_ASSERT(session, !WT_IS_METADATA(session->dhandle) || upd == NULL ||
              upd->txnid == WT_TXN_NONE || upd->txnid != S2C(session)->txn_global.checkpoint_state.id ||
              WT_SESSION_IS_CHECKPOINT(session));
      

      (gdb) bt
      #0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
      #1  0x00007f68ece7b801 in __GI_abort () at abort.c:79
      #2  0x00007f68ec3dc6b3 in __wt_abort (session=0x556983cf52d0) at ../src/os_common/os_abort.c:30
      #3  0x00007f68ec40953e in __wt_rec_upd_select (session=0x556983cf52d0, r=0x7f68d0001670, ins=0x0, ripcip=0x556982bff740, vpack=0x7f68e9fec9b0,
          upd_select=0x7f68e9fec960) at ../src/reconcile/rec_visibility.c:297
      #4  0x00007f68ec403c07 in __wt_rec_row_leaf (session=0x556983cf52d0, r=0x7f68d0001670, pageref=0x556982d0d650, salvage=0x0)
          at ../src/reconcile/rec_row.c:795
      #5  0x00007f68ec40e7f8 in __reconcile (session=0x556983cf52d0, ref=0x556982d0d650, salvage=0x0, flags=140, page_lockedp=0x7f68e9fecc6e)
          at ../src/reconcile/rec_write.c:176
      #6  0x00007f68ec40e48a in __wt_reconcile (session=0x556983cf52d0, ref=0x556982d0d650, salvage=0x0, flags=140) at ../src/reconcile/rec_write.c:87
      #7  0x00007f68ec39de69 in __evict_review (session=0x556983cf52d0, ref=0x556982d0d650, evict_flags=0, inmem_splitp=0x7f68e9fecd4f)
          at ../src/evict/evict_page.c:627
      #8  0x00007f68ec39c445 in __wt_evict (session=0x556983cf52d0, ref=0x556982d0d650, previous_state=3 '\003', flags=0) at ../src/evict/evict_page.c:150
      #9  0x00007f68ec39902c in __evict_page (session=0x556983cf52d0, is_server=false) at ../src/evict/evict_lru.c:2246
      #10 0x00007f68ec39518c in __evict_lru_pages (session=0x556983cf52d0, is_server=false) at ../src/evict/evict_lru.c:1118
      #11 0x00007f68ec393372 in __wt_evict_thread_run (session=0x556983cf52d0, thread=0x556983bb7a70) at ../src/evict/evict_lru.c:311
      #12 0x00007f68ec454658 in __thread_run (arg=0x556983bb7a70) at ../src/support/thread_group.c:31
      #13 0x00007f68ed9d86db in start_thread (arg=0x7f68e9fed700) at pthread_create.c:463
      #14 0x00007f68ecf5c88f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
      (gdb) f 3
      #3  0x00007f68ec40953e in __wt_rec_upd_select (session=0x556983cf52d0, r=0x7f68d0001670, ins=0x0, ripcip=0x556982bff740, vpack=0x7f68e9fec9b0,
          upd_select=0x7f68e9fec960) at ../src/reconcile/rec_visibility.c:297
      297	    WT_ASSERT(session, !WT_IS_METADATA(session->dhandle) || upd == NULL ||
      (gdb) p upd
      $1 = (WT_UPDATE *) 0x55698441f6d0
      (gdb) p session->dhanle
      There is no member named dhanle.
      (gdb) p session->dhanle
      There is no member named dhanle.
      (gdb) p session->dhandle
      $2 = (WT_DATA_HANDLE *) 0x556982cd8cd0
      (gdb) p session->dhandle->flags
      $3 = 160
      (gdb) p *upd
      $4 = {txnid = 2, durable_ts = 0, start_ts = 0, next = 0x0, size = 1126, type = 3 '\003', prepare_state = 0 '\000', flags = 0 '\000',
        data = 0x55698441f6f7 "access_pattern_hint=none,allocation_size=4KB,app_metadata=,assert=(commit_timestamp=none,durable_timestamp=none,read_timestamp=none),block_allocation=best,block_compressor=,cache_resident=false,checks"...}
      (gdb) p ((WT_CONNECTION_IMPL *)(session)->iface.connection)->txn_global.checkpoint_state.id
      $5 = 2
      (gdb)
      

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              michael.cahill Michael Cahill
              Reporter:
              chenhao.qu Chenhao Qu
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: