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

Fix a bug where uncommitted updates could be discarded

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: WT3.2.1, 4.3.1, 4.2.0-rc5, 4.0.14
    • Component/s: None
    • Labels:
      None
    • Sprint:
      Storage Engines 2019-07-19
    • Backport Requested:
      v4.0

      Description

      http://build.wiredtiger.com:8080/job/wiredtiger-test-race-condition-stress-sanitizer/32607/

      ==19247==ERROR: AddressSanitizer: heap-use-after-free on address 0x604000fdcad0 at pc 0x0000007a9474 bp 0x7ffbf27ee0b0 sp 0x7ffbf27ee0a8
      READ of size 8 at 0x604000fdcad0 thread T15
          #0 0x7a9473 in __wt_txn_rollback /work/jenkins/workspace/wiredtiger-test-race-condition-stress-sanitizer/build_posix/../src/txn/txn.c:1313:5
          #1 0x720a61 in __session_rollback_transaction /work/jenkins/workspace/wiredtiger-test-race-condition-stress-sanitizer/build_posix/../src/session/session_api.c:1817:2
          #2 0x52b932 in rollback_transaction /work/jenkins/workspace/wiredtiger-test-race-condition-stress-sanitizer/build_posix/test/format/../../../test/format/ops.c:481:2
          #3 0x51f0bd in ops /work/jenkins/workspace/wiredtiger-test-race-condition-stress-sanitizer/build_posix/test/format/../../../test/format/ops.c:1031:12
          #4 0x4dde52 in __asan::AsanThread::ThreadStart(unsigned long, __sanitizer::atomic_uintptr_t*) (/work/jenkins/workspace/wiredtiger-test-race-condition-stress-sanitizer/build_posix/test/format/t+0x4dde52)
          #5 0x7ffbfdd3a36c in start_thread (/lib64/libpthread.so.0+0x736c)
          #6 0x7ffbfcf0eb4e in __GI___clone (/lib64/libc.so.6+0x110b4e)
       
      0x604000fdcad0 is located 0 bytes inside of 38-byte region [0x604000fdcad0,0x604000fdcaf6)
      freed by thread T32 here:
          #0 0x4d01e8 in __interceptor_free.localalias.0 (/work/jenkins/workspace/wiredtiger-test-race-condition-stress-sanitizer/build_posix/test/format/t+0x4d01e8)
          #1 0x6544d9 in __wt_free_int /work/jenkins/workspace/wiredtiger-test-race-condition-stress-sanitizer/build_posix/../src/os_common/os_alloc.c:327:2
          #2 0x85fdb2 in __wt_free_update_list /work/jenkins/workspace/wiredtiger-test-race-condition-stress-sanitizer/build_posix/../src/btree/bt_discard.c:444:3
          #3 0x861077 in __free_update /work/jenkins/workspace/wiredtiger-test-race-condition-stress-sanitizer/build_posix/../src/btree/bt_discard.c:426:5
          #4 0x85e4fe in __free_page_modify /work/jenkins/workspace/wiredtiger-test-race-condition-stress-sanitizer/build_posix/../src/btree/bt_discard.c:211:4
          #5 0x85c92d in __wt_page_out /work/jenkins/workspace/wiredtiger-test-race-condition-stress-sanitizer/build_posix/../src/btree/bt_discard.c:112:3
          #6 0x85bc48 in __wt_ref_out /work/jenkins/workspace/wiredtiger-test-race-condition-stress-sanitizer/build_posix/../src/btree/bt_discard.c:44:2
          #7 0x608ad5 in __evict_page_dirty_update /work/jenkins/workspace/wiredtiger-test-race-condition-stress-sanitizer/build_posix/../src/evict/evict_page.c:442:5
          #8 0x6037fe in __wt_evict /work/jenkins/workspace/wiredtiger-test-race-condition-stress-sanitizer/build_posix/../src/evict/evict_page.c:205:3
          #9 0x6020e1 in __wt_page_release_evict /work/jenkins/workspace/wiredtiger-test-race-condition-stress-sanitizer/build_posix/../src/evict/evict_page.c:83:8
          #10 0x92d052 in __wt_sync_file /work/jenkins/workspace/wiredtiger-test-race-condition-stress-sanitizer/build_posix/../src/btree/bt_sync.c:328:5
          #11 0x7ba879 in __checkpoint_tree /work/jenkins/workspace/wiredtiger-test-race-condition-stress-sanitizer/build_posix/../src/txn/txn_ckpt.c:1678:3
          #12 0x7c3142 in __checkpoint_tree_helper /work/jenkins/workspace/wiredtiger-test-race-condition-stress-sanitizer/build_posix/../src/txn/txn_ckpt.c:1796:8
          #13 0x7c2f33 in __checkpoint_apply /work/jenkins/workspace/wiredtiger-test-race-condition-stress-sanitizer/build_posix/../src/txn/txn_ckpt.c:217:3
          #14 0x7bd22f in __txn_checkpoint /work/jenkins/workspace/wiredtiger-test-race-condition-stress-sanitizer/build_posix/../src/txn/txn_ckpt.c:908:2
          #15 0x7b8b60 in __txn_checkpoint_wrapper /work/jenkins/workspace/wiredtiger-test-race-condition-stress-sanitizer/build_posix/../src/txn/txn_ckpt.c:1107:8
          #16 0x7b8479 in __wt_txn_checkpoint /work/jenkins/workspace/wiredtiger-test-race-condition-stress-sanitizer/build_posix/../src/txn/txn_ckpt.c:1171:3
          #17 0x724e36 in __session_checkpoint /work/jenkins/workspace/wiredtiger-test-race-condition-stress-sanitizer/build_posix/../src/session/session_api.c:2047:8
          #18 0x539bfe in checkpoint /work/jenkins/workspace/wiredtiger-test-race-condition-stress-sanitizer/build_posix/test/format/../../../test/format/util.c:563:3
          #19 0x4dde52 in __asan::AsanThread::ThreadStart(unsigned long, __sanitizer::atomic_uintptr_t*) (/work/jenkins/workspace/wiredtiger-test-race-condition-stress-sanitizer/build_posix/test/format/t+0x4dde52)
       
      previously allocated by thread T15 here:
          #0 0x4d05a8 in calloc (/work/jenkins/workspace/wiredtiger-test-race-condition-stress-sanitizer/build_posix/test/format/t+0x4d05a8)
          #1 0x652d20 in __wt_calloc /work/jenkins/workspace/wiredtiger-test-race-condition-stress-sanitizer/build_posix/../src/os_common/os_alloc.c:52:11
          #2 0x985209 in __wt_update_alloc /work/jenkins/workspace/wiredtiger-test-race-condition-stress-sanitizer/build_posix/../src/btree/row_modify.c:290:3
          #3 0x983122 in __wt_row_modify /work/jenkins/workspace/wiredtiger-test-race-condition-stress-sanitizer/build_posix/../src/btree/row_modify.c:97:4
          #4 0x83e0c6 in __cursor_row_modify /work/jenkins/workspace/wiredtiger-test-race-condition-stress-sanitizer/build_posix/../src/btree/bt_cursor.c:446:10
          #5 0x840157 in __wt_btcur_remove /work/jenkins/workspace/wiredtiger-test-race-condition-stress-sanitizer/build_posix/../src/btree/bt_cursor.c:1089:7
          #6 0xa27c14 in __curfile_remove /work/jenkins/workspace/wiredtiger-test-race-condition-stress-sanitizer/build_posix/../src/cursor/cur_file.c:409:2
          #7 0x525d1d in row_remove /work/jenkins/workspace/wiredtiger-test-race-condition-stress-sanitizer/build_posix/test/format/../../../test/format/ops.c:1832:9
          #8 0x51daa9 in ops /work/jenkins/workspace/wiredtiger-test-race-condition-stress-sanitizer/build_posix/test/format/../../../test/format/ops.c:857:11
          #9 0x4dde52 in __asan::AsanThread::ThreadStart(unsigned long, __sanitizer::atomic_uintptr_t*) (/work/jenkins/workspace/wiredtiger-test-race-condition-stress-sanitizer/build_posix/test/format/t+0x4dde52)
       
      Thread T15 created by T0 here:
          #0 0x433890 in pthread_create (/work/jenkins/workspace/wiredtiger-test-race-condition-stress-sanitizer/build_posix/test/format/t+0x433890)
          #1 0x6707f0 in __wt_thread_create /work/jenkins/workspace/wiredtiger-test-race-condition-stress-sanitizer/build_posix/../src/os_posix/os_thread.c:30:2
          #2 0x519826 in wts_ops /work/jenkins/workspace/wiredtiger-test-race-condition-stress-sanitizer/build_posix/test/format/../../../test/format/ops.c:173:3
          #3 0x5341ff in main /work/jenkins/workspace/wiredtiger-test-race-condition-stress-sanitizer/build_posix/test/format/../../../test/format/t.c:221:5
          #4 0x7ffbfce1e889 in __libc_start_main (/lib64/libc.so.6+0x20889)
       
      Thread T32 created by T0 here:
          #0 0x433890 in pthread_create (/work/jenkins/workspace/wiredtiger-test-race-condition-stress-sanitizer/build_posix/test/format/t+0x433890)
          #1 0x6707f0 in __wt_thread_create /work/jenkins/workspace/wiredtiger-test-race-condition-stress-sanitizer/build_posix/../src/os_posix/os_thread.c:30:2
          #2 0x519b13 in wts_ops /work/jenkins/workspace/wiredtiger-test-race-condition-stress-sanitizer/build_posix/test/format/../../../test/format/ops.c:188:3
          #3 0x5341ff in main /work/jenkins/workspace/wiredtiger-test-race-condition-stress-sanitizer/build_posix/test/format/../../../test/format/t.c:221:5
          #4 0x7ffbfce1e889 in __libc_start_main (/lib64/libc.so.6+0x20889)
       
      SUMMARY: AddressSanitizer: heap-use-after-free /work/jenkins/workspace/wiredtiger-test-race-condition-stress-sanitizer/build_posix/../src/txn/txn.c:1313:5 in __wt_txn_rollback
       
       
      ############################################
      #  RUN PARAMETERS
      ############################################
      abort=0
      alter=0
      assert_commit_timestamp=0
      assert_read_timestamp=0
      auto_throttle=1
      backups=0
      bitcnt=8
      bloom=1
      bloom_bit_count=21
      bloom_hash_count=27
      bloom_oldest=0
      cache=88
      cache_minimum=20
      checkpoints=on
      checkpoint_log_size=160
      checkpoint_wait=51
      checksum=uncompressed
      chunk_size=10
      compaction=0
      compression=snappy
      data_extend=0
      data_source=file
      delete_pct=34
      dictionary=0
      direct_io=0
      encryption=none
      evict_max=0
      file_type=row-store
      firstfit=0
      huffman_key=0
      huffman_value=0
      independent_thread_rng=1
      in_memory=0
      insert_pct=2
      internal_key_truncation=1
      internal_page_max=11
      isolation=snapshot
      key_gap=8
      key_max=121
      key_min=13
      leaf_page_max=12
      leak_memory=0
      logging=0
      logging_archive=0
      logging_compression=none
      logging_file_max=331783
      logging_prealloc=0
      long_running_txn=0
      lsm_worker_threads=4
      memory_page_max=2
      merge_max=7
      mmap=1
      modify_pct=10
      ops=0
      prefix_compression=0
      prefix_compression_min=0
      prepare=0
      quiet=1
      read_pct=1
      rebalance=1
      repeat_data_pct=8
      reverse=1
      rows=1000000
      runs=1
      salvage=1
      split_pct=61
      statistics=0
      statistics_server=0
      threads=22
      timer=4
      timing_stress_aggressive_sweep=0
      timing_stress_checkpoint=0
      timing_stress_lookaside_sweep=0
      timing_stress_split_1=0
      timing_stress_split_2=0
      timing_stress_split_3=1
      timing_stress_split_4=1
      timing_stress_split_5=1
      timing_stress_split_6=0
      timing_stress_split_7=1
      timing_stress_split_8=0
      transaction_timestamps=1
      transaction-frequency=100
      truncate=1
      value_max=1780
      value_min=6
      verify=1
      wiredtiger_config=
      write_pct=53
      ############################################
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                alexander.gorrod Alexander Gorrod
                Reporter:
                keith.bostic Keith Bostic
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: