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

Fix race between prepare and page instantiate with fast truncate

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.1.7, 4.0.6, WT3.2.0
    • Component/s: None
    • Story Points:
      8
    • Sprint:
      Storage Engines 2018-12-03, Storage Engines 2018-12-17

      Description

      This test/format stress Jenkins job failed: http://build.wiredtiger.com:8080/job/wiredtiger-test-race-condition-stress-sanitizer/28242/console

      There are no obvious recent merges into develop. The error is:

      =================================================================
      ==29394==ERROR: AddressSanitizer: heap-use-after-free on address 0x60300093f7f0 at pc 0x000000861a3a bp 0x7f15032e09d0 sp 0x7f15032e09c8
      WRITE of size 8 at 0x60300093f7f0 thread T6
          #0 0x861a39 in __wt_delete_page_rollback /mnt/data0/jenkins/workspace/wiredtiger-test-race-condition-stress-sanitizer/build_posix/../src/btree/bt_delete.c:242:19
          #1 0x7c0316 in __wt_txn_rollback /mnt/data0/jenkins/workspace/wiredtiger-test-race-condition-stress-sanitizer/build_posix/../src/txn/txn.c:1128:4
          #2 0x73a054 in __session_rollback_transaction /mnt/data0/jenkins/workspace/wiredtiger-test-race-condition-stress-sanitizer/build_posix/../src/session/session_api.c:1737:2
          #3 0x538622 in rollback_transaction /mnt/data0/jenkins/workspace/wiredtiger-test-race-condition-stress-sanitizer/build_posix/test/format/../../../test/format/ops.c:594:2
          #4 0x52969b in ops /mnt/data0/jenkins/workspace/wiredtiger-test-race-condition-stress-sanitizer/build_posix/test/format/../../../test/format/ops.c:1085:12
          #5 0x7f1509f27dc4 in start_thread /usr/src/debug/glibc-2.17-c758a686/nptl/pthread_create.c:308
          #6 0x7f150910e76c in __clone (/lib64/libc.so.6+0xf776c)
       
      0x60300093f7f0 is located 0 bytes inside of 30-byte region [0x60300093f7f0,0x60300093f80e)
      freed by thread T20 here:
          #0 0x4df6d0 in free /home/bostic/src/llvm40/projects/compiler-rt/lib/asan/asan_malloc_linux.cc:47
          #1 0x652159 in __wt_free_int /mnt/data0/jenkins/workspace/wiredtiger-test-race-condition-stress-sanitizer/build_posix/../src/os_common/os_alloc.c:327:2
          #2 0x86eb26 in __wt_free_update_list /mnt/data0/jenkins/workspace/wiredtiger-test-race-condition-stress-sanitizer/build_posix/../src/btree/bt_discard.c:430:3
          #3 0x9677d0 in __wt_update_serial /mnt/data0/jenkins/workspace/wiredtiger-test-race-condition-stress-sanitizer/build_posix/../src/include/serial.i:349:3
          #4 0x9645ea in __wt_row_modify /mnt/data0/jenkins/workspace/wiredtiger-test-race-condition-stress-sanitizer/build_posix/../src/btree/row_modify.c:129:3
          #5 0x85e8e7 in __cursor_row_modify_v /mnt/data0/jenkins/workspace/wiredtiger-test-race-condition-stress-sanitizer/build_posix/../src/btree/bt_cursor.c:410:10
          #6 0x8530f0 in __btcur_update /mnt/data0/jenkins/workspace/wiredtiger-test-race-condition-stress-sanitizer/build_posix/../src/btree/bt_cursor.c:1260:7
          #7 0x854ce4 in __wt_btcur_update /mnt/data0/jenkins/workspace/wiredtiger-test-race-condition-stress-sanitizer/build_posix/../src/btree/bt_cursor.c:1580:10
          #8 0x9fa4eb in __curfile_update /mnt/data0/jenkins/workspace/wiredtiger-test-race-condition-stress-sanitizer/build_posix/../src/cursor/cur_file.c:366:2
          #9 0x5322a1 in row_update /mnt/data0/jenkins/workspace/wiredtiger-test-race-condition-stress-sanitizer/build_posix/test/format/../../../test/format/ops.c:1757:13
          #10 0x528e95 in ops /mnt/data0/jenkins/workspace/wiredtiger-test-race-condition-stress-sanitizer/build_posix/test/format/../../../test/format/ops.c:1009:11
          #11 0x7f1509f27dc4 in start_thread /usr/src/debug/glibc-2.17-c758a686/nptl/pthread_create.c:308
       
      previously allocated by thread T11 here:
          #0 0x4dfbcd in calloc /home/bostic/src/llvm40/projects/compiler-rt/lib/asan/asan_malloc_linux.cc:74
          #1 0x650949 in __wt_calloc /mnt/data0/jenkins/workspace/wiredtiger-test-race-condition-stress-sanitizer/build_posix/../src/os_common/os_alloc.c:52:11
          #2 0x966165 in __wt_update_alloc /mnt/data0/jenkins/workspace/wiredtiger-test-race-condition-stress-sanitizer/build_posix/../src/btree/row_modify.c:289:3
          #3 0x86517d in __tombstone_update_alloc /mnt/data0/jenkins/workspace/wiredtiger-test-race-condition-stress-sanitizer/build_posix/../src/btree/bt_delete.c:317:2
          #4 0x8646b7 in __wt_delete_page_instantiate /mnt/data0/jenkins/workspace/wiredtiger-test-race-condition-stress-sanitizer/build_posix/../src/btree/bt_delete.c:443:3
          #5 0x8af9f0 in __page_read /mnt/data0/jenkins/workspace/wiredtiger-test-race-condition-stress-sanitizer/build_posix/../src/btree/bt_read.c:535:3
          #6 0x8aca65 in __wt_page_in_func /mnt/data0/jenkins/workspace/wiredtiger-test-race-condition-stress-sanitizer/build_posix/../src/btree/bt_read.c:659:4
          #7 0x976607 in __wt_page_swap_func /mnt/data0/jenkins/workspace/wiredtiger-test-race-condition-stress-sanitizer/build_posix/../src/include/btree.i:1699:8
          #8 0x972128 in __wt_row_search /mnt/data0/jenkins/workspace/wiredtiger-test-race-condition-stress-sanitizer/build_posix/../src/btree/row_srch.c:452:14
          #9 0x848411 in __cursor_row_search /mnt/data0/jenkins/workspace/wiredtiger-test-race-condition-stress-sanitizer/build_posix/../src/btree/bt_cursor.c:385:2
          #10 0x848fb7 in __wt_btcur_search /mnt/data0/jenkins/workspace/wiredtiger-test-race-condition-stress-sanitizer/build_posix/../src/btree/bt_cursor.c:581:3
          #11 0x9f5391 in __curfile_search /mnt/data0/jenkins/workspace/wiredtiger-test-race-condition-stress-sanitizer/build_posix/../src/cursor/cur_file.c:200:2
          #12 0x52a6b0 in read_row_worker /mnt/data0/jenkins/workspace/wiredtiger-test-race-condition-stress-sanitizer/build_posix/test/format/../../../test/format/ops.c:1200:9
          #13 0x52be8e in read_row /mnt/data0/jenkins/workspace/wiredtiger-test-race-condition-stress-sanitizer/build_posix/test/format/../../../test/format/ops.c:1269:10
          #14 0x52725c in ops /mnt/data0/jenkins/workspace/wiredtiger-test-race-condition-stress-sanitizer/build_posix/test/format/../../../test/format/ops.c:824:10
          #15 0x7f1509f27dc4 in start_thread /usr/src/debug/glibc-2.17-c758a686/nptl/pthread_create.c:308
       
      Thread T6 created by T0 here:
          #0 0x437521 in pthread_create /home/bostic/src/llvm40/projects/compiler-rt/lib/asan/asan_interceptors.cc:305
          #1 0x66b290 in __wt_thread_create /mnt/data0/jenkins/workspace/wiredtiger-test-race-condition-stress-sanitizer/build_posix/../src/os_posix/os_thread.c:30:2
          #2 0x523af0 in wts_ops /mnt/data0/jenkins/workspace/wiredtiger-test-race-condition-stress-sanitizer/build_posix/test/format/../../../test/format/ops.c:162:3
          #3 0x53cc13 in main /mnt/data0/jenkins/workspace/wiredtiger-test-race-condition-stress-sanitizer/build_posix/test/format/../../../test/format/t.c:209:5
          #4 0x7f1509038b34 in __libc_start_main /usr/src/debug/glibc-2.17-c758a686/csu/../csu/libc-start.c:274
       
      Thread T20 created by T0 here:
          #0 0x437521 in pthread_create /home/bostic/src/llvm40/projects/compiler-rt/lib/asan/asan_interceptors.cc:305
          #1 0x66b290 in __wt_thread_create /mnt/data0/jenkins/workspace/wiredtiger-test-race-condition-stress-sanitizer/build_posix/../src/os_posix/os_thread.c:30:2
          #2 0x523af0 in wts_ops /mnt/data0/jenkins/workspace/wiredtiger-test-race-condition-stress-sanitizer/build_posix/test/format/../../../test/format/ops.c:162:3
          #3 0x53cc13 in main /mnt/data0/jenkins/workspace/wiredtiger-test-race-condition-stress-sanitizer/build_posix/test/format/../../../test/format/t.c:209:5
          #4 0x7f1509038b34 in __libc_start_main /usr/src/debug/glibc-2.17-c758a686/csu/../csu/libc-start.c:274
       
      Thread T11 created by T0 here:
          #0 0x437521 in pthread_create /home/bostic/src/llvm40/projects/compiler-rt/lib/asan/asan_interceptors.cc:305
          #1 0x66b290 in __wt_thread_create /mnt/data0/jenkins/workspace/wiredtiger-test-race-condition-stress-sanitizer/build_posix/../src/os_posix/os_thread.c:30:2
          #2 0x523af0 in wts_ops /mnt/data0/jenkins/workspace/wiredtiger-test-race-condition-stress-sanitizer/build_posix/test/format/../../../test/format/ops.c:162:3
          #3 0x53cc13 in main /mnt/data0/jenkins/workspace/wiredtiger-test-race-condition-stress-sanitizer/build_posix/test/format/../../../test/format/t.c:209:5
          #4 0x7f1509038b34 in __libc_start_main /usr/src/debug/glibc-2.17-c758a686/csu/../csu/libc-start.c:274
      

        Attachments

          Activity

            People

            • Assignee:
              sulabh.mahajan Sulabh Mahajan
              Reporter:
              sue.loverso Susan LoVerso
            • Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: