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 1967906 - Dirsrv memory leak
Summary: Dirsrv memory leak
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: slapi-nis
Version: 8.4
Hardware: x86_64
OS: Linux
high
high
Target Milestone: rc
: ---
Assignee: Alexander Bokovoy
QA Contact: ipa-qe
URL:
Whiteboard:
: 1990192 (view as bug list)
Depends On:
Blocks: 2000919 2003607
TreeView+ depends on / blocked
 
Reported: 2021-06-04 11:07 UTC by Aleksandr Sharov
Modified: 2024-12-20 20:11 UTC (History)
12 users (show)

Fixed In Version: slapi-nis-0.56.6-4.el8
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 2000919 2003607 (view as bug list)
Environment:
Last Closed: 2021-11-09 18:29:22 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
lg_prof_sample:0 test (6.63 MB, application/gzip)
2021-06-04 11:07 UTC, Aleksandr Sharov
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Fedora Pagure slapi-nis pull-request 43 0 None None None 2021-08-10 11:03:58 UTC
Red Hat Issue Tracker FREEIPA-6887 0 None None None 2021-09-23 09:38:19 UTC
Red Hat Product Errata RHBA-2021:4230 0 None None None 2021-11-09 18:29:43 UTC

Description Aleksandr Sharov 2021-06-04 11:07:43 UTC
Created attachment 1788961 [details]
lg_prof_sample:0 test

Description of problem:
FreIPA nsslapd eats a lot of memory, forcing client to restart services in a weeks time

Version-Release number of selected component (if applicable):
389-ds-base-1.4.3.16-13.module+el8.4.0+10307+74bbfb4e.x86_64 Thu May 27 10:25:43 2021
389-ds-base-debuginfo-1.4.3.16-13.module+el8.4.0+10307+74bbfb4e.x86_64 Fri May 28 12:47:49 2021
389-ds-base-debugsource-1.4.3.16-13.module+el8.4.0+10307+74bbfb4e.x86_64 Fri May 28 12:47:49 2021
389-ds-base-libs-1.4.3.16-13.module+el8.4.0+10307+74bbfb4e.x86_64 Thu May 27 10:25:40 2021
python3-lib389-1.4.3.16-13.module+el8.4.0+10307+74bbfb4e.noarch Thu May 27 10:25:42 2021


How reproducible:
?

Actual results:
jemalloc used by client for testing shows significant leak:

May 28 22:33:18 cobalion2.hpc.ugent.be systemd[1]: Started 389 Directory Server HPC-UGENT-BE..
May 28 22:35:48 cobalion2.hpc.ugent.be systemd[1]: Stopping 389 Directory Server HPC-UGENT-BE....
May 28 22:35:48 cobalion2.hpc.ugent.be ns-slapd[1230648]: [28/May/2021:22:35:48.606188947 +0200] - INFO - op_thread_cleanup - slapd shutting down - signaling operation >
May 28 22:35:48 cobalion2.hpc.ugent.be ns-slapd[1230648]: [28/May/2021:22:35:48.664904122 +0200] - INFO - slapd_daemon - slapd shutting down - closing down internal sub>
May 28 22:37:37 cobalion2.hpc.ugent.be ns-slapd[1230648]: [28/May/2021:22:37:37.544145832 +0200] - INFO - bdb_pre_close - Waiting for 4 database threads to stop
May 28 22:37:38 cobalion2.hpc.ugent.be ns-slapd[1230648]: [28/May/2021:22:37:38.465322383 +0200] - INFO - bdb_pre_close - All database threads now stopped
May 28 22:40:30 cobalion2.hpc.ugent.be ns-slapd[1230648]: [28/May/2021:22:40:30.640184021 +0200] - INFO - ldbm_back_instance_set_destructor - Set of instances destroyed
May 28 22:40:32 cobalion2.hpc.ugent.be ns-slapd[1230648]: [28/May/2021:22:40:32.759587645 +0200] - INFO - connection_post_shutdown_cleanup - slapd shutting down - freed>
May 28 22:40:32 cobalion2.hpc.ugent.be ns-slapd[1230648]: [28/May/2021:22:40:32.762560402 +0200] - INFO - main - slapd stopped.
May 28 22:40:34 cobalion2.hpc.ugent.be ns-slapd[1230648]: <jemalloc>: Leak approximation summary: ~5303264 bytes, ~43932 objects, >= 2082 contexts
May 28 22:40:34 cobalion2.hpc.ugent.be ns-slapd[1230648]: <jemalloc>: Run jeprof on "jeprof.1230648.0.f.heap" for leak detail
May 28 22:40:34 cobalion2.hpc.ugent.be systemd[1]: dirsrv: Succeeded.
May 28 22:40:34 cobalion2.hpc.ugent.be systemd[1]: Stopped 389 Directory Server HPC-UGENT-BE..

Expected results:
no memory leak

Additional info:
lg_prof_sample:0 test attached with replication logging enabled

client contacted with Victor Ashirov upstream as well

Comment 9 Marc Sauton 2021-08-21 12:18:08 UTC
*** Bug 1990192 has been marked as a duplicate of this bug. ***

Comment 30 anuja 2021-09-23 10:37:03 UTC
Verified using nightly compose:
http://download.devel.redhat.com/rhel-8/nightly/RHEL-8/latest-RHEL-8.5/compose/

[root@master ~]# hostname
master.ipa85.test
[root@master ~]# setenforce 0
[root@master ~]# echo Secret123 | kinit admin
Password for admin: 
[root@master ~]# tail /usr/lib/systemd/system/dirsrv@.service.d/custom.conf

# Preload jemalloc
Environment=LD_PRELOAD=/usr/lib64/dirsrv/lib/libjemalloc.so.2
TimeoutStartSec=3600
TimeoutStopSec=3600
Environment=
ExecStartPre=
Environment=LD_PRELOAD=/usr/lib64/libasan.so.5
Environment=ASAN_OPTIONS=log_path=/run/dirsrv/ns-slapd-%i.asan:print_stacktrace=1:detect_leaks=1:exit_code=0:fast_unwind_on_malloc=0

[root@master ~]# grep backend_search_cb /run/dirsrv/ns-slapd*asan*
grep: /run/dirsrv/ns-slapd*asan*: No such file or directory
[root@master ~]# ls /run/dirsrv/ns-slapd
ls: cannot access '/run/dirsrv/ns-slapd': No such file or directory
[root@master ~]# setenforce 0
[root@master ~]# systemctl start dirsrv@IPA85-TEST
[root@master ~]# ldapsearch -LLL -b cn=config '(objectClass=*)'
SASL/GSSAPI authentication started
SASL username: admin
SASL SSF: 256
SASL data security layer installed.
dn: cn=tasks,cn=config
...
...

dn: cn=uniquemember,cn=default indexes,cn=config,cn=ldbm database,cn=plugins,c
 n=config
cn: uniquemember
objectClass: top
objectClass: nsIndex

[root@master ~]# systemctl stop dirsrv@IPA85-TEST

[root@master ~]# ls /run/dirsrv/ns-slapd-IPA85-TEST.asan.28*
/run/dirsrv/ns-slapd-IPA85-TEST.asan.28274  /run/dirsrv/ns-slapd-IPA85-TEST.asan.28442
[root@master ~]# grep -rnw "backend_search_cb" /run/dirsrv/ns-slapd*
[root@master ~]# echo $?
1
[root@master ~]# date
Thu Sep 23 06:28:01 EDT 2021
[root@master ~]# 
[root@master ~]# rpm -qa ipa-server slapi-nis
slapi-nis-0.56.6-4.module+el8.5.0+12583+bf7ffcf6.x86_64
ipa-server-4.9.6-6.module+el8.5.0+12660+88e16a2c.x86_64
[root@master ~]# 

No backend search requested in logs.
Based on this marking bug as verified.

Comment 32 errata-xmlrpc 2021-11-09 18:29: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 (ipa 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:4230


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