Bug 1758469 - LeakSanitizer: detected memory leaks in dbscan
Summary: LeakSanitizer: detected memory leaks in dbscan
Keywords:
Status: VERIFIED
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: 389-ds-base
Version: 8.1
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: 8.2
Assignee: Simon Pichugin
QA Contact: RHDS QE
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-10-04 08:52 UTC by Viktor Ashirov
Modified: 2020-07-09 23:25 UTC (History)
7 users (show)

Fixed In Version: 389-ds-base-1.4.3.8-2.module+el8.3.0+6591+ebfc9766
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed:
Type: Bug
Target Upstream Version:


Attachments (Terms of Use)

Description Viktor Ashirov 2019-10-04 08:52:39 UTC
Description of problem:

=================================================================
==dbscan==29180==ERROR: LeakSanitizer: detected memory leaks

Direct leak of 21 byte(s) in 1 object(s) allocated from:
    #0 0x7fa97e7ffae8 in __interceptor_malloc (/lib64/libasan.so.5+0xefae8)
    #1 0x7fa97d832e9c in __os_umalloc (/lib64/libdb-5.3.so+0x15fe9c)

SUMMARY: AddressSanitizer: 21 byte(s) leaked in 1 allocation(s).

Version-Release number of selected component (if applicable):
389-ds-base-1.4.1.3-7.module+el8.1.0+4150+5b8c2c1f.x86_64

How reproducible:
always

Steps to Reproduce:
1. Rebuild 389-ds-base with ASAN
2. Run the following tests that are using dbscan:
tests/suites/password/regression_test.py::test_unhashed_pw_switch
tests/suites/replication/encryption_cl5_test.py::test_algorithm_unhashed[AES]


Actual results:
ASAN reports memory leak

Expected results:
No memory leak in dbscan

Additional info:

Comment 3 sgouvern 2020-06-04 17:51:37 UTC
With build 389-ds-base-1.4.3.8-2.module+el8.3.0+6591+ebfc9766.x86_64 / 389-ds-base-1.4.3.8-2.1asan.el8.x86_64

Running tests/suites/replication/encryption_cl5_test.py::test_algorithm_unhashed[AES]

ASAN still reports memory leaks :

=================================================================
=================================================================
==285071==ERROR: LeakSanitizer: detected memory leaks

Direct leak of 513 byte(s) in 1 object(s) allocated from:
    #0 0x7fb7de319da0 in strdup (/lib64/libasan.so.5+0x3bda0)
    #1 0x7fb7dde4313d in slapi_ch_strdup (/usr/lib64/dirsrv/libslapd.so.0+0xdd13d)
    #2 0x7fb7cd3558bd in changelog5_extract_config ldap/servers/plugins/replication/cl5_config.c:754
    #3 0x7fb7cd356af6 in changelog5_config_modify ldap/servers/plugins/replication/cl5_config.c:292
    #4 0x7fb7dde628c9 in dse_call_callback ldap/servers/slapd/dse.c:2646
    #5 0x7fb7dde686a8 in dse_modify ldap/servers/slapd/dse.c:1864
    #6 0x7fb7ddee6973 in op_shared_modify ldap/servers/slapd/modify.c:1021
    #7 0x7fb7ddee8f58  (/usr/lib64/dirsrv/libslapd.so.0+0x182f58)
    #8 0x7fb7cddcbbc9 in _back_crypt_keymgmt_store_key ldap/servers/slapd/back-ldbm/ldbm_attrcrypt.c:1443
    #9 0x7fb7cddcbbc9 in _back_crypt_cipher_init ldap/servers/slapd/back-ldbm/ldbm_attrcrypt.c:1298
    #10 0x7fb7cddcbbc9 in back_crypt_init ldap/servers/slapd/back-ldbm/ldbm_attrcrypt.c:1094
    #11 0x7fb7cd358c2a in clcrypt_init ldap/servers/plugins/replication/cl_crypt.c:51
    #12 0x7fb7cd346ca8 in cl5Open ldap/servers/plugins/replication/cl5_api.c:446
    #13 0x7fb7cd35875e in changelog5_init ldap/servers/plugins/replication/cl5_init.c:50
    #14 0x7fb7cd3957c7 in multimaster_start ldap/servers/plugins/replication/repl5_init.c:801
    #15 0x7fb7cd3957c7 in multimaster_start ldap/servers/plugins/replication/repl5_init.c:757
    #16 0x7fb7ddf23993 in plugin_call_func ldap/servers/slapd/plugin.c:2030
    #17 0x7fb7ddf2a573 in plugin_call_one ldap/servers/slapd/plugin.c:1979
    #18 0x7fb7ddf2a573 in plugin_dependency_startall ldap/servers/slapd/plugin.c:1733
    #19 0x55b041ae99c0 in main (/usr/sbin/ns-slapd+0x309c0)
    #20 0x7fb7da7847b2 in __libc_start_main (/lib64/libc.so.6+0x237b2)

Direct leak of 513 byte(s) in 1 object(s) allocated from:
    #0 0x7fb7de319da0 in strdup (/lib64/libasan.so.5+0x3bda0)
    #1 0x7fb7dde4313d in slapi_ch_strdup (/usr/lib64/dirsrv/libslapd.so.0+0xdd13d)
    #2 0x7fb7cd357f85 in changelog5_config_modify ldap/servers/plugins/replication/cl5_config.c:391
    #3 0x7fb7dde628c9 in dse_call_callback ldap/servers/slapd/dse.c:2646
    #4 0x7fb7dde686a8 in dse_modify ldap/servers/slapd/dse.c:1864
    #5 0x7fb7ddee6973 in op_shared_modify ldap/servers/slapd/modify.c:1021
    #6 0x7fb7ddee8f58  (/usr/lib64/dirsrv/libslapd.so.0+0x182f58)
    #7 0x7fb7cddcbbc9 in _back_crypt_keymgmt_store_key ldap/servers/slapd/back-ldbm/ldbm_attrcrypt.c:1443
    #8 0x7fb7cddcbbc9 in _back_crypt_cipher_init ldap/servers/slapd/back-ldbm/ldbm_attrcrypt.c:1298
    #9 0x7fb7cddcbbc9 in back_crypt_init ldap/servers/slapd/back-ldbm/ldbm_attrcrypt.c:1094
    #10 0x7fb7cd358c2a in clcrypt_init ldap/servers/plugins/replication/cl_crypt.c:51
    #11 0x7fb7cd346ca8 in cl5Open ldap/servers/plugins/replication/cl5_api.c:446
    #12 0x7fb7cd35875e in changelog5_init ldap/servers/plugins/replication/cl5_init.c:50
    #13 0x7fb7cd3957c7 in multimaster_start ldap/servers/plugins/replication/repl5_init.c:801
    #14 0x7fb7cd3957c7 in multimaster_start ldap/servers/plugins/replication/repl5_init.c:757
    #15 0x7fb7ddf23993 in plugin_call_func ldap/servers/slapd/plugin.c:2030
    #16 0x7fb7ddf2a573 in plugin_call_one ldap/servers/slapd/plugin.c:1979
    #17 0x7fb7ddf2a573 in plugin_dependency_startall ldap/servers/slapd/plugin.c:1733
    #18 0x55b041ae99c0 in main (/usr/sbin/ns-slapd+0x309c0)
    #19 0x7fb7da7847b2 in __libc_start_main (/lib64/libc.so.6+0x237b2)
                                                                           
Direct leak of 16 byte(s) in 1 object(s) allocated from:
    #0 0x7fb7de3cddb0 in calloc (/lib64/libasan.so.5+0xefdb0)
    #1 0x7fb7dde43035 in slapi_ch_calloc (/usr/lib64/dirsrv/libslapd.so.0+0xdd035)
    #2 0x7fb7cddc5556 in _back_crypt_acs_list_add ldap/servers/slapd/back-ldbm/ldbm_attrcrypt.c:1479
    #3 0x7fb7cddcb22b in _back_crypt_acs_list_add ldap/servers/slapd/back-ldbm/ldbm_attrcrypt.c:1470
    #4 0x7fb7cddcb22b in back_crypt_init ldap/servers/slapd/back-ldbm/ldbm_attrcrypt.c:1105
    #5 0x7fb7cd358c2a in clcrypt_init ldap/servers/plugins/replication/cl_crypt.c:51
    #6 0x7fb7cd346ca8 in cl5Open ldap/servers/plugins/replication/cl5_api.c:446
    #7 0x7fb7cd35875e in changelog5_init ldap/servers/plugins/replication/cl5_init.c:50
    #8 0x7fb7cd3957c7 in multimaster_start ldap/servers/plugins/replication/repl5_init.c:801
    #9 0x7fb7cd3957c7 in multimaster_start ldap/servers/plugins/replication/repl5_init.c:757
    #10 0x7fb7ddf23993 in plugin_call_func ldap/servers/slapd/plugin.c:2030
    #11 0x7fb7ddf2a573 in plugin_call_one ldap/servers/slapd/plugin.c:1979
    #12 0x7fb7ddf2a573 in plugin_dependency_startall ldap/servers/slapd/plugin.c:1733
    #13 0x55b041ae99c0 in main (/usr/sbin/ns-slapd+0x309c0)
    #14 0x7fb7da7847b2 in __libc_start_main (/lib64/libc.so.6+0x237b2)

Direct leak of 4 byte(s) in 1 object(s) allocated from:
    #0 0x7fb7de319da0 in strdup (/lib64/libasan.so.5+0x3bda0)
    #1 0x7fb7dde4313d in slapi_ch_strdup (/usr/lib64/dirsrv/libslapd.so.0+0xdd13d)
    #2 0x7fb7cd355881 in changelog5_extract_config ldap/servers/plugins/replication/cl5_config.c:745
    #3 0x7fb7cd355f60 in changelog5_read_config ldap/servers/plugins/replication/cl5_config.c:111
    #4 0x7fb7cd358728 in changelog5_init ldap/servers/plugins/replication/cl5_init.c:39
    #5 0x7fb7cd3957c7 in multimaster_start ldap/servers/plugins/replication/repl5_init.c:801
    #6 0x7fb7cd3957c7 in multimaster_start ldap/servers/plugins/replication/repl5_init.c:757
    #7 0x7fb7ddf23993 in plugin_call_func ldap/servers/slapd/plugin.c:2030
    #8 0x7fb7ddf2a573 in plugin_call_one ldap/servers/slapd/plugin.c:1979
    #9 0x7fb7ddf2a573 in plugin_dependency_startall ldap/servers/slapd/plugin.c:1733
    #10 0x55b041ae99c0 in main (/usr/sbin/ns-slapd+0x309c0)
    #11 0x7fb7da7847b2 in __libc_start_main (/lib64/libc.so.6+0x237b2)

Direct leak of 4 byte(s) in 1 object(s) allocated from:
    #0 0x7fb7de319da0 in strdup (/lib64/libasan.so.5+0x3bda0)
    #1 0x7fb7dde4313d in slapi_ch_strdup (/usr/lib64/dirsrv/libslapd.so.0+0xdd13d)
    #2 0x7fb7cd355881 in changelog5_extract_config ldap/servers/plugins/replication/cl5_config.c:745
    #3 0x7fb7cd356af6 in changelog5_config_modify ldap/servers/plugins/replication/cl5_config.c:292
    #4 0x7fb7dde628c9 in dse_call_callback ldap/servers/slapd/dse.c:2646
    #5 0x7fb7dde686a8 in dse_modify ldap/servers/slapd/dse.c:1864
    #6 0x7fb7ddee6973 in op_shared_modify ldap/servers/slapd/modify.c:1021
    #7 0x7fb7ddee8f58  (/usr/lib64/dirsrv/libslapd.so.0+0x182f58)
    #8 0x7fb7cddcbbc9 in _back_crypt_keymgmt_store_key ldap/servers/slapd/back-ldbm/ldbm_attrcrypt.c:1443
    #9 0x7fb7cddcbbc9 in _back_crypt_cipher_init ldap/servers/slapd/back-ldbm/ldbm_attrcrypt.c:1298
    #10 0x7fb7cddcbbc9 in back_crypt_init ldap/servers/slapd/back-ldbm/ldbm_attrcrypt.c:1094
    #11 0x7fb7cd358c2a in clcrypt_init ldap/servers/plugins/replication/cl_crypt.c:51
    #12 0x7fb7cd346ca8 in cl5Open ldap/servers/plugins/replication/cl5_api.c:446
    #13 0x7fb7cd35875e in changelog5_init ldap/servers/plugins/replication/cl5_init.c:50
    #14 0x7fb7cd3957c7 in multimaster_start ldap/servers/plugins/replication/repl5_init.c:801
    #15 0x7fb7cd3957c7 in multimaster_start ldap/servers/plugins/replication/repl5_init.c:757
    #16 0x7fb7ddf23993 in plugin_call_func ldap/servers/slapd/plugin.c:2030
    #17 0x7fb7ddf2a573 in plugin_call_one ldap/servers/slapd/plugin.c:1979
    #18 0x7fb7ddf2a573 in plugin_dependency_startall ldap/servers/slapd/plugin.c:1733
    #19 0x55b041ae99c0 in main (/usr/sbin/ns-slapd+0x309c0)
    #20 0x7fb7da7847b2 in __libc_start_main (/lib64/libc.so.6+0x237b2)

Indirect leak of 168 byte(s) in 1 object(s) allocated from:
    #0 0x7fb7de3cddb0 in calloc (/lib64/libasan.so.5+0xefdb0)
    #1 0x7fb7db728470 in PR_NewLock ../../.././nspr/pr/src/pthreads/ptsynch.c:136
    #2 0x7fb7cd358c2a in clcrypt_init ldap/servers/plugins/replication/cl_crypt.c:51
    #3 0x7fb7cd346ca8 in cl5Open ldap/servers/plugins/replication/cl5_api.c:446
    #4 0x7fb7cd35875e in changelog5_init ldap/servers/plugins/replication/cl5_init.c:50
    #5 0x7fb7cd3957c7 in multimaster_start ldap/servers/plugins/replication/repl5_init.c:801
    #6 0x7fb7cd3957c7 in multimaster_start ldap/servers/plugins/replication/repl5_init.c:757
    #7 0x7fb7ddf23993 in plugin_call_func ldap/servers/slapd/plugin.c:2030
    #8 0x7fb7ddf2a573 in plugin_call_one ldap/servers/slapd/plugin.c:1979
    #9 0x7fb7ddf2a573 in plugin_dependency_startall ldap/servers/slapd/plugin.c:1733
    #10 0x55b041ae99c0 in main (/usr/sbin/ns-slapd+0x309c0)
    #11 0x7fb7da7847b2 in __libc_start_main (/lib64/libc.so.6+0x237b2)

Indirect leak of 128 byte(s) in 1 object(s) allocated from:
    #0 0x7fb7de3cdba8 in __interceptor_malloc (/lib64/libasan.so.5+0xefba8)
    #1 0x7fb7dbd64e61 in PORT_Alloc_Util (/lib64/libnssutil3.so+0x17e61)

Indirect leak of 40 byte(s) in 1 object(s) allocated from:
    #0 0x7fb7de3cddb0 in calloc (/lib64/libasan.so.5+0xefdb0)
    #1 0x7fb7dde43035 in slapi_ch_calloc (/usr/lib64/dirsrv/libslapd.so.0+0xdd035)
    #2 0x7fb7cddcaf8f in back_crypt_init ldap/servers/slapd/back-ldbm/ldbm_attrcrypt.c:1092
    #3 0x7fb7cd358c2a in clcrypt_init ldap/servers/plugins/replication/cl_crypt.c:51
    #4 0x7fb7cd346ca8 in cl5Open ldap/servers/plugins/replication/cl5_api.c:446
    #5 0x7fb7cd35875e in changelog5_init ldap/servers/plugins/replication/cl5_init.c:50
    #6 0x7fb7cd3957c7 in multimaster_start ldap/servers/plugins/replication/repl5_init.c:801
    #7 0x7fb7cd3957c7 in multimaster_start ldap/servers/plugins/replication/repl5_init.c:757
    #8 0x7fb7ddf23993 in plugin_call_func ldap/servers/slapd/plugin.c:2030
    #9 0x7fb7ddf2a573 in plugin_call_one ldap/servers/slapd/plugin.c:1979
    #10 0x7fb7ddf2a573 in plugin_dependency_startall ldap/servers/slapd/plugin.c:1733
    #11 0x55b041ae99c0 in main (/usr/sbin/ns-slapd+0x309c0)
    #12 0x7fb7da7847b2 in __libc_start_main (/lib64/libc.so.6+0x237b2)

SUMMARY: AddressSanitizer: 1386 byte(s) leaked in 8 allocation(s).


-> Reassigning and marking Failed QA

Comment 4 Viktor Ashirov 2020-06-04 19:50:29 UTC
These leaks are tracked in https://bugzilla.redhat.com/show_bug.cgi?id=1842959
Sylvie, do you see leaks reported in dbscan binary, not ns-slapd?

Comment 5 sgouvern 2020-06-05 08:29:41 UTC
No, you're right, reported leaks are actually in ns-slapd, not in dbscan.
As these leaks are tracked in https://bugzilla.redhat.com/show_bug.cgi?id=1842959, marking this bug as Verified


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