Hide Forgot
+++ This bug was initially created as a clone of Bug #697027 +++ Description of problem: It turned out the leak found by reliab12 was the same as the case 6 of #697027. This leak is a test stopper. Created attachment 492469 [details] git patch file (master): [Case 6] ruvstore> ==28643== 48 bytes in 3 blocks are definitely lost in loss record 579 of 1,499 ==28643== at 0x4C23481: calloc (vg_replace_malloc.c:418) ==28643== by 0x4E70F19: slapi_ch_calloc (ch_malloc.c:243) ==28643== by 0x4E72AE6: csn_new (csn.c:102) ==28643== by 0x4E72B1D: csn_new_by_string (csn.c:112) ==28643== by 0x4E80146: str2entry_state_information_from_type (entry.c:131) ==28643== by 0x4E8179F: str2entry_dupcheck (entry.c:786) ==28643== by 0x4E82D4B: slapi_str2entry_ext (entry.c:1405) ==28643== by 0xBC6146C: id2entry (id2entry.c:406) ==28643== by 0xBC9D7C0: ldbm_back_next_search_entry_ext (ldbm_search.c:1296) ==28643== by 0xBC9D1D7: ldbm_back_next_search_entry (ldbm_search.c:1141) ==28643== by 0x4EB9211: iterate (opshared.c:1141) ==28643== by 0x4EB9ACF: send_results_ext (opshared.c:1522) ==28643== by 0x4EB8979: op_shared_search (opshared.c:733) ==28643== by 0x42BBE4: do_search (search.c:393) ==28643== by 0x413B76: connection_dispatch_operation (connection.c:611) ==28643== by 0x4152BF: connection_threadmain (connection.c:2328) ==28643== by 0x5FCD632: _pt_root (ptthread.c:187) ==28643== by 0x61E8760: start_thread (pthread_create.c:301) ==28643== by 0x64DD98C: clone (clone.S:115) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Bug 697027 - 6 - minor memory leaks found by Valgrind + TET Description: Moving "csn_free(&attributedeletioncsn)" to the free_and_return section to fix the leak.
More accurate stacktrace which causes the leak in reliab12 test. #0 str2entry_state_information_from_type (s=<value optimized out>, csnset=0x7feb661f1620, attributedeletioncsn=0x7feb661f1628, maxcsn=0x7feb661f1638, value_state=0x7feb661f166c, attr_state=0x7feb661f1668) at ldap/servers/slapd/entry.c:131 #1 0x0000003594056805 in str2entry_dupcheck (rawdn=0x0, s=<value optimized out>, flags=1024, read_stateinfo=-1) at ldap/servers/slapd/entry.c:786 #2 0x0000003594057b8d in slapi_str2entry_ext ( dn=0x7feb48003280 "cn=data_1770,ou=ou2 with space,o=o1", s=0x7feb480036a0 "rdn", flags=1024) at ldap/servers/slapd/entry.c:1401 #3 0x00007feb7a047368 in id2entry (be=0x284ef30, id=918, txn=0x0, err=<value optimized out>) at ldap/servers/slapd/back-ldbm/id2entry.c:406 #4 0x00007feb7a086d41 in uniqueid2entry (be=0x284ef30, uniqueid=<value optimized out>, txn=0x0, err=0x7feb661f58cc) at ldap/servers/slapd/back-ldbm/uniqueid2entry.c:86 #5 0x00007feb7a0469eb in find_entry_internal_uniqueid (pb=0x2b03860, be=0x284ef30, addr=<value optimized out>, lock=1, txn=0x0, really_internal=<value optimized out>) at ldap/servers/slapd/back-ldbm/findentry.c:219 #6 find_entry_internal (pb=0x2b03860, be=0x284ef30, addr=<value optimized out>, lock=1, txn=0x0, really_internal=<value optimized out>) at ldap/servers/slapd/back-ldbm/findentry.c:275 #7 0x00007feb7a071ddb in ldbm_back_modify (pb=0x2b03860) at ldap/servers/slapd/back-ldbm/ldbm_modify.c:266 #8 0x000000359407b83c in op_shared_modify (pb=<value optimized out>, pw_change=0, old_pw=0x0) at ldap/servers/slapd/modify.c:886 #9 0x000000359407c696 in do_modify (pb=0x2b03860) at ldap/servers/slapd/modify.c:384 #10 0x00000000004135e4 in connection_dispatch_operation () at ldap/servers/slapd/connection.c:583 #11 connection_threadmain () at ldap/servers/slapd/connection.c:2328 #12 0x0000003e5c829633 in ?? () from /lib64/libnspr4.so #13 0x0000003e4d8077e1 in start_thread () from /lib64/libpthread.so.0 #14 0x0000003e4d4e68ed in clone () from /lib64/libc.so.6
Created attachment 503349 [details] git patch file (RHEL-6) Description: str2entry_dupcheck (entry.c): If attributedeletioncsn was associated with entrydn and flag SLAPI_STR2ENTRY_NO_ENTRYDN is set, the address was not released. This patch fixes the leak. cherry-picked commit: 2af101b69ece052498158fd50804d843d75ef1a0
*** Bug 717073 has been marked as a duplicate of this bug. ***
Cloned https://bugzilla.redhat.com/show_bug.cgi?id=697027 is VERIFIED hence marking this as VERIFIED
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. http://rhn.redhat.com/errata/RHEA-2011-1711.html