Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Description of problem:
Memory leak detected in backend by ASan memory error detector in https://github.com/389ds/389-ds-base master branch.
How reproducible:
100%
Steps to Reproduce:
1. Clone 389-ds repo
2. Configure autoconf to use ASan memory error detector
3. Running any of the below tests trigger the memory leak:
dirsrvtests/tests/suites/mapping_tree/referral_during_tot_init_test.py
dirsrvtests/tests/suites/import/import_test.py::test_crash_on_ldif2db
dirsrvtests/tests/suites/import/import_test.py::test_issue_a_warning_if_the_cache_size_is_smaller
dirsrvtests/tests/suites/import/import_test.py::test_fast_slow_import
dirsrvtests/tests/suites/import/import_test.py::test_entry_with_escaped_characters_fails_to_import_and_index
dirsrvtests/tests/suites/import/import_test.py::test_import_perf_after_failure
dirsrvtests/tests/suites/import/import_test.py::test_ldif2db_syntax_check
Actual results:
Tests fail, dumping a memory leak trace:
Direct leak of 40 byte(s) in 1 object(s) allocated from:
#0 0x7f72a9e41667 in __interceptor_malloc (/lib64/libasan.so.6+0xb0667)
#1 0x7f72a9a981c9 in slapi_ch_malloc ldap/servers/slapd/ch_malloc.c:95
#2 0x7f72a9ab557a in slapi_sdn_new ldap/servers/slapd/dn.c:1903
#3 0x7f72a9ab5df0 in slapi_sdn_new_normdn_byval ldap/servers/slapd/dn.c:2102
#4 0x7f72a9ab7bbf in slapi_sdn_dup ldap/servers/slapd/dn.c:2489
#5 0x7f72a9a90384 in be_addsuffix ldap/servers/slapd/backend.c:176
#6 0x4426e5 in setup_internal_backends ldap/servers/slapd/fedse.c:2886
#7 0x446b45 in main ldap/servers/slapd/main.c:720
#8 0x7f72a9299041 in __libc_start_main (/lib64/libc.so.6+0x27041)
Indirect leak of 11 byte(s) in 1 object(s) allocated from:
#0 0x7f72a9deb3a7 in strdup (/lib64/libasan.so.6+0x5a3a7)
#1 0x7f72a9a986b1 in slapi_ch_strdup ldap/servers/slapd/ch_malloc.c:196
#2 0x7f72a9ab646c in slapi_sdn_set_normdn_byval ldap/servers/slapd/dn.c:2182
#3 0x7f72a9ab5e07 in slapi_sdn_new_normdn_byval ldap/servers/slapd/dn.c:2103
#4 0x7f72a9ab7bbf in slapi_sdn_dup ldap/servers/slapd/dn.c:2489
#5 0x7f72a9a90384 in be_addsuffix ldap/servers/slapd/backend.c:176
#6 0x4426fe in setup_internal_backends ldap/servers/slapd/fedse.c:2887
#7 0x446b45 in main ldap/servers/slapd/main.c:720
#8 0x7f72a9299041 in __libc_start_main (/lib64/libc.so.6+0x27041)
Indirect leak of 1 byte(s) in 1 object(s) allocated from:
#0 0x7f72a9deb3a7 in strdup (/lib64/libasan.so.6+0x5a3a7)
#1 0x7f72a9a986b1 in slapi_ch_strdup ldap/servers/slapd/ch_malloc.c:196
#2 0x7f72a9ab646c in slapi_sdn_set_normdn_byval ldap/servers/slapd/dn.c:2182
#3 0x7f72a9ab5e07 in slapi_sdn_new_normdn_byval ldap/servers/slapd/dn.c:2103
#4 0x7f72a9ab7bbf in slapi_sdn_dup ldap/servers/slapd/dn.c:2489
#5 0x7f72a9a90384 in be_addsuffix ldap/servers/slapd/backend.c:176
#6 0x4426e5 in setup_internal_backends ldap/servers/slapd/fedse.c:2886
#7 0x446b45 in main ldap/servers/slapd/main.c:720
#8 0x7f72a9299041 in __libc_start_main (/lib64/libc.so.6+0x27041)
SUMMARY: AddressSanitizer: 92 byte(s) leaked in 4 allocation(s)
Expected results:
Tests should pass
Additional info:
There may be more tests that trigger this issue.
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 (389-ds-base bug fix and enhancement update), and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.
https://access.redhat.com/errata/RHBA-2021:4203