Skip to content

ITS#10218 Disabling and re-enabling an asyncmeta database via cn=config leaks memory

Nadezhda Ivanova requested to merge nivanova/openldap:its10218 into master

Make sure asyncmeta frees the pending operations structures, resets all connections, frees connection structures and stops the timeout-loop.

In case the database is in use, we rely on the timeout loop to safely clean up any op contexts and clear up the connections. Initially I tried to do it directly in asyncmeta_db_close. However, it seems some other threads might have begun op processing, and we were leaking some thread contexts (valgrind errors for data allocated at meta_result.c:1509). This way it may take a couple of seconds until all memory is freed and all connections reset, but it is safer.

Merge request reports

Loading