Skip to content

DPL: fixes for memory leak in CCDB object caching #15386

Open
ehellbar wants to merge 2 commits into
AliceO2Group:devfrom
ehellbar:pr15386
Open

DPL: fixes for memory leak in CCDB object caching #15386
ehellbar wants to merge 2 commits into
AliceO2Group:devfrom
ehellbar:pr15386

Conversation

@ehellbar

@ehellbar ehellbar commented May 10, 2026

Copy link
Copy Markdown
Collaborator

No description provided.

@ehellbar ehellbar requested a review from a team as a code owner May 10, 2026 14:43
@ehellbar ehellbar changed the title DPL: use per-path cache entry in ObjectCache DPL: fixes for memory leaks in CCDB caching May 10, 2026
@ehellbar ehellbar changed the title DPL: fixes for memory leaks in CCDB caching DPL: use per-path cache entry in ObjectCache May 10, 2026
@ehellbar ehellbar changed the title DPL: use per-path cache entry in ObjectCache DPL: fixes for memory leak in CCDB object caching May 10, 2026
@ehellbar ehellbar changed the title DPL: fixes for memory leak in CCDB object caching DPL: use per-path cache entry in ObjectCache May 10, 2026
@ehellbar ehellbar changed the title DPL: use per-path cache entry in ObjectCache DPL: fixes for memory leak in CCDB object caching May 10, 2026
// every CCDB update from that point onwards.
auto oldDPLCacheIt = helper->mapURL2DPLCache.find(path);
auto cacheId = allocator.adoptContainer(output, std::move(v), DataAllocator::CacheStrategy::Always, header::gSerializationMethodCCDB);
if (oldDPLCacheIt != helper->mapURL2DPLCache.end()) {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems to be a common pattern. Maybe worth a small helper?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe I can put the pruning inside the adoptContainer as you suggested in you former comment? this if (oldDPLCacheIt is anyway not really needed because the pruning is a no-op?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I put a static helper to CCDBHelper.h

@ehellbar ehellbar changed the title DPL: fixes for memory leak in CCDB object caching DPL: use per-path cache entry in ObjectCache May 11, 2026
@ehellbar ehellbar changed the title DPL: use per-path cache entry in ObjectCache DPL: fixes for memory leak in CCDB object caching May 11, 2026
@ehellbar

Copy link
Copy Markdown
Collaborator Author

I cleaned up the excessive comments as well

@ehellbar ehellbar changed the title DPL: fixes for memory leak in CCDB object caching DPL: use per-path cache entry in ObjectCache May 11, 2026
@ehellbar ehellbar changed the title DPL: use per-path cache entry in ObjectCache DPL: fixes for memory leak in CCDB object caching May 11, 2026
@ehellbar ehellbar changed the title DPL: fixes for memory leak in CCDB object caching DPL: use per-path cache entry in ObjectCache May 11, 2026
@ehellbar ehellbar changed the title DPL: use per-path cache entry in ObjectCache DPL: fixes for memory leak in CCDB object caching May 11, 2026
@alibuild

alibuild commented May 13, 2026

Copy link
Copy Markdown
Collaborator

Error while checking build/O2/fullCI_slc9 for 35ea930 at 2026-06-10 21:02:

## sw/BUILD/O2Physics-latest/log
CMake Error at /sw/slc9_x86-64/CMake/v4.1.4-2/share/cmake-4.1/Modules/CMakeTestCCompiler.cmake:67 (message):
    ninja: build stopped: subcommand failed.


## sw/BUILD/o2checkcode-latest/log
--
========== List of errors found ==========
++ GRERR=0
++ grep -v clang-diagnostic-error error-log.txt
++ grep ' error:'
++ GRERR=1
++ [[ 1 == 0 ]]
++ mkdir -p /sw/INSTALLROOT/3dab93be5dea1cd7df879ab0473e6189d6590e52/slc9_x86-64/o2checkcode/1.0-local2/etc/modulefiles
++ alibuild-generate-module
+ HAS_BIN=
+ HAS_LIB=
+ HAS_CMAKE=
+ HAS_ROOT=
+ '[' 0 '!=' 0 ']'
+ cat
+ printf 'if ![ is-loaded '\''BASE/1.0'\'' ] {\n module load BASE/1.0\n}'
+ echo 'BUILD_REQUIRES=CMake alibuild-recipe-tools defaults-release'
BUILD_REQUIRES=CMake alibuild-recipe-tools defaults-release
+ FULL_BUILD_REQUIRES='pytorch_cpuinfo alibuild-recipe-tools double-conversion Python-modules-list O2-customization defaults-release date bz2 FairCMakeModules Alice-GRID-Utils CMake ninja-fortran safe_int ninja googlebenchmark UUID json-c MPFR'
+ echo 'FULL_BUILD_REQUIRES=pytorch_cpuinfo alibuild-recipe-tools double-conversion Python-modules-list O2-customization defaults-release date bz2 FairCMakeModules Alice-GRID-Utils CMake ninja-fortran safe_int ninja googlebenchmark UUID json-c MPFR'
FULL_BUILD_REQUIRES=pytorch_cpuinfo alibuild-recipe-tools double-conversion Python-modules-list O2-customization defaults-release date bz2 FairCMakeModules Alice-GRID-Utils CMake ninja-fortran safe_int ninja googlebenchmark UUID json-c MPFR
++ env
++ cut -f1 -d=
++ grep -v '^DEFAULT_'
++ grep -v PKGREVISION
++ grep -v ALIBUILD_RECIPE_TOOLS
++ grep REVISION
++ sed -e s/_REVISION//
+ for x in $(env | cut -f1 -d= | grep -v "^DEFAULT_" | grep -v PKGREVISION | grep -v ALIBUILD_RECIPE_TOOLS | grep REVISION | sed -e 's/_REVISION//')
++ eval 'echo $LIBFFI_REVISION'
+++ echo 10
+ REVISION_VALUE=10
++ eval 'echo $LIBFFI_VERSION'
+++ echo v3.2.1-alice1
+ VERSION_VALUE=v3.2.1-alice1
++ eval 'echo $LIBFFI_ROOT'
+++ echo /sw/slc9_x86-64/libffi/v3.2.1-alice1-10
+ ROOT_PATH_VALUE=/sw/slc9_x86-64/libffi/v3.2.1-alice1-10
+ '[' -z 10 ']'
+ echo 'pytorch_cpuinfo alibuild-recipe-tools double-conversion Python-modules-list O2-customization defaults-release date bz2 FairCMakeModules Alice-GRID-Utils CMake ninja-fortran safe_int ninja googlebenchmark UUID json-c MPFR'
+ tr '[:lower:]' '[:upper:]'
+ tr - _
+ tr ' ' '\n'
[0 more errors; see full log]

Full log here.

@ehellbar ehellbar requested a review from ktf June 1, 2026 06:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants