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.
Bug 1790975 - Several memory leaks reported by Valgrind for 389-ds 1.3.9.1-10.
Summary: Several memory leaks reported by Valgrind for 389-ds 1.3.9.1-10.
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: 389-ds-base
Version: 8.2
Hardware: x86_64
OS: Linux
unspecified
high
Target Milestone: rc
: 8.0
Assignee: thierry bordaz
QA Contact: RHDS QE
URL:
Whiteboard:
: 1791342 (view as bug list)
Depends On: 1769418
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-01-14 15:58 UTC by mreynolds
Modified: 2023-03-26 08:52 UTC (History)
14 users (show)

Fixed In Version: 389-ds-base-1.4.2.4-7.module+el8.2.0+5670+0b8b1c2e
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 1769418
Environment:
Last Closed: 2020-04-28 16:01:22 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker RHELPLAN-32299 0 None None None 2023-03-26 08:52:29 UTC
Red Hat Product Errata RHBA-2020:1703 0 None None None 2020-04-28 16:01:43 UTC

Comment 2 thierry bordaz 2020-01-21 10:16:51 UTC
Regression [1] was fixed [2] and is pushed master, 1.4.2, 1.4.1, 1.4.0
In addition the BZ was also backported to 1.3.10

[1] https://bugzilla.redhat.com/show_bug.cgi?id=1790975#c1
[2] https://pagure.io/389-ds-base/pull-request/50833

Comment 3 mreynolds 2020-01-21 14:19:47 UTC
*** Bug 1791342 has been marked as a duplicate of this bug. ***

Comment 5 Viktor Ashirov 2020-01-23 09:58:29 UTC
Build tested: 389-ds-base-1.4.2.4-6.2asan.el8.x86_64 (additionally contains
https://pagure.io/389-ds-base/c/cf849cc to unblock tests)

dirsrvtests/tests/suites/acl/keywords_test.py reports a leak:

=================================================================
==15883==ERROR: LeakSanitizer: detected memory leaks

Direct leak of 88 byte(s) in 1 object(s) allocated from:
    #0 0x7fb7f7ebcb78 in __interceptor_malloc (/lib64/libasan.so.5+0xefb78)
    #1 0x7fb7e8b6783e in INTsystem_malloc_perm (/usr/lib64/dirsrv/libns-dshttpd-1.4.2.4.so+0x5983e)
    #2 0x7fb7e8b50563  (/usr/lib64/dirsrv/libns-dshttpd-1.4.2.4.so+0x42563)
    #3 0x7fb7e8b520fb in LASIpEval (/usr/lib64/dirsrv/libns-dshttpd-1.4.2.4.so+0x440fb)
    #4 0x7fb7e8b556d5 in ACLEvalAce(NSErr_s*, ACLEvalHandle*, ACLExprHandle*, unsigned long*, PListStruct_s**, PListStruct_s*) (/usr/lib64/dirsrv/libns-dshttpd-1.4.2.4.so+0x476d5)
    #5 0x7fb7e8b57400  (/usr/lib64/dirsrv/libns-dshttpd-1.4.2.4.so+0x49400)
    #6 0x7fb7e8b5852d in ACL_EvalTestRights (/usr/lib64/dirsrv/libns-dshttpd-1.4.2.4.so+0x4a52d)
    #7 0x7fb7e8dc7e81 in acl__TestRights ldap/servers/plugins/acl/acl.c:3289
    #8 0x7fb7e8dd14ce in acl_access_allowed (/usr/lib64/dirsrv/plugins/libacl-plugin.so+0x224ce)
    #9 0x7fb7e8e049bb in acl_access_allowed_main ldap/servers/plugins/acl/aclplugin.c:371
    #10 0x7fb7f7a1ffea in plugin_call_acl_plugin (/usr/lib64/dirsrv/libslapd.so.0+0x1c3fea)
    #11 0x7fb7f7a20d7d in slapi_access_allowed (/usr/lib64/dirsrv/libslapd.so.0+0x1c4d7d)
    #12 0x7fb7e8dd4859 in acl_check_mods (/usr/lib64/dirsrv/plugins/libacl-plugin.so+0x25859)
    #13 0x7fb7f7a20252 in plugin_call_acl_mods_access (/usr/lib64/dirsrv/libslapd.so.0+0x1c4252)
    #14 0x7fb7e5401f0e in ldbm_back_modify ldap/servers/slapd/back-ldbm/ldbm_modify.c:616
    #15 0x7fb7f79daa53  (/usr/lib64/dirsrv/libslapd.so.0+0x17ea53)
    #16 0x7fb7f79dea0b in do_modify (/usr/lib64/dirsrv/libslapd.so.0+0x182a0b)
    #17 0x55ec866bce3d in connection_dispatch_operation ldap/servers/slapd/connection.c:638
    #18 0x55ec866bce3d in connection_threadmain ldap/servers/slapd/connection.c:1767
    #19 0x7fb7f5224567  (/lib64/libnspr4.so+0x2b567)

Indirect leak of 11176 byte(s) in 127 object(s) allocated from:
    #0 0x7fb7f7ebcb78 in __interceptor_malloc (/lib64/libasan.so.5+0xefb78)
    #1 0x7fb7e8b6783e in INTsystem_malloc_perm (/usr/lib64/dirsrv/libns-dshttpd-1.4.2.4.so+0x5983e)
    #2 0x7fb7e8b50563  (/usr/lib64/dirsrv/libns-dshttpd-1.4.2.4.so+0x42563)
    #3 0x7fb7e8b51d22 in LASIpEval (/usr/lib64/dirsrv/libns-dshttpd-1.4.2.4.so+0x43d22)
    #4 0x7fb7e8b556d5 in ACLEvalAce(NSErr_s*, ACLEvalHandle*, ACLExprHandle*, unsigned long*, PListStruct_s**, PListStruct_s*) (/usr/lib64/dirsrv/libns-dshttpd-1.4.2.4.so+0x476d5)
    #5 0x7fb7e8b57400  (/usr/lib64/dirsrv/libns-dshttpd-1.4.2.4.so+0x49400)
    #6 0x7fb7e8b5852d in ACL_EvalTestRights (/usr/lib64/dirsrv/libns-dshttpd-1.4.2.4.so+0x4a52d)
    #7 0x7fb7e8dc7e81 in acl__TestRights ldap/servers/plugins/acl/acl.c:3289
    #8 0x7fb7e8dd14ce in acl_access_allowed (/usr/lib64/dirsrv/plugins/libacl-plugin.so+0x224ce)
    #9 0x7fb7e8e049bb in acl_access_allowed_main ldap/servers/plugins/acl/aclplugin.c:371
    #10 0x7fb7f7a1ffea in plugin_call_acl_plugin (/usr/lib64/dirsrv/libslapd.so.0+0x1c3fea)
    #11 0x7fb7f7a20d7d in slapi_access_allowed (/usr/lib64/dirsrv/libslapd.so.0+0x1c4d7d)
    #12 0x7fb7e8dd4859 in acl_check_mods (/usr/lib64/dirsrv/plugins/libacl-plugin.so+0x25859)
    #13 0x7fb7f7a20252 in plugin_call_acl_mods_access (/usr/lib64/dirsrv/libslapd.so.0+0x1c4252)
    #14 0x7fb7e5401f0e in ldbm_back_modify ldap/servers/slapd/back-ldbm/ldbm_modify.c:616
    #15 0x7fb7f79daa53  (/usr/lib64/dirsrv/libslapd.so.0+0x17ea53)
    #16 0x7fb7f79dea0b in do_modify (/usr/lib64/dirsrv/libslapd.so.0+0x182a0b)
    #17 0x55ec866bce3d in connection_dispatch_operation ldap/servers/slapd/connection.c:638
    #18 0x55ec866bce3d in connection_threadmain ldap/servers/slapd/connection.c:1767
    #19 0x7fb7f5224567  (/lib64/libnspr4.so+0x2b567)

SUMMARY: AddressSanitizer: 11264 byte(s) leaked in 128 allocation(s).

Moving to ASSIGNED.

Comment 7 mreynolds 2020-01-23 14:54:50 UTC
The patches are definitely applied, so maybe there is another leak?  Reassigning to Thierry who worked on the fix.  Viktor, what test did you run to reproduce the leak?

Comment 8 Viktor Ashirov 2020-01-23 15:33:04 UTC
I was running dirsrvtests/tests/suites/acl/keywords_test.py (with SELinux turned off, otherwise LeakSanitizer doesn't produce any output).

Comment 9 thierry bordaz 2020-01-23 15:58:48 UTC
yes this is a different leak,  but starting looking at it with this BZ. We may open a new one if necessary.

Comment 10 thierry bordaz 2020-01-24 10:36:27 UTC
Backport in 1.3.10 (https://bugzilla.redhat.com/show_bug.cgi?id=1790975#c2) is failing (hang), working on a fix.

Comment 11 thierry bordaz 2020-01-28 10:15:50 UTC
Status:
 - regression 1.3.10 fixed (use of Monitor rather than pthread_mutex)
 - failure detected https://bugzilla.redhat.com/show_bug.cgi?id=1790975#c5 is a different leak tracked with https://pagure.io/389-ds-base/issue/50857
 - Fix for this BZ is pushed upstream (be careful two commits 50709) => POST

Comment 13 Viktor Ashirov 2020-02-24 12:40:12 UTC
====================================================================================================== test session starts ======================================================================================================
platform linux -- Python 3.6.8, pytest-5.3.5, py-1.8.1, pluggy-0.13.1 -- /usr/bin/python3.6
cachedir: .pytest_cache
metadata: {'Python': '3.6.8', 'Platform': 'Linux-4.18.0-179.el8.x86_64-x86_64-with-redhat-8.2-Ootpa', 'Packages': {'pytest': '5.3.5', 'py': '1.8.1', 'pluggy': '0.13.1'}, 'Plugins': {'metadata': '1.8.0', 'html': '2.0.1'}}
389-ds-base: 1.4.2.4-7.1asan.el8
nss: 3.44.0-15.el8
nspr: 4.21.0-2.el8_0
openldap: 2.4.46-11.el8
cyrus-sasl: 2.1.27-1.el8
FIPS: disabled
rootdir: /mnt/tests/rhds/tests/upstream/ds/dirsrvtests, inifile: pytest.ini
plugins: metadata-1.8.0, html-2.0.1
collected 57 items

ds/dirsrvtests/tests/suites/acl/keywords_part2_test.py::test_access_from_certain_network_only_ip PASSED                                                                                                                   [  1%]
ds/dirsrvtests/tests/suites/acl/keywords_part2_test.py::test_connectin_from_an_unauthorized_network PASSED                                                                                                                [  3%]
ds/dirsrvtests/tests/suites/acl/keywords_part2_test.py::test_ip_keyword_test_noip_cannot PASSED                                                                                                                           [  5%]
ds/dirsrvtests/tests/suites/acl/keywords_part2_test.py::test_user_can_access_the_data_at_any_time PASSED                                                                                                                  [  7%]
ds/dirsrvtests/tests/suites/acl/keywords_part2_test.py::test_user_can_access_the_data_only_in_the_morning PASSED                                                                                                          [  8%]
ds/dirsrvtests/tests/suites/acl/keywords_part2_test.py::test_user_can_access_the_data_only_in_the_afternoon PASSED                                                                                                        [ 10%]
ds/dirsrvtests/tests/suites/acl/keywords_part2_test.py::test_timeofday_keyword PASSED                                                                                                                                     [ 12%]
ds/dirsrvtests/tests/suites/acl/keywords_part2_test.py::test_dayofweek_keyword_test_everyday_can_access PASSED                                                                                                            [ 14%]
ds/dirsrvtests/tests/suites/acl/keywords_part2_test.py::test_dayofweek_keyword_today_can_access PASSED                                                                                                                    [ 15%]
ds/dirsrvtests/tests/suites/acl/keywords_part2_test.py::test_user_cannot_access_the_data_at_all PASSED                                                                                                                    [ 17%]
ds/dirsrvtests/tests/suites/acl/keywords_test.py::test_user_binds_with_a_password_and_can_access_the_data PASSED                                                                                                          [ 19%]
ds/dirsrvtests/tests/suites/acl/keywords_test.py::test_user_binds_with_a_bad_password_and_cannot_access_the_data PASSED                                                                                                   [ 21%]
ds/dirsrvtests/tests/suites/acl/keywords_test.py::test_anonymous_user_cannot_access_the_data PASSED                                                                                                                       [ 22%]
ds/dirsrvtests/tests/suites/acl/keywords_test.py::test_authenticated_but_has_no_rigth_on_the_data PASSED                                                                                                                  [ 24%]
ds/dirsrvtests/tests/suites/acl/keywords_test.py::test_the_bind_client_is_accessing_the_directory PASSED                                                                                                                  [ 26%]
ds/dirsrvtests/tests/suites/acl/keywords_test.py::test_users_binds_with_a_password_and_can_access_the_data PASSED                                                                                                         [ 28%]
ds/dirsrvtests/tests/suites/acl/keywords_test.py::test_user_binds_without_any_password_and_cannot_access_the_data PASSED                                                                                                  [ 29%]
ds/dirsrvtests/tests/suites/acl/keywords_test.py::test_user_can_access_the_data_when_connecting_from_any_machine PASSED                                                                                                   [ 31%]
ds/dirsrvtests/tests/suites/acl/keywords_test.py::test_user_can_access_the_data_when_connecting_from_internal_ds_network_only PASSED                                                                                      [ 33%]
ds/dirsrvtests/tests/suites/acl/keywords_test.py::test_user_can_access_the_data_when_connecting_from_some_network_only PASSED                                                                                             [ 35%]
ds/dirsrvtests/tests/suites/acl/keywords_test.py::test_from_an_unauthorized_network PASSED                                                                                                                                [ 36%]
ds/dirsrvtests/tests/suites/acl/keywords_test.py::test_user_cannot_access_the_data_when_connecting_from_an_unauthorized_network_2 PASSED                                                                                  [ 38%]
ds/dirsrvtests/tests/suites/acl/keywords_test.py::test_user_cannot_access_the_data_if_not_from_a_certain_domain PASSED                                                                                                    [ 40%]
ds/dirsrvtests/tests/suites/acl/keywords_test.py::test_dnsalias_keyword_test_nodns_cannot PASSED                                                                                                                          [ 42%]
ds/dirsrvtests/tests/suites/acl/keywords_test.py::test_user_can_access_from_ipv4_or_ipv6_address[127.0.0.1] PASSED                                                                                                        [ 43%]
ds/dirsrvtests/tests/suites/acl/keywords_test.py::test_user_can_access_from_ipv4_or_ipv6_address[[::1]] PASSED                                                                                                            [ 45%]
ds/dirsrvtests/tests/suites/paged_results/paged_results_test.py::test_search_success[6-5] PASSED                                                                                                                          [ 47%]
ds/dirsrvtests/tests/suites/paged_results/paged_results_test.py::test_search_success[5-5] PASSED                                                                                                                          [ 49%]
ds/dirsrvtests/tests/suites/paged_results/paged_results_test.py::test_search_success[5-25] PASSED                                                                                                                         [ 50%]
ds/dirsrvtests/tests/suites/paged_results/paged_results_test.py::test_search_limits_fail[50-200-cn=config,cn=ldbm database,cn=plugins,cn=config-nsslapd-idlistscanlimit-100-UNWILLING_TO_PERFORM] PASSED                  [ 52%]
ds/dirsrvtests/tests/suites/paged_results/paged_results_test.py::test_search_limits_fail[5-15-cn=config-nsslapd-timelimit-20-UNAVAILABLE_CRITICAL_EXTENSION] PASSED                                                       [ 54%]
ds/dirsrvtests/tests/suites/paged_results/paged_results_test.py::test_search_limits_fail[21-50-cn=config-nsslapd-sizelimit-20-SIZELIMIT_EXCEEDED] PASSED                                                                  [ 56%]
ds/dirsrvtests/tests/suites/paged_results/paged_results_test.py::test_search_limits_fail[21-50-cn=config-nsslapd-pagedsizelimit-5-SIZELIMIT_EXCEEDED] PASSED                                                              [ 57%]
ds/dirsrvtests/tests/suites/paged_results/paged_results_test.py::test_search_limits_fail[5-50-cn=config,cn=ldbm database,cn=plugins,cn=config-nsslapd-lookthroughlimit-20-ADMINLIMIT_EXCEEDED] PASSED                     [ 59%]
ds/dirsrvtests/tests/suites/paged_results/paged_results_test.py::test_search_sort_success PASSED                                                                                                                          [ 61%]
ds/dirsrvtests/tests/suites/paged_results/paged_results_test.py::test_search_abandon PASSED                                                                                                                               [ 63%]
ds/dirsrvtests/tests/suites/paged_results/paged_results_test.py::test_search_with_timelimit PASSED                                                                                                                        [ 64%]
ds/dirsrvtests/tests/suites/paged_results/paged_results_test.py::test_search_dns_ip_aci[dns = "localhost.localdomain"] PASSED                                                                                             [ 66%]
ds/dirsrvtests/tests/suites/paged_results/paged_results_test.py::test_search_dns_ip_aci[ip = "127.0.0.1"] PASSED                                                                                                          [ 68%]
ds/dirsrvtests/tests/suites/paged_results/paged_results_test.py::test_search_multiple_paging PASSED                                                                                                                       [ 70%]
ds/dirsrvtests/tests/suites/paged_results/paged_results_test.py::test_search_invalid_cookie[1000] PASSED                                                                                                                  [ 71%]
ds/dirsrvtests/tests/suites/paged_results/paged_results_test.py::test_search_invalid_cookie[-1] PASSED                                                                                                                    [ 73%]
ds/dirsrvtests/tests/suites/paged_results/paged_results_test.py::test_search_abandon_with_zero_size PASSED                                                                                                                [ 75%]
ds/dirsrvtests/tests/suites/paged_results/paged_results_test.py::test_search_pagedsizelimit_success PASSED                                                                                                                [ 77%]
ds/dirsrvtests/tests/suites/paged_results/paged_results_test.py::test_search_nspagedsizelimit[5-15-PASS] PASSED                                                                                                           [ 78%]
ds/dirsrvtests/tests/suites/paged_results/paged_results_test.py::test_search_nspagedsizelimit[15-5-SIZELIMIT_EXCEEDED] PASSED                                                                                             [ 80%]
ds/dirsrvtests/tests/suites/paged_results/paged_results_test.py::test_search_paged_limits[conf_attr_values0-ADMINLIMIT_EXCEEDED] PASSED                                                                                   [ 82%]
ds/dirsrvtests/tests/suites/paged_results/paged_results_test.py::test_search_paged_limits[conf_attr_values1-PASS] PASSED                                                                                                  [ 84%]
ds/dirsrvtests/tests/suites/paged_results/paged_results_test.py::test_search_paged_user_limits[conf_attr_values0-ADMINLIMIT_EXCEEDED] PASSED                                                                              [ 85%]
ds/dirsrvtests/tests/suites/paged_results/paged_results_test.py::test_search_paged_user_limits[conf_attr_values1-PASS] PASSED                                                                                             [ 87%]
ds/dirsrvtests/tests/suites/paged_results/paged_results_test.py::test_ger_basic PASSED                                                                                                                                    [ 89%]
ds/dirsrvtests/tests/suites/paged_results/paged_results_test.py::test_multi_suffix_search PASSED                                                                                                                          [ 91%]
ds/dirsrvtests/tests/suites/paged_results/paged_results_test.py::test_maxsimplepaged_per_conn_success[None] PASSED                                                                                                        [ 92%]
ds/dirsrvtests/tests/suites/paged_results/paged_results_test.py::test_maxsimplepaged_per_conn_success[-1] PASSED                                                                                                          [ 94%]
ds/dirsrvtests/tests/suites/paged_results/paged_results_test.py::test_maxsimplepaged_per_conn_success[1000] PASSED                                                                                                        [ 96%]
ds/dirsrvtests/tests/suites/paged_results/paged_results_test.py::test_maxsimplepaged_per_conn_failure[0] PASSED                                                                                                           [ 98%]
ds/dirsrvtests/tests/suites/paged_results/paged_results_test.py::test_maxsimplepaged_per_conn_failure[1] PASSED                                                                                                           [100%]

========================================================================================== 57 passed, 13 warnings in 224.05s (0:03:44) ==========================================================================================

Automated tests pass, no memory leak (described in this bugzilla) found.
Marking as VERIFIED.

Comment 15 errata-xmlrpc 2020-04-28 16:01:22 UTC
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.

https://access.redhat.com/errata/RHBA-2020:1703


Note You need to log in before you can comment on or make changes to this bug.