Bug 2098620

Summary: sdap_nested_group_deref_direct_process() triggers internal watchdog for large data sets
Product: Red Hat Enterprise Linux 8 Reporter: Alexey Tikhonov <atikhono>
Component: sssdAssignee: Alexey Tikhonov <atikhono>
Status: CLOSED ERRATA QA Contact: Anuj Borah <aborah>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 8.6CC: grajaiya, jhrozek, lslebodn, mzidek, pbrezina, sgadekar, tscherf
Target Milestone: rcKeywords: Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: sync-to-jira
Fixed In Version: sssd-2.7.2-1.el8 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-11-08 10:51:32 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Alexey Tikhonov 2022-06-20 08:15:45 UTC
This bug was initially created as a copy of Bug #1893192

I am copying this bug because: to track fix for RHEL8



Example:

```
09:58:11 2020) [sssd[be[*****]] [sdap_nested_group_deref_direct_process] (0x2000): Received 59874 dereference results, about to process them
09:58:11 2020) [sssd[be[*****]] [sdap_nested_group_hash_insert] (0x4000): Inserting [CN=***,...] into hash table [users]
...
09:58:45 2020) [sssd[be[*****]] [sdap_nested_group_hash_insert] (0x4000): Inserting [CN=***,...] into hash table [users]
09:58:45 2020) [sssd[be[*****]] [orderly_shutdown] (0x0010): SIGTERM: killing children
```
-- execution of sdap_nested_group_deref_direct_process() for 59874 entries took 34 seconds

This is unjustifiably long, taking into account this function only rearrange data in RAM.

This is often [partial] reason for internal watchdog to terminate sssd_be.

Comment 1 Alexey Tikhonov 2022-06-20 08:39:42 UTC
Pushed PR: https://github.com/SSSD/sssd/pull/6132

* `master`
    * a90ef949e51a4177afcb3128e11867ae7b70f439 - SDAP: sdap_nested_group_deref_direct_process(): store 'state->members' in a hash table to reduce computational complexity during "new member" check.
* `sssd-2-7`
    * 64b3871596be2e566524b3e897b88e65ded4a2f7 - SDAP: sdap_nested_group_deref_direct_process(): store 'state->members' in a hash table to reduce computational complexity during "new member" check.

Comment 8 errata-xmlrpc 2022-11-08 10:51:32 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-2022:7739