Bug 548115
Summary: | memory leak in schema reload | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | [Retired] 389 | Reporter: | Noriko Hosoi <nhosoi> | ||||||
Component: | Schema | Assignee: | Noriko Hosoi <nhosoi> | ||||||
Status: | CLOSED CURRENTRELEASE | QA Contact: | Viktor Ashirov <vashirov> | ||||||
Severity: | medium | Docs Contact: | |||||||
Priority: | medium | ||||||||
Version: | 1.3.0 | CC: | jgalipea, rmeggins | ||||||
Target Milestone: | --- | ||||||||
Target Release: | --- | ||||||||
Hardware: | All | ||||||||
OS: | Linux | ||||||||
Whiteboard: | |||||||||
Fixed In Version: | Doc Type: | Bug Fix | |||||||
Doc Text: | Story Points: | --- | |||||||
Clone Of: | Environment: | ||||||||
Last Closed: | 2015-12-07 16:32:38 UTC | Type: | --- | ||||||
Regression: | --- | Mount Type: | --- | ||||||
Documentation: | --- | CRM: | |||||||
Verified Versions: | Category: | --- | |||||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||||
Cloudforms Team: | --- | Target Upstream Version: | |||||||
Embargoed: | |||||||||
Bug Depends On: | |||||||||
Bug Blocks: | 434914, 543590 | ||||||||
Attachments: |
|
Description
Noriko Hosoi
2009-12-16 16:59:58 UTC
DSE initialized in init_schema_dse usually does not get released... ==18156== 9,856 (2,352 direct, 7,504 indirect) bytes in 28 blocks are definitely lost in loss record 1,426 of 1,451 ==18156== at 0x4004F1B: calloc (vg_replace_malloc.c:418) ==18156== by 0x40382D1: slapi_ch_calloc (ch_malloc.c:243) ==18156== by 0x4047EFD: slapi_entry_alloc (entry.c:1695) ==18156== by 0x4045FF1: str2entry_dupcheck (entry.c:631) ==18156== by 0x4046FC8: slapi_str2entry (entry.c:1142) ==18156== by 0x40413B7: dse_read_one_file (dse.c:739) ==18156== by 0x4041633: dse_read_file (dse.c:811) ==18156== by 0x409AEBE: init_schema_dse_ext (schema.c:4168) ==18156== by 0x409B161: init_schema_dse (schema.c:4232) ==18156== by 0x805F435: setup_internal_backends (in /usr/sbin/ns-slapd) ==18156== by 0x80611BD: main (in /usr/sbin/ns-slapd) Created attachment 396201 [details]
git patch file
Files:
ldap/servers/slapd/dse.c
ldap/servers/slapd/schema.c
Description:
dse.c: 1) dse_add_entry_pb is supposed to free the given
the schema entry e. Although the function never consumes the
entry, it was only freeing it when the entry was added. (If
it was merged or rejected, it was not freed.)
schema.c: 1) when allocating a work buffer with sizedbuffer_allocate,
the space for the NULL termination was not counted.
2) DSE returned from slapi_validate_schema_files must have been
freed regardless of the return value.
Reviewed by Rich (Thank you!!!) Pushed to master: $ git merge work Updating 2cc5ac4..2c28527 Fast forward ldap/servers/slapd/dse.c | 13 ++++++++----- ldap/servers/slapd/schema.c | 8 +++++--- 2 files changed, 13 insertions(+), 8 deletions(-) $ git push Counting objects: 13, done. Delta compression using 4 threads. Compressing objects: 100% (7/7), done. Writing objects: 100% (7/7), 1.19 KiB, done. Total 7 (delta 5), reused 0 (delta 0) To ssh://git.fedorahosted.org/git/389/ds.git 2cc5ac4..2c28527 master -> master Pushed to Directory_Server_8_2_Branch $ git push origin ds82-local:Directory_Server_8_2_Branch Counting objects: 13, done. Delta compression using 4 threads. Compressing objects: 100% (7/7), done. Writing objects: 100% (7/7), 1.19 KiB, done. Total 7 (delta 5), reused 0 (delta 0) To ssh://git.fedorahosted.org/git/389/ds.git 0e888ff..9f3536c ds82-local -> Directory_Server_8_2_Branch Created attachment 419148 [details]
valgrind logs
please review attached valgrind logs for memory leak fix. Thanks! None of these are the original leak, so we can declare this as verified. verified - RHEL 4 version: redhat-ds-base-8.2.0-2010060204.el4dsrv Thank you Rich |