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.

Bug 2021499

Summary: Make backtrace less "chatty" (avoid duplicate backtraces) [rhel-8.5.0.z]
Product: Red Hat Enterprise Linux 8 Reporter: RHEL Program Management Team <pgm-rhel-tools>
Component: sssdAssignee: Alexey Tikhonov <atikhono>
Status: CLOSED ERRATA QA Contact: Steeve Goveas <sgoveas>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 8.5CC: aboscatt, dcamilof, grajaiya, jhrozek, lslebodn, mzidek, pbrezina, sgoveas, swachira, tscherf
Target Milestone: rcKeywords: Triaged, ZStream
Target Release: ---Flags: pm-rhel: mirror+
Hardware: Unspecified   
OS: Linux   
Whiteboard: sync-to-jira
Fixed In Version: sssd-2.5.2-2.el8_5.2 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 2021196 Environment:
Last Closed: 2021-12-21 09:43:16 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: 2021196    
Bug Blocks:    

Comment 1 Alexey Tikhonov 2021-11-09 14:34:12 UTC
Pushed PR: https://github.com/SSSD/sssd/pull/5862

* `master`
    * bb8da4303851642318b626aad507ab7c39f6a80d - DEBUG: avoid backtrace dups.

Comment 6 Alexey Tikhonov 2021-11-29 11:58:21 UTC
(In reply to Alexey Tikhonov from comment #1)
> Pushed PR: https://github.com/SSSD/sssd/pull/5862
> 
> * `master`
>     * bb8da4303851642318b626aad507ab7c39f6a80d - DEBUG: avoid backtrace dups.

https://github.com/SSSD/sssd/commit/01ff8155baea989c42664985ea939cb93beb31e7 is also related.

Comment 7 Alexey Tikhonov 2021-12-01 12:20:13 UTC
*** Bug 2025682 has been marked as a duplicate of this bug. ***

Comment 11 Steeve Goveas 2021-12-08 09:49:39 UTC
[root@ci-vm-10-0-102-172 ~]# rpm -q sssd
sssd-2.5.2-2.el8_5.1.x86_64

=================================== FAILURES ===================================
___________________ TestPoorManBacktrace.test_0001_bz2021196 ___________________

self = <test_poorman_backtrace.TestPoorManBacktrace object at 0x7f05301dc8e0>
multihost = <pytest_multihost.plugin.MultihostFixture object at 0x7f05301dcdc0>
backupsssdconf = None

    def test_0001_bz2021196(self, multihost, backupsssdconf):
        """
        :title: avoid duplicate backtraces
        :id: d4d8a0a0-ab90-4c8f-8087-95dc7ad3f3ae
        :bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2021196
        """
        hostname = multihost.master[0].sys_hostname
        bad_ldap_uri = "ldaps://typo.%s" % hostname
        tools = sssdTools(multihost.client[0])
        domain_params = {'ldap_uri': bad_ldap_uri}
        tools.sssd_conf('domain/%s' % ds_instance_name, domain_params)
        tools.clear_sssd_cache()
        logfile = '/var/log/sssd/sssd_nss.log'
        cmd = f'getent passwd fakeuser@{ds_instance_name}'
        multihost.client[0].run_command(cmd, raiseonerr=False)
        msg = 'BACKTRACE DUMP ENDS HERE'
        msg2 = '... skipping repetitive backtrace ...'
        pattern = re.compile(fr'{msg}')
        pattern2 = re.compile(fr'{msg2}')
        log_str1 = multihost.client[0].get_file_contents(logfile).decode('utf-8')
        multihost.client[0].run_command(f'> {logfile}')
        multihost.client[0].run_command(cmd, raiseonerr=False)
        time.sleep(2)
        log_str2 = multihost.client[0].get_file_contents(logfile).decode('utf-8')
        assert pattern.search(log_str1) and not pattern2.search(log_str1)
>       assert pattern2.search(log_str2) and not pattern.search(log_str2)
E       AssertionError: assert (None)
E        +  where None = <built-in method search of re.Pattern object at 0x7f05301c4cb0>('(2021-12-08  3:15:30): [nss] [cache_req_common_process_dp_reply] (0x0040): CR #1: Could not get account info [1432158...o [1432158212]: SSSD is offline\n********************** BACKTRACE DUMP ENDS HERE *********************************\n\n')
E        +    where <built-in method search of re.Pattern object at 0x7f05301c4cb0> = re.compile('... skipping repetitive backtrace ...').search

backupsssdconf = None
bad_ldap_uri = 'ldaps://typo.ci-vm-10-0-102-80.hosted.upshift.rdu2.redhat.com'
cmd        = 'getent passwd fakeuser@example1'
domain_params = {'ldap_uri': 'ldaps://typo.ci-vm-10-0-102-80.hosted.upshift.rdu2.redhat.com'}
hostname   = 'ci-vm-10-0-102-80.hosted.upshift.rdu2.redhat.com'
log_str1   = '(2021-12-08  3:15:07): [nss] [server_setup] (0x1f7c0): Starting with debug level = 0x0070\n(2021-12-08  3:15:28): [ns...o [1432158212]: SSSD is offline\n********************** BACKTRACE DUMP ENDS HERE *********************************\n\n'
log_str2   = '(2021-12-08  3:15:30): [nss] [cache_req_common_process_dp_reply] (0x0040): CR #1: Could not get account info [1432158...o [1432158212]: SSSD is offline\n********************** BACKTRACE DUMP ENDS HERE *********************************\n\n'
logfile    = '/var/log/sssd/sssd_nss.log'
msg        = 'BACKTRACE DUMP ENDS HERE'
msg2       = '... skipping repetitive backtrace ...'
multihost  = <pytest_multihost.plugin.MultihostFixture object at 0x7f05301dcdc0>
pattern    = re.compile('BACKTRACE DUMP ENDS HERE')
pattern2   = re.compile('... skipping repetitive backtrace ...')
self       = <test_poorman_backtrace.TestPoorManBacktrace object at 0x7f05301dc8e0>
tools      = <sssd.testlib.common.utils.sssdTools object at 0x7f05301cdc70>

src/tests/multihost/alltests/test_poorman_backtrace.py:49: AssertionError


Verified with
[root@ci-vm-10-0-102-172 ~]# rpm -q sssd
sssd-2.5.2-2.el8_5.2.x86_64


============================= test session starts ==============================
platform linux -- Python 3.9.7, pytest-3.10.1, py-1.11.0, pluggy-1.0.0 -- /usr/bin/python3
cachedir: .pytest_cache
metadata: {'Python': '3.9.7', 'Platform': 'Linux-4.18.0-305.25.1.el8_4.x86_64-x86_64-with-glibc2.33', 'Packages': {'pytest': '3.10.1', 'py': '1.11.0', 'pluggy': '1.0.0'}, 'Plugins': {'html': '1.22.1', 'metadata': '1.11.0', 'multihost': '3.4'}}
rootdir: /root/sssd/src/tests/multihost/alltests, inifile: pytest.ini
plugins: html-1.22.1, metadata-1.11.0, multihost-3.4
collecting ... collected 176 items / 175 deselected

src/tests/multihost/alltests/test_poorman_backtrace.py::TestPoorManBacktrace::test_0001_bz2021196 PASSED [100%]

--------------- generated xml file: /root/backtrace85/junit.xml ----------------
---------- generated html file: file:///root/backtrace85/report.html -----------
=============================== warnings summary ===============================

Comment 15 errata-xmlrpc 2021-12-21 09:43:16 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 (sssd 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:5228