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 1937420

Summary: [ESXi][RHEL7.9] Memory leak in vmtoolsd when disable-query-diskinfo is set to false [rhel-7.9.z]
Product: Red Hat Enterprise Linux 7 Reporter: Frank DeLorey <fdelorey>
Component: open-vm-toolsAssignee: Cathy Avery <cavery>
Status: CLOSED ERRATA QA Contact: ldu <ldu>
Severity: high Docs Contact:
Priority: unspecified    
Version: 7.9CC: cavery, cww, jen, jjarvis, jortialc, jreznik, jsavanyo, ldu, leiwang, mrezanin, nuno.santos, ravindrakumar, ribarry, xialiu, yacao, ymankad
Target Milestone: rcKeywords: Triaged, ZStream
Target Release: ---Flags: pm-rhel: mirror+
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: open-vm-tools-11.0.5-3.el7_9.3 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-04-27 11:35:07 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 Frank DeLorey 2021-03-10 15:58:13 UTC
Description of problem:

Customer upgrade RHEl from 7.8 to 7.9 and installed the latest open-vm-tools version: open-vm-tools-11.0.5-3.el7_9.1.x86_64
They noticed a memory leak when querying disk info is enabled.


Version-Release number of selected component (if applicable):

open-vm-tools-11.0.5-3.el7_9.1.x86_64

How reproducible:


Steps to Reproduce:
1.Start a vm running RHEL7.9 with open-vm-tools-11.0.5-3.el7_9.1.x86_64
2.Set disable-query-diskinfo=false in the tools.conf file

Actual results:
The memory leak is seen right away

Expected results:
We should not be leaking memory.

Additional info:

Customer believes this is fixed up stream via this commit: https://github.com/vmware/open-vm-tools/commit/25c2e973583cf189995c9638701e4bef9e1c851c


Testing from the customer:

I make a copy of the tools.conf.example to tools.conf and then make edits with the following resulting configuration:

[root@tumble vmware-tools]# diff tools.conf.example tools.conf
181c181
< #disable-query-diskinfo=false
---
> disable-query-diskinfo=false
184c184
< #poll-interval=30
---
> poll-interval=5

The following happens after poweroff/poweron of the VM:

[root@tumble vmware-tools]# while true; do ps -eo rss,vsz,pid,args |grep vmtoolsd$; sleep 5 ; done
 5016 275360   720 /usr/bin/vmtoolsd
 5028 275360   720 /usr/bin/vmtoolsd
 5040 275360   720 /usr/bin/vmtoolsd
 5064 275360   720 /usr/bin/vmtoolsd
 5080 275360   720 /usr/bin/vmtoolsd
 5096 275428   720 /usr/bin/vmtoolsd
 5112 275428   720 /usr/bin/vmtoolsd
 5144 275496   720 /usr/bin/vmtoolsd
 5152 275496   720 /usr/bin/vmtoolsd
 5172 275496   720 /usr/bin/vmtoolsd
 5200 275496   720 /usr/bin/vmtoolsd
 5244 275576   720 /usr/bin/vmtoolsd
 5248 275576   720 /usr/bin/vmtoolsd
 5260 275576   720 /usr/bin/vmtoolsd
 5272 275576   720 /usr/bin/vmtoolsd
 5308 275648   720 /usr/bin/vmtoolsd
 5316 275648   720 /usr/bin/vmtoolsd
 5328 275648   720 /usr/bin/vmtoolsd
 5344 275648   720 /usr/bin/vmtoolsd
 5388 275648   720 /usr/bin/vmtoolsd
 5392 275648   720 /usr/bin/vmtoolsd
 5404 275728   720 /usr/bin/vmtoolsd
 5408 275728   720 /usr/bin/vmtoolsd
 5448 275728   720 /usr/bin/vmtoolsd
 5472 275728   720 /usr/bin/vmtoolsd
 5476 275728   720 /usr/bin/vmtoolsd
 5500 275840   720 /usr/bin/vmtoolsd
 5512 275840   720 /usr/bin/vmtoolsd
 5520 275840   720 /usr/bin/vmtoolsd

So the leak is quite visible. The problem does not occur when the tools.conf file looks like this:

[root@tumble vmware-tools]# diff tools.conf.example tools.conf
181c181
< #disable-query-diskinfo=false
---
> disable-query-diskinfo=true
184c184
< #poll-interval=30
---
> poll-interval=5

In such case I see this:

[root@tumble ~]# while true; do ps -eo rss,vsz,pid,args |grep vmtoolsd$; sleep 5 ; done
 4624 275052   723 /usr/bin/vmtoolsd
 4628 275052   723 /usr/bin/vmtoolsd
 4628 275052   723 /usr/bin/vmtoolsd
 4676 275052   723 /usr/bin/vmtoolsd
 4676 275052   723 /usr/bin/vmtoolsd
 4676 275052   723 /usr/bin/vmtoolsd
 4676 275052   723 /usr/bin/vmtoolsd
 4676 275052   723 /usr/bin/vmtoolsd
 4676 275052   723 /usr/bin/vmtoolsd
 4676 275052   723 /usr/bin/vmtoolsd
 4676 275052   723 /usr/bin/vmtoolsd
 4676 275052   723 /usr/bin/vmtoolsd
 4676 275052   723 /usr/bin/vmtoolsd
 4676 275052   723 /usr/bin/vmtoolsd
 4676 275052   723 /usr/bin/vmtoolsd
 4676 275052   723 /usr/bin/vmtoolsd
 4676 275052   723 /usr/bin/vmtoolsd
 4676 275052   723 /usr/bin/vmtoolsd
 4676 275052   723 /usr/bin/vmtoolsd
 4676 275052   723 /usr/bin/vmtoolsd
 4676 275052   723 /usr/bin/vmtoolsd

So the leak appears to be in the code for disable-query-diskinfo .

Comment 2 Cathy Avery 2021-03-10 18:59:51 UTC
Hi Lili,

Can you try to reproduce this? Then see if this build fixes it?

https://brewweb.engineering.redhat.com/brew/taskinfo?taskID=35367425

Thanks!

Comment 3 ldu 2021-03-11 03:14:01 UTC
(In reply to Cathy Avery from comment #2)
> Hi Lili,
> 
> Can you try to reproduce this? Then see if this build fixes it?
> 
> https://brewweb.engineering.redhat.com/brew/taskinfo?taskID=35367425
> 
> Thanks!

Hi Cathy,
Follow Frank's reproduce step, this issue could be reproduce. retest with your test build could fix this issue.
Reproduce steps:
1 install rhel7.9 and add a sata disk to OS
2 copy a tool.conf file under /etc/vmware-tools/, uncomment the disable-query-diskinfo=false
3 shutdown -P now the guest, then power on the guest
4 Format the new add sata disk in step 1 and mount it under /mnt
5 run command #while true; do ps -eo rss,vsz,pid,args |grep vmtoolsd$; sleep 5 ; done
6 check the status

[root@vm-197-13 ~]# while true; do ps -eo rss,vsz,pid,args |grep vmtoolsd$; sleep 5 ; done
 4804 289252  3155 /usr/bin/vmtoolsd
 5124 289252  3155 /usr/bin/vmtoolsd
 5128 289252  3155 /usr/bin/vmtoolsd
 5132 289252  3155 /usr/bin/vmtoolsd
 5180 289320  3155 /usr/bin/vmtoolsd
 5184 289320  3155 /usr/bin/vmtoolsd
 5188 289320  3155 /usr/bin/vmtoolsd
 5196 289320  3155 /usr/bin/vmtoolsd
 5212 289320  3155 /usr/bin/vmtoolsd
 5216 289320  3155 /usr/bin/vmtoolsd
 5232 289320  3155 /usr/bin/vmtoolsd
 5240 289320  3155 /usr/bin/vmtoolsd
 5244 289320  3155 /usr/bin/vmtoolsd
 5248 289320  3155 /usr/bin/vmtoolsd
 5264 289396  3155 /usr/bin/vmtoolsd
 5264 289396  3155 /usr/bin/vmtoolsd
 5268 289396  3155 /usr/bin/vmtoolsd
 5280 289396  3155 /usr/bin/vmtoolsd
 5300 289396  3155 /usr/bin/vmtoolsd
 5312 289396  3155 /usr/bin/vmtoolsd
 5316 289396  3155 /usr/bin/vmtoolsd
 5316 289396  3155 /usr/bin/vmtoolsd
 5324 289396  3155 /usr/bin/vmtoolsd
 5332 289504  3155 /usr/bin/vmtoolsd

Then install the test build open-vm-tools-11.0.5-3.el7.2.cavery202103101327.x86_64.rpm in guest, start the vmtoolsd service.
rerun command #while true; do ps -eo rss,vsz,pid,args |grep vmtoolsd$; sleep 5 ; done
[root@vm-197-13 ~]# while true; do ps -eo rss,vsz,pid,args |grep vmtoolsd$; sleep 5 ; done
 5120 223716 20144 /usr/bin/vmtoolsd
 5132 223716 20144 /usr/bin/vmtoolsd
 5136 223716 20144 /usr/bin/vmtoolsd
 5180 223716 20144 /usr/bin/vmtoolsd
 5180 223716 20144 /usr/bin/vmtoolsd
 5180 223716 20144 /usr/bin/vmtoolsd
 5180 223716 20144 /usr/bin/vmtoolsd
 5180 223716 20144 /usr/bin/vmtoolsd
 5180 223716 20144 /usr/bin/vmtoolsd
 5180 223716 20144 /usr/bin/vmtoolsd
 5180 223716 20144 /usr/bin/vmtoolsd
 5180 223716 20144 /usr/bin/vmtoolsd
 5180 223716 20144 /usr/bin/vmtoolsd
 5180 223716 20144 /usr/bin/vmtoolsd
 5180 223716 20144 /usr/bin/vmtoolsd
 5180 223716 20144 /usr/bin/vmtoolsd

Comment 15 errata-xmlrpc 2021-04-27 11:35:07 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 (open-vm-tools 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-2021:1393