Bug 2116389

Summary: rpc.gssd crash when access a same file on krb5 nfs mount with multiple uids simultaneously since sssd-2.7.3-2.el9
Product: Red Hat Enterprise Linux 9 Reporter: Yongcheng Yang <yoyang>
Component: sssdAssignee: Alexey Tikhonov <atikhono>
Status: CLOSED ERRATA QA Contact: Yongcheng Yang <yoyang>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 9.1CC: atikhono, fsorenso, fweimer, mprivozn, pbrezina, sipoyare, steved, xzhou
Target Milestone: rcKeywords: Regression, Reproducer, Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: sync-to-jira
Fixed In Version: sssd-2.7.3-3.el9 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 2116395 (view as bug list) Environment:
Last Closed: 2022-11-15 11:17:44 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:
Deadline: 2022-08-22   

Description Yongcheng Yang 2022-08-08 13:00:13 UTC
Description of problem:
The NFS kerberos regression testcase of Bug 1419280 starts to fail since sssd-2.7.3-1.el9.
The test scenario is just 
1) set up nfs mount with sec=krb5 (any flavor)
2) access a file or directory on the mount with multiple uids simultaneously

And we can use the scripts provided by Frank Sorenson:
https://bugzilla.redhat.com/show_bug.cgi?id=1419280#c1
https://bugzilla.redhat.com/show_bug.cgi?id=1419280#c2


Version-Release number of selected component (if applicable):
since sssd-2.7.3-1.el9 (maybe the nfs/idmap related packages from http://download.eng.bos.redhat.com/brewroot/packages/sssd/2.7.3/1.el9/x86_64/)

start fail  sssd-2.7.3-1.el9 - https://beaker.engineering.redhat.com/jobs/6893573
latest pass sssd-2.7.1-2.el9 - https://beaker.engineering.redhat.com/jobs/6894865


How reproducible:
reliable


Actual results:
process get hang:
[21:56:14 root@ ~~]# ps -ef |egrep -v '(grep|gcc)' |grep stat_as
9996       23203       1  0 21:56 ?        00:00:00 ./stat_as /mnt/nfsmp-bz1419280/testfile 9995 10005
9997       23204       1  0 21:56 ?        00:00:00 ./stat_as /mnt/nfsmp-bz1419280/testfile 9995 10005
10000      23207       1  0 21:56 ?        00:00:00 ./stat_as /mnt/nfsmp-bz1419280/testfile 9995 10005
10001      23208       1  0 21:56 ?        00:00:00 ./stat_as /mnt/nfsmp-bz1419280/testfile 9995 10005
10002      23209       1  0 21:56 ?        00:00:00 ./stat_as /mnt/nfsmp-bz1419280/testfile 9995 10005
10004      23211       1  0 21:56 ?        00:00:00 ./stat_as /mnt/nfsmp-bz1419280/testfile 9995 10005

Expected results:
process exist cleanly


Additional info:
This regression also happens in rhel8 sssd-2.7.3-1.el8 but behavior is a bit different.
I'm not sure if this is sssd issue but as the package sssd version matters please help check what update/change is culprit.

Comment 1 Alexey Tikhonov 2022-08-08 13:14:14 UTC
Most probably duplicate of bz 2109451

Comment 2 Yongcheng Yang 2022-08-08 13:21:39 UTC
(In reply to Alexey Tikhonov from comment #1)
> Most probably duplicate of bz 2109451

Thanks for the information!

I'm glad to check the fixed build when available to confirm that.

Comment 38 Alexey Tikhonov 2022-08-17 10:20:57 UTC
Upstream PR: https://github.com/SSSD/sssd/pull/6305

Comment 42 Alexey Tikhonov 2022-08-19 15:37:24 UTC
Pushed PR: https://github.com/SSSD/sssd/pull/6305

* `master`
    * 4ac93d9c5df59cdb7f397b4467f1c1c4822ff757 - CLIENT:MC: pointer to the context mutex shouldn't be touched
    * 579cc0b266d5f8954bc71cfcd3fe68002d681a5f - CLIENT:MC: -1 is more appropriate initial value for fd
* `sssd-2-7`
    * d386e94ef49d95d7305a3e6578e41a2cf61dfc5c - CLIENT:MC: pointer to the context mutex shouldn't be touched
    * 0eae0862069e4bbbdd87b809193fc873f3003cff - CLIENT:MC: -1 is more appropriate initial value for fd

Comment 52 errata-xmlrpc 2022-11-15 11:17:44 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:8325