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 1803134 - Improve "unlock" time when user session already active
Summary: Improve "unlock" time when user session already active
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: sssd
Version: 8.1
Hardware: Unspecified
OS: Linux
unspecified
high
Target Milestone: rc
: 8.0
Assignee: Sumit Bose
QA Contact: sssd-qe
URL:
Whiteboard: sync-to-jira
: 1795127 (view as bug list)
Depends On:
Blocks: 1842946
TreeView+ depends on / blocked
 
Reported: 2020-02-14 14:44 UTC by hgraham
Modified: 2020-11-04 02:08 UTC (History)
15 users (show)

Fixed In Version: sssd-2.3.0-4.el8
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-11-04 02:04:37 UTC
Type: Bug
Target Upstream Version:
Embargoed:
pm-rhel: mirror+


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github SSSD sssd issues 5062 0 None closed initgroups for already logged in users should not cause long delays 2021-02-11 19:19:24 UTC
Red Hat Product Errata RHBA-2020:4569 0 None None None 2020-11-04 02:05:06 UTC

Description hgraham 2020-02-14 14:44:11 UTC
Description of problem:
Upstream bug: https://pagure.io/SSSD/sssd/pull-request/4104


Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1. 
2. 
3.

Actual results:


Expected results:


Additional info:

Comment 2 Martin Kosek 2020-02-14 15:07:25 UTC
Henry (or Sumit), when following up on this bug, please fill also Description of the Problem, Severity and Reproduction scenario. This is needed for following reviews, testing, documentation, etc.

Comment 3 hgraham 2020-02-14 15:37:33 UTC
Description of problem:

Because of the initgroups call performed by sssd, users that have an active session on a system are seeing subsequent logins taking 10-20seconds. This affects usability and is hindering our roll out of IPA to CSB.


Steps to Reproduce:
1. Set up a CSB RHEL8 server
2. Join to RHIT's IPA environment

Actual results:
unlocking a machine with an already active user session takes 10-20seconds


Expected results:
Subsequent unlocking only takes a few seconds


Additional info:
Upstream with patches that help in 8.0 but not 8.1
https://pagure.io/SSSD/sssd/pull-request/4104

Comment 4 hgraham 2020-05-05 17:05:37 UTC
Is there anything else needed from me for this?

Comment 5 Sumit Bose 2020-05-19 16:07:27 UTC
master:
  - 272efe4 - pam: make sure initgr cache is not created twice
  - 74f0a45 - cache_req: no refresh with CACHE_REQ_BYPASS_PROVIDER
  - 68aa68e - pam: use pam_initgroups_scheme
  - b66f0e4 - pam: add option pam_initgroups_scheme
  - d2424bf - pam: Use cache for users with existing session
  - b572871 - cache_req: introduce cache_behavior enumeration

Comment 6 Sumit Bose 2020-06-09 05:23:45 UTC
Upstream ticket:
https://github.com/SSSD/sssd/issues/5062

Comment 12 Pavel Březina 2020-07-02 08:16:27 UTC
Pushed PR: https://github.com/SSSD/sssd/pull/5222

* `master`
    * 100839b64390d7010bfa28552fd9381ef4366496 - PAM: do not treat error for cache-only lookups as fatal

Comment 20 Simo Sorce 2020-09-18 18:40:25 UTC
I just use brew download-build to get sssd-2.3.0-9.el8 9and all its dependencies)

I see no appreciable difference in behavior after the update.

I ran a sudo -i command and it took it 10 seconds to give me a password prompt, then it took another 10 second to complete authentication.
This is consistent with a previous report that my original patchset stopped working sometimes between around 8.1+ as some other code is now forcing a synchronous LDAP call in the code path.

The way to test this is the following:

configure SSSD against an IPA server.
- log in a user.
- cause the connection to the server to fail (restart ldap on the server for example).
- try to use sudo or other call that causes authentication.
- *verify* that no attempt to make LDAP calls happen until after the password prompt is shown

HTH
(IMO this is a FailQA situation)

Comment 21 Sumit Bose 2020-09-18 18:59:46 UTC
Henry, for which platform do you want a build?

Simo, can you attach your current logs?

bye,
Sumit

Comment 32 Simo Sorce 2020-09-23 15:46:54 UTC
Hi Sumit,
that is exactly the issue.

I searched the timestmaps db and it was empty except for the basic skeleton tree entries.

After adding the entry and refreshing the user now sudo access is very quick, sub-second delays.
The same also for GDM logins, no more delays to unlock the screen.

Thanks a lot, seem that fixing that bug is quite important for a decent experience.

My hypothesys is that a database migration over an upgrade failed to port/create proper timestamps. The code should be fixed to cretae a timestamp on update if an entry does not exist I guess.

In any case, thanks a lot for diagnosing this.
It means the unlock patches work as expected now and all is good from my side!!

Comment 35 Sumit Bose 2020-09-24 11:15:17 UTC
(In reply to Simo Sorce from comment #32)
> Hi Sumit,
> that is exactly the issue.
> 
> I searched the timestmaps db and it was empty except for the basic skeleton
> tree entries.
> 
> After adding the entry and refreshing the user now sudo access is very
> quick, sub-second delays.
> The same also for GDM logins, no more delays to unlock the screen.

Great, so this explains as well, why I didn't see such strong delays and unexpected initgroup requests in my test.

> 
> Thanks a lot, seem that fixing that bug is quite important for a decent
> experience.
> 
> My hypothesys is that a database migration over an upgrade failed to
> port/create proper timestamps. The code should be fixed to cretae a
> timestamp on update if an entry does not exist I guess.

Yes.

> 
> In any case, thanks a lot for diagnosing this.
> It means the unlock patches work as expected now and all is good from my
> side!!

yw, thanks for your patience.

bye,
Sumit

Comment 43 Sumit Bose 2020-10-22 09:49:45 UTC
*** Bug 1795127 has been marked as a duplicate of this bug. ***

Comment 45 errata-xmlrpc 2020-11-04 02:04:37 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-2020:4569


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