Description of problem: Found in TET mmrepl/accept + valgrind accept.vg ==30862== 48,067 (7,291 direct, 40,776 indirect) bytes in 61 blocks are definitely lost in loss record 82 of 95 ==30862== at 0x4A0763E: malloc (vg_replace_malloc.c:207) ==30862== by 0x4C50439: slapi_ch_malloc (ch_malloc.c:155) ==30862== by 0xB4D5169: Repl_5_Inc_Protocol_new (repl5_inc_protocol.c:2056) ==30862== by 0xB4D9465: private_protocol_factory (repl5_protocol.c:551) ==30862== by 0xB4D8B9C: prot_new (repl5_protocol.c:132) ==30862== by 0xB4C98D3: agmt_start (repl5_agmt.c:550) ==30862== by 0xB4E005B: replica_start_agreement (repl5_replica.c:3325) ==30862== by 0xB4CCD56: add_new_agreement (repl5_agmtlist.c:170) ==30862== by 0xB4CCDC0: agmtlist_add_callback (repl5_agmtlist.c:184) ==30862== by 0x4C5C17C: dse_call_callback (dse.c:2229) ==30862== by 0x4C5B973: dse_add (dse.c:2055) ==30862== by 0x4C47FE2: op_shared_add (add.c:631) ==30862== by 0x4C4728B: do_add (add.c:232) ==30862== by 0x413221: connection_dispatch_operation (connection.c:544) ==30862== by 0x4149A1: connection_threadmain (connection.c:2267) ==30862== by 0x32B7429262: (within /lib64/libnspr4.so) ==30862== by 0x37A6406869: start_thread (in /lib64/libpthread-2.10.1.so) ==30862== by 0x37A58DE3BC: clone (in /lib64/libc-2.10.1.so) repl5_inc_protocol.c: repl5_inc_delete is not implemented. /* * It's specifically ok to delete a protocol instance that * is currently running. The instance will be shut down, and * then resources will be freed. Since a graceful shutdown is * attempted, this function may take some time to complete. */ static void repl5_inc_delete(Private_Repl_Protocol **prpp) { /* First, stop the protocol if it isn't already stopped */ /* Then, delete all resources used by the protocol */ }
Created attachment 401614 [details] git patch file Description: repl5_inc_delete and repl5_tot_delete to release the incremental and total update protocol were not implemented. This fix implemented them. Also, it fixed a leak of connection in private_protocol_factory.
Reviewed by Nathan (Thank you!!!) Pushed to master: $ git merge work Updating 6236bb3..04a0bd9 Fast-forward .../plugins/replication/repl5_inc_protocol.c | 14 +++++++ ldap/servers/plugins/replication/repl5_protocol.c | 38 +++++++++++++------- .../plugins/replication/repl5_tot_protocol.c | 18 +++++++++- 3 files changed, 56 insertions(+), 14 deletions(-) $ git push Counting objects: 17, done. Delta compression using up to 2 threads. Compressing objects: 100% (9/9), done. Writing objects: 100% (9/9), 1.37 KiB, done. Total 9 (delta 7), reused 0 (delta 0) To ssh://git.fedorahosted.org/git/389/ds.git 6236bb3..04a0bd9 master -> master Pushed to Directory_Server_8_2_Branch: $ git push origin ds82-local:Directory_Server_8_2_Branch Counting objects: 17, done. Delta compression using up to 2 threads. Compressing objects: 100% (9/9), done. Writing objects: 100% (9/9), 1.38 KiB, done. Total 9 (delta 7), reused 0 (delta 0) To ssh://git.fedorahosted.org/git/389/ds.git 02514d6..a30b3bd ds82-local -> Directory_Server_8_2_Branch
Created attachment 419452 [details] mmraccept valgrind logs please review the attached valgrind logs for memory leak fix Thanks!
Thanks, Jenny. The particular leak does not exist in your valgrind logs. $ tar xvf ../valgrind_mmraccept.tar accept.vg.12390.12396 accept.vg.12697.12703 accept.vg.12994.13000 [...] accept.vg.7935.7941 accept.vg.8372.8378 accept.vg.8811.8817 $ egrep Repl_5_Inc_Protocol_new * $
verified - RHEL 4 Thanks Noriko! version: redhat-ds-base-8.2.0-2010060204.el4dsrv