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

Fix memory leak in rollback to stable

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • WT10.0.0, 4.4.0-rc11, 4.7.0
    • Affects Version/s: None
    • Component/s: None
    • None

      The test/format job running rollback to stable detected a memory leak.

      https://evergreen.mongodb.com/task/wiredtiger_ubuntu1804_stress_tests_format_stress_sanitizer_smoke_test_1_369fb8fa499a502110576a64a3a336459e91fc0f_20_06_16_20_20_35/0

      The leak is in RUNDIR.2 and its information is:

      [2020/06/16 20:30:44.553]     =================================================================
      [2020/06/16 20:30:44.553]     ==20764==ERROR: LeakSanitizer: detected memory leaks
      [2020/06/16 20:30:44.553]     Direct leak of 75878 byte(s) in 849 object(s) allocated from:
      [2020/06/16 20:30:44.553]         #0 0x4c3cc2 in realloc /data/mci/76345995686809862f0b80d49f4a9e31/toolchain-builder/tmp/build-llvm.sh-IHB/llvm/projects/compiler-rt/lib/asan/asan_malloc_linux.cc:165:3
      [2020/06/16 20:30:44.553]         #1 0x75accb in __realloc_func /data/mci/200d5606e5697914f8e9061a1ca8da86/wiredtiger/build_posix/../src/os_common/os_alloc.c:121:14
      [2020/06/16 20:30:44.553]         #2 0x75ae30 in __wt_realloc_noclear /data/mci/200d5606e5697914f8e9061a1ca8da86/wiredtiger/build_posix/../src/os_common/os_alloc.c:158:13
      [2020/06/16 20:30:44.553]         #3 0x8a330d in __wt_buf_grow_worker /data/mci/200d5606e5697914f8e9061a1ca8da86/wiredtiger/build_posix/../src/support/scratch.c:47:13
      [2020/06/16 20:30:44.553]         #4 0x89438f in __wt_buf_grow /data/mci/200d5606e5697914f8e9061a1ca8da86/wiredtiger/build_posix/../src/include/buf.i:17:54
      [2020/06/16 20:30:44.553]         #5 0x8941cc in __wt_buf_init /data/mci/200d5606e5697914f8e9061a1ca8da86/wiredtiger/build_posix/../src/include/buf.i:49:13
      [2020/06/16 20:30:44.553]         #6 0x893084 in __wt_buf_initsize /data/mci/200d5606e5697914f8e9061a1ca8da86/wiredtiger/build_posix/../src/include/buf.i:59:5
      [2020/06/16 20:30:44.553]         #7 0x893fb1 in __wt_huffman_decode /data/mci/200d5606e5697914f8e9061a1ca8da86/wiredtiger/build_posix/../src/support/huffman.c:759:5
      [2020/06/16 20:30:44.553]         #8 0x9567cd in __cell_data_ref /data/mci/200d5606e5697914f8e9061a1ca8da86/wiredtiger/build_posix/../src/include/cell.i:1116:55
      [2020/06/16 20:30:44.553]         #9 0x953d75 in __wt_page_cell_data_ref /data/mci/200d5606e5697914f8e9061a1ca8da86/wiredtiger/build_posix/../src/include/cell.i:1148:13
      [2020/06/16 20:30:44.553]         #10 0x94f9dc in __rollback_abort_row_ondisk_kv /data/mci/200d5606e5697914f8e9061a1ca8da86/wiredtiger/build_posix/../src/txn/txn_rollback_to_stable.c:412:13
      [2020/06/16 20:30:44.553]         #11 0x94c784 in __rollback_abort_newer_row_leaf /data/mci/200d5606e5697914f8e9061a1ca8da86/wiredtiger/build_posix/../src/txn/txn_rollback_to_stable.c:635:13
      [2020/06/16 20:30:44.553]         #12 0x94b14c in __rollback_abort_newer_updates /data/mci/200d5606e5697914f8e9061a1ca8da86/wiredtiger/build_posix/../src/txn/txn_rollback_to_stable.c:809:9
      [2020/06/16 20:30:44.553]         #13 0x94a661 in __rollback_to_stable_btree_walk /data/mci/200d5606e5697914f8e9061a1ca8da86/wiredtiger/build_posix/../src/txn/txn_rollback_to_stable.c:872:17
      [2020/06/16 20:30:44.553]         #14 0x94882e in __rollback_to_stable_btree /data/mci/200d5606e5697914f8e9061a1ca8da86/wiredtiger/build_posix/../src/txn/txn_rollback_to_stable.c:940:5
      [2020/06/16 20:30:44.553]         #15 0x9470ff in __rollback_to_stable_btree_apply /data/mci/200d5606e5697914f8e9061a1ca8da86/wiredtiger/build_posix/../src/txn/txn_rollback_to_stable.c:1207:13
      [2020/06/16 20:30:44.553]         #16 0x940a8f in __rollback_to_stable /data/mci/200d5606e5697914f8e9061a1ca8da86/wiredtiger/build_posix/../src/txn/txn_rollback_to_stable.c:1262:5
      [2020/06/16 20:30:44.553]         #17 0x9402c0 in __wt_rollback_to_stable /data/mci/200d5606e5697914f8e9061a1ca8da86/wiredtiger/build_posix/../src/txn/txn_rollback_to_stable.c:1290:11
      [2020/06/16 20:30:44.553]         #18 0x935083 in __wt_txn_recover /data/mci/200d5606e5697914f8e9061a1ca8da86/wiredtiger/build_posix/../src/txn/txn_recover.c:825:9
      [2020/06/16 20:30:44.553]         #19 0x5ea431 in __wt_connection_workers /data/mci/200d5606e5697914f8e9061a1ca8da86/wiredtiger/build_posix/../src/conn/conn_open.c:215:5
      [2020/06/16 20:30:44.553]         #20 0x59b896 in wiredtiger_open /data/mci/200d5606e5697914f8e9061a1ca8da86/wiredtiger/build_posix/../src/conn/conn_api.c:2741:5
      [2020/06/16 20:30:44.553]         #21 0x54109e in wts_open /data/mci/200d5606e5697914f8e9061a1ca8da86/wiredtiger/build_posix/test/format/../../../test/format/wts.c:457:9
      [2020/06/16 20:30:44.553]         #22 0x4f7984 in check_copy /data/mci/200d5606e5697914f8e9061a1ca8da86/wiredtiger/build_posix/test/format/../../../test/format/backup.c:48:5
      [2020/06/16 20:30:44.553]         #23 0x4f4a10 in backup /data/mci/200d5606e5697914f8e9061a1ca8da86/wiredtiger/build_posix/test/format/../../../test/format/backup.c:500:13
      [2020/06/16 20:30:44.553]         #24 0x7f701a0206da in start_thread (/lib/x86_64-linux-gnu/libpthread.so.0+0x76da)
      [2020/06/16 20:30:44.553]     Direct leak of 27815 byte(s) in 418 object(s) allocated from:
      [2020/06/16 20:30:44.553]         #0 0x4c3cc2 in realloc /data/mci/76345995686809862f0b80d49f4a9e31/toolchain-builder/tmp/build-llvm.sh-IHB/llvm/projects/compiler-rt/lib/asan/asan_malloc_linux.cc:165:3
      [2020/06/16 20:30:44.553]         #1 0x75accb in __realloc_func /data/mci/200d5606e5697914f8e9061a1ca8da86/wiredtiger/build_posix/../src/os_common/os_alloc.c:121:14
      [2020/06/16 20:30:44.553]         #2 0x75ae30 in __wt_realloc_noclear /data/mci/200d5606e5697914f8e9061a1ca8da86/wiredtiger/build_posix/../src/os_common/os_alloc.c:158:13
      [2020/06/16 20:30:44.553]         #3 0x8a330d in __wt_buf_grow_worker /data/mci/200d5606e5697914f8e9061a1ca8da86/wiredtiger/build_posix/../src/support/scratch.c:47:13
      [2020/06/16 20:30:44.553]         #4 0x89438f in __wt_buf_grow /data/mci/200d5606e5697914f8e9061a1ca8da86/wiredtiger/build_posix/../src/include/buf.i:17:54
      [2020/06/16 20:30:44.553]         #5 0x8941cc in __wt_buf_init /data/mci/200d5606e5697914f8e9061a1ca8da86/wiredtiger/build_posix/../src/include/buf.i:49:13
      [2020/06/16 20:30:44.553]         #6 0x893084 in __wt_buf_initsize /data/mci/200d5606e5697914f8e9061a1ca8da86/wiredtiger/build_posix/../src/include/buf.i:59:5
      [2020/06/16 20:30:44.553]         #7 0x893fb1 in __wt_huffman_decode /data/mci/200d5606e5697914f8e9061a1ca8da86/wiredtiger/build_posix/../src/support/huffman.c:759:5
      [2020/06/16 20:30:44.553]         #8 0x9567cd in __cell_data_ref /data/mci/200d5606e5697914f8e9061a1ca8da86/wiredtiger/build_posix/../src/include/cell.i:1116:55
      [2020/06/16 20:30:44.553]         #9 0x953d75 in __wt_page_cell_data_ref /data/mci/200d5606e5697914f8e9061a1ca8da86/wiredtiger/build_posix/../src/include/cell.i:1148:13
      [2020/06/16 20:30:44.553]         #10 0x94f9dc in __rollback_abort_row_ondisk_kv /data/mci/200d5606e5697914f8e9061a1ca8da86/wiredtiger/build_posix/../src/txn/txn_rollback_to_stable.c:412:13
      [2020/06/16 20:30:44.553]         #11 0x94c784 in __rollback_abort_newer_row_leaf /data/mci/200d5606e5697914f8e9061a1ca8da86/wiredtiger/build_posix/../src/txn/txn_rollback_to_stable.c:635:13
      [2020/06/16 20:30:44.553]         #12 0x94b14c in __rollback_abort_newer_updates /data/mci/200d5606e5697914f8e9061a1ca8da86/wiredtiger/build_posix/../src/txn/txn_rollback_to_stable.c:809:9
      [2020/06/16 20:30:44.553]         #13 0x94a661 in __rollback_to_stable_btree_walk /data/mci/200d5606e5697914f8e9061a1ca8da86/wiredtiger/build_posix/../src/txn/txn_rollback_to_stable.c:872:17
      [2020/06/16 20:30:44.553]         #14 0x94882e in __rollback_to_stable_btree /data/mci/200d5606e5697914f8e9061a1ca8da86/wiredtiger/build_posix/../src/txn/txn_rollback_to_stable.c:940:5
      [2020/06/16 20:30:44.553]         #15 0x9470ff in __rollback_to_stable_btree_apply /data/mci/200d5606e5697914f8e9061a1ca8da86/wiredtiger/build_posix/../src/txn/txn_rollback_to_stable.c:1207:13
      [2020/06/16 20:30:44.553]         #16 0x940a8f in __rollback_to_stable /data/mci/200d5606e5697914f8e9061a1ca8da86/wiredtiger/build_posix/../src/txn/txn_rollback_to_stable.c:1262:5
      [2020/06/16 20:30:44.553]         #17 0x9402c0 in __wt_rollback_to_stable /data/mci/200d5606e5697914f8e9061a1ca8da86/wiredtiger/build_posix/../src/txn/txn_rollback_to_stable.c:1290:11
      [2020/06/16 20:30:44.553]         #18 0x935083 in __wt_txn_recover /data/mci/200d5606e5697914f8e9061a1ca8da86/wiredtiger/build_posix/../src/txn/txn_recover.c:825:9
      [2020/06/16 20:30:44.553]         #19 0x5ea431 in __wt_connection_workers /data/mci/200d5606e5697914f8e9061a1ca8da86/wiredtiger/build_posix/../src/conn/conn_open.c:215:5
      [2020/06/16 20:30:44.553]         #20 0x59b896 in wiredtiger_open /data/mci/200d5606e5697914f8e9061a1ca8da86/wiredtiger/build_posix/../src/conn/conn_api.c:2741:5
      [2020/06/16 20:30:44.553]         #21 0x54109e in wts_open /data/mci/200d5606e5697914f8e9061a1ca8da86/wiredtiger/build_posix/test/format/../../../test/format/wts.c:457:9
      [2020/06/16 20:30:44.553]         #22 0x4f7984 in check_copy /data/mci/200d5606e5697914f8e9061a1ca8da86/wiredtiger/build_posix/test/format/../../../test/format/backup.c:48:5
      [2020/06/16 20:30:44.553]         #23 0x4f4a53 in backup /data/mci/200d5606e5697914f8e9061a1ca8da86/wiredtiger/build_posix/test/format/../../../test/format/backup.c:507:9
      [2020/06/16 20:30:44.553]         #24 0x7f701a0206da in start_thread (/lib/x86_64-linux-gnu/libpthread.so.0+0x76da)
      [2020/06/16 20:30:44.553]     SUMMARY: AddressSanitizer: 103693 byte(s) leaked in 1267 allocation(s).
      [2020/06/16 20:30:44.553]     format.sh: job in /data/mci/200d5606e5697914f8e9061a1ca8da86/wiredtiger/test/format/RUNDIR.2 killed with signal SIGABRT
      

            Assignee:
            keith.bostic@mongodb.com Keith Bostic (Inactive)
            Reporter:
            sue.loverso@mongodb.com Susan LoVerso
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: