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 1497195

Summary: Calling virDomain.getMemoryStats and virDomain.diskErrors may block the entire process [rhel-7.3.z]
Product: Red Hat Enterprise Linux 7 Reporter: Oneata Mircea Teodor <toneata>
Component: libvirt-pythonAssignee: Pavel Hrdina <phrdina>
Status: CLOSED ERRATA QA Contact: Virtualization Bugs <virt-bugs>
Severity: high Docs Contact:
Priority: high    
Version: 7.4CC: chhu, dyuan, fromani, gveitmic, gwatson, jentrena, jherrman, jiyan, jsuchane, lcheng, lhuang, libvirt-maint, lmen, mkalinin, mtessun, nsoffer, pkrempa, weizhan, xuzhang
Target Milestone: rcKeywords: ZStream
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: libvirt-python-2.0.0-2.el7_3.1 Doc Type: Bug Fix
Doc Text:
When the storage of a guest hosted on a Red Hat Virtualization Hypervisor system became inaccessible, the host in some cases became unresponsive. This update fixes the behavior of the virDomainMemoryStats() function, which prevents the described problem from occurring.
Story Points: ---
Clone Of: 1496517 Environment:
Last Closed: 2017-10-31 15:52:13 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1496517    
Bug Blocks:    

Description Oneata Mircea Teodor 2017-09-29 12:53:21 UTC
This bug has been copied from bug #1496517 and has been proposed to be backported to 7.3 z-stream (EUS).

Comment 5 lcheng 2017-10-18 06:30:31 UTC
According to bug 1497197 comment 5, I can reproduce this issue on libvirt-python-2.0.0-2.el7.x86_64.

The log as follows:
**********
90:print time: 2017-10-18 11:38:13.668930

91:print time: 2017-10-18 11:38:14.669992

92:print time: 2017-10-18 11:38:15.671124

93:print time: 2017-10-18 11:38:16.672246

start memoryStats: 2017-10-18 11:38:16.675239  <---------- here the time

libvirt: QEMU Driver error : Timed out during operation: cannot acquire state change lock (held by remoteDispatchConnectGetAllDomainStats)
94:print time: 2017-10-18 11:38:46.724654

Exception in thread Thread-2:
Traceback (most recent call last):
  File "/usr/lib64/python2.7/threading.py", line 811, in __bootstrap_inner
    self.run()
  File "/usr/lib64/python2.7/threading.py", line 764, in run
    self.__target(*self.__args, **self.__kwargs)
  File "./test.py", line 19, in memory_stats
    dom.memoryStats()
  File "/usr/lib64/python2.7/site-packages/libvirt.py", line 1463, in memoryStats
    if ret is None: raise libvirtError ('virDomainMemoryStats() failed', dom=self)
libvirtError: Timed out during operation: cannot acquire state change lock (held by remoteDispatchConnectGetAllDomainStats)

95:print time: 2017-10-18 11:38:47.726096  <-------------- here the time

96:print time: 2017-10-18 11:38:48.727195

97:print time: 2017-10-18 11:38:49.728284

98:print time: 2017-10-18 11:38:50.729395
*************


On libvirt-python-2.0.0-2.el7_3.1.x86_64, the print will finished without hang, so move to VERIFIED.

Comment 7 errata-xmlrpc 2017-10-31 15:52:13 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, 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-2017:3090