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 2116488

Summary: virsh command will hang after the host run several auto test cases
Product: Red Hat Enterprise Linux 8 Reporter: Alexey Tikhonov <atikhono>
Component: sssdAssignee: Alexey Tikhonov <atikhono>
Status: CLOSED ERRATA QA Contact: shridhar <sgadekar>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 8.7CC: aboscatt, pbrezina, sgadekar, yalzhang
Target Milestone: rcKeywords: Triaged
Target Release: ---Flags: pm-rhel: mirror+
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: sync-to-jira
Fixed In Version: sssd-2.7.3-2.el8 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-11-08 10:51:34 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-08-08 15:38:31 UTC
This bug was initially created as a copy of Bug #2109451

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



Description of problem:
virsh command will hang after the host run several auto cases

Version-Release number of selected component (if applicable):
libvirt-8.5.0-2.el9.x86_64
qemu-kvm-7.0.0-9.el9.x86_64
kernel-5.14.0-130.el9.x86_64

How reproducible:
don't know, but very high

Steps to Reproduce:
1. Many systems running auto tests encountered the problem that the test timeout and virsh command hang forever. # virsh list 
^C
# virsh -c network:///system 
Welcome to virsh, the virtualization interactive terminal.
Type:  'help' for help with commands
       'quit' to quit

virsh # 

# systemctl status virtqemud
● virtqemud.service - Virtualization qemu daemon
     Loaded: loaded (/usr/lib/systemd/system/virtqemud.service; enabled; vendor preset: enabled)
     Active: active (running) since Wed 2022-07-20 22:08:24 EDT; 7h ago
TriggeredBy: ● virtqemud-admin.socket
             ● virtqemud-ro.socket
             ● virtqemud.socket
       Docs: man:virtqemud(8)
             https://libvirt.org
   Main PID: 169327 (virtqemud)
      Tasks: 18 (limit: 32768)
     Memory: 12.8M
        CPU: 156ms
     CGroup: /system.slice/virtqemud.service
             └─169327 /usr/sbin/virtqemud --timeout 120

The qemu's stack:Thread 1 (Thread 0x7fb74e341ac0 (LWP 169327) "virtqemud"):
#0  futex_wait (private=0, expected=2, futex_word=0x7fb74c05f108 <pw_mc_ctx+8>) at ../sysdeps/nptl/futex-internal.h:146
#1  __GI___lll_lock_wait (futex=futex@entry=0x7fb74c05f108 <pw_mc_ctx+8>, private=0) at lowlevellock.c:50
#2  0x00007fb74f8091b2 in lll_mutex_lock_optimized (mutex=0x7fb74c05f108 <pw_mc_ctx+8>) at pthread_mutex_lock.c:49
#3  ___pthread_mutex_lock (mutex=mutex@entry=0x7fb74c05f108 <pw_mc_ctx+8>) at pthread_mutex_lock.c:89
#4  0x00007fb74c0566da in sss_mt_lock (ctx=0x7fb74c05f100 <pw_mc_ctx>) at src/sss_client/nss_mc_common.c:61
#5  sss_nss_mc_init_ctx (ctx=0x7fb74c05f100 <pw_mc_ctx>, name=0x7fb74c05c03b "passwd") at src/sss_client/nss_mc_common.c:155
#6  sss_nss_mc_get_ctx (name=name@entry=0x7fb74c05c03b "passwd", ctx=ctx@entry=0x7fb74c05f100 <pw_mc_ctx>) at src/sss_client/nss_mc_common.c:226
#7  0x00007fb74c0571ee in sss_nss_mc_getpwuid (uid=uid@entry=0, result=result@entry=0x7ffe32f87c70, buffer=buffer@entry=0x558bb0b00200 "", buflen=buflen@entry=1024) at src/sss_client/nss_mc_passwd.c:187
#8  0x00007fb74c0590ae in _nss_sss_getpwuid_r (uid=0, result=0x7ffe32f87c70, buffer=0x558bb0b00200 "", buflen=1024, errnop=0x7fb74e341a38) at src/sss_client/nss_passwd.c:259
#9  0x00007fb74f87db0f in __getpwuid_r (uid=uid@entry=0, resbuf=resbuf@entry=0x7ffe32f87c70, buffer=<optimized out>, buflen=1024, result=result@entry=0x7ffe32f87c60) at ../nss/getXXbyYY_r.c:274
#10 0x00007fb74fe6e531 in virGetUserEnt (uid=0, name=name@entry=0x7ffe32f87cf0, group=group@entry=0x0, dir=dir@entry=0x0, shell=shell@entry=0x0, quiet=quiet@entry=false) at ../src/util/virutil.c:569
#11 0x00007fb74fe6e81a in virGetUserName (uid=<optimized out>) at ../src/util/virutil.c:681
#12 0x00007fb74fe27323 in virIdentityGetSystem () at ../src/util/viridentity.c:330
#13 0x0000558baea8a1be in remoteClientFreePrivateCallbacks (priv=0x558bb0af85d0) at ../src/remote/remote_daemon_dispatch.c:1712
#14 remoteClientCloseFunc (client=<optimized out>) at ../src/remote/remote_daemon_dispatch.c:1781
#15 0x00007fb74ff26b21 in virNetServerClientCloseLocked (client=0x558bb0af0b30) at ../src/rpc/virnetserverclient.c:982
#16 0x00007fb74ff2ad99 in virNetServerProcessClients (srv=0x558bb0ac4880) at ../src/rpc/virnetserver.c:950
#17 0x00007fb74ff2aebd in daemonServerProcessClients (payload=<optimized out>, key=<optimized out>, opaque=<optimized out>) at ../src/rpc/virnetdaemon.c:699
#18 0x00007fb74fe1eebe in virHashForEach (table=<optimized out>, iter=0x7fb74ff2aeb0 <daemonServerProcessClients>, opaque=0x0) at ../src/util/virhash.c:367
#19 0x00007fb74ff28d9b in virNetDaemonRun (dmn=0x558bb0ac3820) at ../src/rpc/virnetdaemon.c:808
#20 0x0000558baea57603 in main (argc=<optimized out>, argv=<optimized out>) at ../src/remote/remote_daemon.c:1211

Actual results:
virsh command hang after several test cases

Expected results:
virsh should not hang

Additional info:

Comment 1 Alexey Tikhonov 2022-08-08 16:17:01 UTC
Pushed PR: https://github.com/SSSD/sssd/pull/6289

* `master`
    * 0f3a761ed9d654a61f8caed8eae3863c518b9911 - CLIENT:MC: store context mutex outside of context as it should survive context destruction / re-initialization
* `sssd-2-7`
    * 03142f8de42faf4f75465d24d3be9a49c2dd86f7 - CLIENT:MC: store context mutex outside of context as it should survive context destruction / re-initialization

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