From 94ccd5e7cedc0ad4eb90f27194db99f6ee8ca76a Mon Sep 17 00:00:00 2001 From: Mark Kogan Date: Wed, 28 Jun 2023 14:06:27 +0000 Subject: [PATCH] reef: rgw: d3n: fix valgrind reported leak related to libaio ops MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Fixes: https://tracker.ceph.com/issues/61661 The valgrind leak indication is a false positive in this case, it is because the libaio internal thread have not timed out yet when radosgw is terminated. ``` man aio_init ... aio_idle_time This field specifies the amount of time in seconds that a worker thread should wait for further requests before terminating, after having completed a previous request. The default value is 1. ... ``` for the sake of teuthology reducing the timeout waiting for 2 minutes for example like below would also prevent the leak report ``` ❯ env LD_LIBRARY_PATH=/mnt/nvme5n1p1/src-git/ceph--up--master-clang/build/lib/:$LD_LIBRARY_PATH PYTHONPATH=$PYTHONPATH:/mnt/nvme5n1p1/src-git/ceph--up--master-clang/build/lib/cython_modules/lib.3 RAGWEED_CONF=$(realpath ./ragweed.conf) RAGWEED_STAGES=prepare,check tox -- -v |& ccze -Aonolookups ; sleep 2m | pv -t ; pkill radosgw ``` Signed-off-by: Mark Kogan (cherry picked from commit f834e10cfe97c7df8fc5ead682975fe60b435bd7) --- src/rgw/driver/rados/rgw_d3n_datacache.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/rgw/driver/rados/rgw_d3n_datacache.cc b/src/rgw/driver/rados/rgw_d3n_datacache.cc index ed375e2ac94..8e89155fea4 100644 --- a/src/rgw/driver/rados/rgw_d3n_datacache.cc +++ b/src/rgw/driver/rados/rgw_d3n_datacache.cc @@ -105,7 +105,7 @@ void D3nDataCache::init(CephContext *_cct) { struct aioinit ainit{0}; ainit.aio_threads = cct->_conf.get_val("rgw_d3n_libaio_aio_threads"); ainit.aio_num = cct->_conf.get_val("rgw_d3n_libaio_aio_num"); - ainit.aio_idle_time = 120; + ainit.aio_idle_time = 10; aio_init(&ainit); #endif } -- 2.39.5