-
Type:
Task
-
Resolution: Fixed
-
Priority:
Major - P3
-
Affects Version/s: None
-
Component/s: Checkpoints
-
None
-
Storage Engines, Storage Engines - Foundations
-
SE Foundations - 2025-11-21
-
0
Could be reproduced by running:
LD_PRELOAD=/opt/mongodbtoolchain/revisions/8695910c32ef0ee5eecaae4c9ca515b4b6436a40/stow/llvm-v5.kaN/lib/clang/19/lib/x86_64-mongodb-linux/libclang_rt.asan.so python3 ../test/suite/run.py test_layered37
ASAN reports the following issue:
Direct leak of 41 byte(s) in 1 object(s) allocated from: #0 0x7f2b40d05cdc in realloc /data/mci/35d44bafaf07d0d34e58f8888b61215a/toolchain-builder/tmp/build-llvm-v5.sh-dB2/llvm-project-llvmorg/compiler-rt/lib/asan/asan_malloc_linux.cpp:82:3 #1 0x7f2b3c3a4751 in __realloc_func /home/ubuntu/work/git/wiredtiger/src/os_common/os_alloc.c:160:18 #2 0x7f2b3c3a497e in __wt_realloc_noclear /home/ubuntu/work/git/wiredtiger/src/os_common/os_alloc.c:198:13 #3 0x7f2b3c692eb0 in __wt_buf_grow_worker /home/ubuntu/work/git/wiredtiger/src/support/scratch.c:52:9 #4 0x7f2b3c05ad3d in __wt_buf_grow /home/ubuntu/work/git/wiredtiger/src/include/buf_inline.h:24:9 #5 0x7f2b3c05ab3e in __wt_buf_set /home/ubuntu/work/git/wiredtiger/src/include/buf_inline.h:88:13 #6 0x7f2b3c053a6d in __disagg_pick_up_checkpoint_meta /home/ubuntu/work/git/wiredtiger/src/conn/conn_layered.c:709:5 #7 0x7f2b3c0515e4 in __wti_disagg_conn_config /home/ubuntu/work/git/wiredtiger/src/conn/conn_layered.c:1279:17 #8 0x7f2b3c0821ef in __wti_conn_reconfig /home/ubuntu/work/git/wiredtiger/src/conn/conn_reconfig.c:450:13 #9 0x7f2b3bff5a82 in __conn_reconfigure /home/ubuntu/work/git/wiredtiger/src/conn/conn_api.c:1354:11 #10 0x7f2b3df87878 in _wrap_Connection_reconfigure /home/ubuntu/work/git/wiredtiger/build/lang/python/CMakeFiles/wiredtiger_python.dir/wiredtigerPYTHON_wrap.c:8926:21 #11 0x7f2b4093cee7 in cfunction_call /data/mci/ffd7bdd8113a1675e4d94dc66e419fee/toolchain-builder/tmp/build-python-v4.sh-VJS/build-Python-3.10.4/../src/Python-3.10.4/Objects/methodobject.c:552:18
The issue is that we allocate the content for WT_ITEM buf but don't clear it
static int__disagg_pick_up_checkpoint_meta(WT_SESSION_IMPL *session, WT_CONFIG_ITEM *meta_item){
WT_ITEM buf;
WT_CLEAR(buf);
WT_RET(__wt_buf_set(session, &buf, meta_item->str, meta_item->len));
WT_RET(__disagg_pick_up_checkpoint_meta_item(session, &buf));
return (0);
}