Bug 1581364

Summary: Hash operation not allowed during iteration [rhel-7.5.z]
Product: Red Hat Enterprise Linux 7 Reporter: Oneata Mircea Teodor <toneata>
Component: libvirtAssignee: Michal Privoznik <mprivozn>
Status: CLOSED ERRATA QA Contact: yafu <yafu>
Severity: high Docs Contact:
Priority: high    
Version: 7.4CC: agurenko, bfournie, chhu, derekh, dyuan, fjin, hjensas, jdenemar, jherrman, kchamart, kevin, lmen, mabrams, mflusche, michele, mprivozn, msufiyan, mtessun, nmanos, rbalakri, sasha, wznoinsk, xuzhang
Target Milestone: rcKeywords: Upstream, ZStream
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: libvirt-3.9.0-14.el7_5.6 Doc Type: Bug Fix
Doc Text:
Prior to this update, guest virtual machine actions that use a python library in some cases failed and "Hash operation not allowed during iteration" error messages were logged. Several redundant thread access checks have been removed, and the problem no longer occurs.
Story Points: ---
Clone Of: 1576464 Environment:
Last Closed: 2018-06-26 16:55:29 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: 1576464    
Bug Blocks:    

Description Oneata Mircea Teodor 2018-05-22 15:04:37 UTC
This bug has been copied from bug #1576464 and has been proposed to be backported to 7.5 z-stream (EUS).

Comment 2 Bob Fournier 2018-05-22 17:37:34 UTC
*** Bug 1571384 has been marked as a duplicate of this bug. ***

Comment 5 Kashyap Chamarthy 2018-05-25 12:11:33 UTC
*** Bug 1577951 has been marked as a duplicate of this bug. ***

Comment 7 yafu 2018-06-07 03:16:27 UTC
Reproduced with libvirt-3.9.0-14.el7_5.2.x86_64.
Test steps:
1.Start a guest:
#virsh start test1

2.Do 'virsh list' in a loop:
#for i in {1..1000}; do virsh list; done

3.Open another terminal, do 'virsh domstats' in a loop:
#for i in {1..1000}; do virsh domstats; done

4.Check the libvirtd.log:
# cat /var/log/libvirt/libvirtd.log | grep -i "Hash operation not allowed during"
2018-06-07 01:57:07.673+0000: 28086: error : virHashForEach:597 : Hash operation not allowed during iteration
2018-06-07 01:57:08.077+0000: 28079: error : virHashForEach:597 : Hash operation not allowed during iteration
2018-06-07 01:57:08.650+0000: 28077: error : virHashForEach:597 : Hash operation not allowed during iteration
2018-06-07 01:57:09.057+0000: 28079: error : virHashForEach:597 : Hash operation not allowed during iteration

Verified with libvirt-3.9.0-14.el7_5.6.x86_64.
Test steps:
1.Start a guest:
#virsh start test1

2.Do 'virsh list' in a loop:
#for i in {1..1000}; do virsh list; done

3.Open another terminal, do 'virsh domstats' in a loop:
#for i in {1..1000}; do virsh domstats; done

4.Check the libvirtd.log after step 2&3, no error "Hash operation not allowed during iteration":
#cat /var/log/libvirt/libvirtd.log | grep -i "Hash operation not allowed during iteration"
no output

Comment 8 yafu 2018-06-13 06:27:23 UTC
Also test do virsh list, virsh domstats, create/destroy guest, managedsave/restore guest parallel for about 48 hours, no error report and libvirtd worked well.

Comment 9 yafu 2018-06-13 06:28:20 UTC
According to comment 7 and comment 8, move the bug to verified.

Comment 11 Bob Fournier 2018-06-26 15:53:15 UTC
*** Bug 1592785 has been marked as a duplicate of this bug. ***

Comment 12 errata-xmlrpc 2018-06-26 16:55:29 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/RHSA-2018:1997

Comment 13 Bob Fournier 2018-07-04 10:50:17 UTC
*** Bug 1596946 has been marked as a duplicate of this bug. ***

Comment 14 Artom Lifshitz 2019-01-24 16:38:07 UTC
*** Bug 1592785 has been marked as a duplicate of this bug. ***