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.
Created attachment 576725[details]
Leaves the console connection in a state, where the next forced connection causes a deadlock.
Description of problem:
The qemu driver deadlocks, when a newly open console connection cleans up a already dead connection
Version-Release number of selected component (if applicable):
libvirt-0.9.10-4.el6 and later
How reproducible:
100%
Steps to Reproduce:
1. Start a guest with a serial console (the guest OS doesn't need to support it)
2. modify guest name in console_deadlock.py reproducer script
3. run console_deadlock.py
4. run 'virsh console <guestname> --force'
Actual results:
Virsh locks up and the daemon deadlocks:
Thread 11 (Thread 0x7f4caa6d4700 (LWP 22715)):
#0 0x00007f4cb15d3f14 in __lll_lock_wait () from /lib64/libpthread.so.0
#1 0x00007f4cb15cf411 in _L_lock_500 () from /lib64/libpthread.so.0
#2 0x00007f4cb15cf22a in pthread_mutex_lock () from /lib64/libpthread.so.0
#3 0x0000000000462bbd in qemudClose ()
#4 0x00007f4cb29438eb in virReleaseConnect () from /usr/lib64/libvirt.so.0
#5 0x00007f4cb2945c8c in virUnrefStream () from /usr/lib64/libvirt.so.0
#6 0x00007f4cb29691de in virStreamFree () from /usr/lib64/libvirt.so.0
#7 0x00007f4cb2935a5d in virConsoleHashEntryFree () from /usr/lib64/libvirt.so.0
#8 0x00007f4cb28e3282 in virHashRemoveEntry () from /usr/lib64/libvirt.so.0
#9 0x00007f4cb2935c4e in virConsoleOpen () from /usr/lib64/libvirt.so.0
#10 0x00000000004526e9 in qemuDomainOpenConsole ()
#11 0x00007f4cb296e1f1 in virDomainOpenConsole () from /usr/lib64/libvirt.so.0
#12 0x00000000004361e4 in remoteDispatchDomainOpenConsoleHelper ()
#13 0x00007f4cb29ac375 in virNetServerProgramDispatch () from /usr/lib64/libvirt.so.0
#14 0x00007f4cb29a6e11 in virNetServerHandleJob () from /usr/lib64/libvirt.so.0
#15 0x00007f4cb28d497d in virThreadPoolWorker () from /usr/lib64/libvirt.so.0
#16 0x00007f4cb28d3ff6 in virThreadHelper () from /usr/lib64/libvirt.so.0
#17 0x00007f4cb15ccc5c in start_thread () from /lib64/libpthread.so.0
#18 0x00007f4cb1313fcd in clone () from /lib64/libc.so.6
Back to POST; 0.9.10-12.el6 mistakenly applied the patch twice instead of once, with the second application affecting the wrong context and completely breaking the binary.
I can reproduce this issue with libvirt-0.9.10-4.el6.
verify with libvirt-0.9.10-13.el6.x86_64
step:
1. Start a guest with a serial console (the guest OS doesn't need to support
it)
2. modify guest name in console_deadlock.py reproducer script
3. run console_deadlock.py
4. run 'virsh console <guestname> --force'
virsh not locks up,the daemon not deadlocks.
Technical note added. If any revisions are required, please edit the "Technical Notes" field
accordingly. All revisions will be proofread by the Engineering Content Services team.
New Contents:
No Documentation needed (bug in new feature)
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, and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.
http://rhn.redhat.com/errata/RHSA-2012-0748.html
Created attachment 576725 [details] Leaves the console connection in a state, where the next forced connection causes a deadlock. Description of problem: The qemu driver deadlocks, when a newly open console connection cleans up a already dead connection Version-Release number of selected component (if applicable): libvirt-0.9.10-4.el6 and later How reproducible: 100% Steps to Reproduce: 1. Start a guest with a serial console (the guest OS doesn't need to support it) 2. modify guest name in console_deadlock.py reproducer script 3. run console_deadlock.py 4. run 'virsh console <guestname> --force' Actual results: Virsh locks up and the daemon deadlocks: Thread 11 (Thread 0x7f4caa6d4700 (LWP 22715)): #0 0x00007f4cb15d3f14 in __lll_lock_wait () from /lib64/libpthread.so.0 #1 0x00007f4cb15cf411 in _L_lock_500 () from /lib64/libpthread.so.0 #2 0x00007f4cb15cf22a in pthread_mutex_lock () from /lib64/libpthread.so.0 #3 0x0000000000462bbd in qemudClose () #4 0x00007f4cb29438eb in virReleaseConnect () from /usr/lib64/libvirt.so.0 #5 0x00007f4cb2945c8c in virUnrefStream () from /usr/lib64/libvirt.so.0 #6 0x00007f4cb29691de in virStreamFree () from /usr/lib64/libvirt.so.0 #7 0x00007f4cb2935a5d in virConsoleHashEntryFree () from /usr/lib64/libvirt.so.0 #8 0x00007f4cb28e3282 in virHashRemoveEntry () from /usr/lib64/libvirt.so.0 #9 0x00007f4cb2935c4e in virConsoleOpen () from /usr/lib64/libvirt.so.0 #10 0x00000000004526e9 in qemuDomainOpenConsole () #11 0x00007f4cb296e1f1 in virDomainOpenConsole () from /usr/lib64/libvirt.so.0 #12 0x00000000004361e4 in remoteDispatchDomainOpenConsoleHelper () #13 0x00007f4cb29ac375 in virNetServerProgramDispatch () from /usr/lib64/libvirt.so.0 #14 0x00007f4cb29a6e11 in virNetServerHandleJob () from /usr/lib64/libvirt.so.0 #15 0x00007f4cb28d497d in virThreadPoolWorker () from /usr/lib64/libvirt.so.0 #16 0x00007f4cb28d3ff6 in virThreadHelper () from /usr/lib64/libvirt.so.0 #17 0x00007f4cb15ccc5c in start_thread () from /lib64/libpthread.so.0 #18 0x00007f4cb1313fcd in clone () from /lib64/libc.so.6