Bug 1935246

Summary: fix qemu-ga-win resource leaks [rhel-8.5.0]
Product: Red Hat Enterprise Linux 8 Reporter: RHEL Program Management Team <pgm-rhel-tools>
Component: virtio-winAssignee: Basil Salman <bsalman>
virtio-win sub component: qemu-ga-win QA Contact: dehanmeng <demeng>
Status: CLOSED ERRATA Docs Contact:
Severity: urgent    
Priority: unspecified CC: ailan, coli, demeng, gveitmic, jinzhao, juzhang, lijin, lmiksik, mdean, yvugenfi
Version: 8.4Keywords: Reopened, Triaged
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: mingw-qemu-ga-win-102.2.0-2.el8 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 1929144 Environment:
Last Closed: 2021-11-09 18:52:45 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: 1929144    
Bug Blocks:    

Comment 3 Yvugenfi@redhat.com 2021-06-17 11:23:12 UTC
The fix in mingw-qemu-ga-win-102.4.0-0.el8

Comment 4 dehanmeng 2021-06-18 02:22:07 UTC
reproduce this issue:
version:
mingw-qemu-ga-win-101.2.0-1.el7ev

Steps:
1. bootup win2016 guest and run qemu-ga.
2. run powershell.exe and execute command "PS C:\Users\Administrator> while(1) { Get-Process -ProcessName qemu-ga; sleep 5 }" while running command "cat <(for i in {1..1000}; do echo '{"execute":"guest-get-osinfo"}'; sleep 2; echo '{"execute":"guest-get-devices"}'; sleep 2; done)  | nc -U /tmp/qga.sock > log" on host.

actual result:
handles raise up without limit, actually it should be limited to less than 300, but now it cause resource leak.
Expected result:
handles maintain a stable value.

Verify this issue 
version:
mingw-qemu-ga-win-102.4.0-0.el8
qemu-ga-win-102.4.0-0.el8.noarch.rpm
qemu-kvm-docs-6.0.0-19.module+el8.5.0+11385+6e7d542e.x86_64
RHEL-8.5.0-20210611.n.0

steps as above:
Actual result:
Handles  NPM(K)    PM(K)      WS(K)     CPU(s)     Id  SI ProcessName
-------  ------    -----      -----     ------     --  -- -----------
    145      13     2052       8380       0.02   3612   0 qemu-ga
    152      14     2264       9060       0.05   3612   0 qemu-ga
    152      14     2292       9100       0.11   3612   0 qemu-ga
    152      14     2312       9112       0.14   3612   0 qemu-ga
    152      14     2296       9108       0.16   3612   0 qemu-ga
    152      14     2296       9108       0.19   3612   0 qemu-ga
    152      14     2296       9108       0.25   3612   0 qemu-ga
    152      14     2300       9108       0.27   3612   0 qemu-ga
    152      14     2300       9108       0.28   3612   0 qemu-ga
    152      14     2300       9112       0.30   3612   0 qemu-ga
    152      14     2260       9068       0.36   3612   0 qemu-ga
    152      14     2232       9076       0.39   3612   0 qemu-ga
    152      14     2220       9064       0.42   3612   0 qemu-ga
    152      14     2244       9088       0.44   3612   0 qemu-ga
    ...
    ...
    ...
    152      14     2252       9088       1.64   3612   0 qemu-ga
    152      14     2256       9092       1.67   3612   0 qemu-ga
    152      14     2240       9092       1.69   3612   0 qemu-ga
Expected result:
handles maintain a stable value.

Comment 7 errata-xmlrpc 2021-11-09 18:52:45 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 (virtio-win 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/RHEA-2021:4341