Memory leak when allocating multi->block_meta

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Unresolved
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Reconciliation
    • Storage Engines, Storage Engines - Transactions
    • SE Transactions - 2025-08-29, SE Transactions - 2025-09-12
    • 3

      The following memory leak error was just caught by ASAN:

      [2025/08/28 13:33:04.095] ==6606==ERROR: LeakSanitizer: detected memory leaks
      [2025/08/28 13:33:04.096] Direct leak of 37152 byte(s) in 516 object(s) allocated from:
      [2025/08/28 13:33:04.096]     #0 0x5581f29f3cd9 in calloc /data/mci/444c1191ff66ec5bade6c97089429fd0/toolchain-builder/tmp/build-llvm-v5.sh-Dae/llvm-project-llvmorg/compiler-rt/lib/asan/asan_malloc_linux.cpp:75:3
      [2025/08/28 13:33:04.096]     #1 0x7f5097327d88 in __wt_calloc /data/mci/21da7295e5a6df52ae0033984d4ea045/wiredtiger/src/os_common/os_alloc.c:68:14
      [2025/08/28 13:33:04.096]     #2 0x7f50973bdb6e in __rec_split_write /data/mci/21da7295e5a6df52ae0033984d4ea045/wiredtiger/src/reconcile/rec_write.c:2783:9
      [2025/08/28 13:33:04.096]     #3 0x7f50973bbdb7 in __wti_rec_split /data/mci/21da7295e5a6df52ae0033984d4ea045/wiredtiger/src/reconcile/rec_write.c:1604:13
      [2025/08/28 13:33:04.096]     #4 0x7f50973c1ab0 in __wti_rec_split_crossing_bnd /data/mci/21da7295e5a6df52ae0033984d4ea045/wiredtiger/src/reconcile/rec_write.c:1711:13
      [2025/08/28 13:33:04.097]     #5 0x7f5097397b6e in __rec_row_leaf_insert /data/mci/21da7295e5a6df52ae0033984d4ea045/wiredtiger/src/reconcile/rec_row.c:847:13
      [2025/08/28 13:33:04.097]     #6 0x7f5097395816 in __wti_rec_row_leaf /data/mci/21da7295e5a6df52ae0033984d4ea045/wiredtiger/src/reconcile/rec_row.c:1264:13
      [2025/08/28 13:33:04.097]     #7 0x7f50973b6411 in __reconcile /data/mci/21da7295e5a6df52ae0033984d4ea045/wiredtiger/src/reconcile/rec_write.c:305:9
      [2025/08/28 13:33:04.097]     #8 0x7f50973b6411 in __wt_reconcile /data/mci/21da7295e5a6df52ae0033984d4ea045/wiredtiger/src/reconcile/rec_write.c:124:11
      [2025/08/28 13:33:04.097]     #9 0x7f50970160b8 in __wt_sync_file /data/mci/21da7295e5a6df52ae0033984d4ea045/wiredtiger/src/btree/bt_sync.c:364:13
      [2025/08/28 13:33:04.097]     #10 0x7f5097091c78 in __checkpoint_tree /data/mci/21da7295e5a6df52ae0033984d4ea045/wiredtiger/src/checkpoint/checkpoint_txn.c:2547:9
      [2025/08/28 13:33:04.097]     #11 0x7f5097096b2b in __checkpoint_tree_helper /data/mci/21da7295e5a6df52ae0033984d4ea045/wiredtiger/src/checkpoint/checkpoint_txn.c:2685:11
      [2025/08/28 13:33:04.097]     #12 0x7f50970968bf in __checkpoint_apply_to_dhandles /data/mci/21da7295e5a6df52ae0033984d4ea045/wiredtiger/src/checkpoint/checkpoint_txn.c:340:9
      [2025/08/28 13:33:04.097]     #13 0x7f509708cc74 in __checkpoint_db_internal /data/mci/21da7295e5a6df52ae0033984d4ea045/wiredtiger/src/checkpoint/checkpoint_txn.c:1343:5
      [2025/08/28 13:33:04.097]     #14 0x7f509708cc74 in __checkpoint_db_wrapper /data/mci/21da7295e5a6df52ae0033984d4ea045/wiredtiger/src/checkpoint/checkpoint_txn.c:1721:11
      [2025/08/28 13:33:04.097]     #15 0x7f509708a225 in __wt_checkpoint_db /data/mci/21da7295e5a6df52ae0033984d4ea045/wiredtiger/src/checkpoint/checkpoint_txn.c:1800:9
      [2025/08/28 13:33:04.097]     #16 0x7f5097444b5a in __session_checkpoint /data/mci/21da7295e5a6df52ae0033984d4ea045/wiredtiger/src/session/session_api.c:2363:11
      

      It's pointing to the memory allocation in this part of the code:

          multi->supd_restore = false;
          if (page->disagg_info != NULL)
              WT_RET(__wt_calloc_one(session, &multi->block_meta));
      

              Assignee:
              Chenhao Qu
              Reporter:
              Peter Macko
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated: