From bc69d4122bc4311f75bcd72e102714e0b66b58b9 Mon Sep 17 00:00:00 2001 From: Mark Kogan Date: Mon, 19 May 2025 14:52:42 +0000 Subject: [PATCH] rgw/d3n: fix valgrind invalid read during exit The valgrind indication is a false positive in this case, is seems there is a race of memory read and free of the libaio and aio kernel threads which had not timer-d out yet during exit() reducing the aio_idle_time timeout to mitigate ``` 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. ... ``` Fixes: https://tracker.ceph.com/issues/64835 Signed-off-by: Mark Kogan (cherry picked from commit 31fae3a9013f05c94ad4233dd51240e2f2b3c040) --- 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 be1a44686969d..bcf6aa0b2e5d1 100644 --- a/src/rgw/driver/rados/rgw_d3n_datacache.cc +++ b/src/rgw/driver/rados/rgw_d3n_datacache.cc @@ -106,7 +106,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 = 5; + ainit.aio_idle_time = 2; aio_init(&ainit); #endif } -- 2.39.5