Bug 1388768 - [ESXi][RHEL7.4]open-vm-tools utilities crashing [NEEDINFO]
Summary: [ESXi][RHEL7.4]open-vm-tools utilities crashing
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: open-vm-tools
Version: 7.3
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Cathy Avery
QA Contact: Bo Yang
URL:
Whiteboard:
Depends On:
Blocks: 1703806
TreeView+ depends on / blocked
 
Reported: 2016-10-26 07:32 UTC by Marko Myllynen
Modified: 2020-10-28 20:37 UTC (History)
16 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1703806 (view as bug list)
Environment:
Last Closed: 2019-12-04 12:47:06 UTC
Target Upstream Version:
cavery: needinfo? (ravindrakumar)


Attachments (Terms of Use)
core.xz (150.97 KB, application/octet-stream)
2016-10-26 11:36 UTC, Marko Myllynen
no flags Details
core dump (1.32 MB, application/x-core)
2017-03-29 02:29 UTC, ldu
no flags Details

Description Marko Myllynen 2016-10-26 07:32:06 UTC
Description of problem:
Both "vmware-xferlogs enc /" and "vmtoolsd -g /" seem to crash at least on systems which are not VMware guests. Of course there's no real point to run these on non VMware guest but even so they should not crash.

Version-Release number of selected component (if applicable):
open-vm-tools-10.0.5-2.el7.x86_64

Comment 2 Richard W.M. Jones 2016-10-26 09:47:26 UTC
vmtoolsd is normally run from a systemd service, and the systemd
service is protected by:

ConditionVirtualization=vmware

so I don't think that is an issue.  (It's a problem if vmtoolsd is
starting up automatically on a non-VMware guest).

I'm not familiar with what vmware-xferlogs does, but can you provide
a stack trace of where it is crashing please.

Comment 3 Marko Myllynen 2016-10-26 11:36:56 UTC
Created attachment 1214265 [details]
core.xz

Comment 4 Richard W.M. Jones 2016-10-26 11:45:13 UTC
Thread 1 (Thread 0x7f586dc71880 (LWP 928)):
#0  0x00007f586d7e684c in Backdoor_InOut ()
   from /var/tmp/usr/lib64/libvmtools.so.0.0.0
#1  0x0000000080000000 in ?? ()
#2  0x00007f586d7fdac5 in Message_OpenAllocated ()
   from /var/tmp/usr/lib64/libvmtools.so.0.0.0
#3  0x00007f586d804a07 in RpcOut_startWithReceiveBuffer ()
   from /var/tmp/usr/lib64/libvmtools.so.0.0.0
#4  0x00007f586d804c01 in RpcOutSendOneRawWork ()
   from /var/tmp/usr/lib64/libvmtools.so.0.0.0
#5  0x00007f586d804fcf in RpcVMX_LogV ()
   from /var/tmp/usr/lib64/libvmtools.so.0.0.0
#6  0x00007f586d805089 in RpcVMX_Log ()
   from /var/tmp/usr/lib64/libvmtools.so.0.0.0
#7  0x00007f586dc89065 in main ()

Not especially surprising that it crashes when touching
the VMware backdoor port (https://sites.google.com/site/chitchatvmback/backdoor)

It might help if these tools checked for VMware virtualization
being present before trying to touch that port.

Comment 5 Ravindra Kumar 2016-10-31 19:03:35 UTC
"vmware-xferlogs enc" transfers support logs to VMware HV platform and "vmtoolsd -g" is running "vmtoolsd" in debug mode.

There is no reason for someone to run these commands on non-VMware platform. However, I agree that we could enhance these to fail gracefully with an error message instead of crashing.

I will file a VMware internal bug to fix these in the next release.

Comment 6 ldu 2017-03-28 06:43:06 UTC
I test guest which run on Hyper-V, after run "vmware-xferlogs enc /"and "vmtoolsd -g /" the result is as below,
[root@rhel7 ~]# vmware-xferlogs enc /
Segmentation fault (core dumped)
[root@rhel7 ~]# vmtoolsd -g /
Aborted (core dumped)
[root@rhel7 ~]#

Comment 7 Ravindra Kumar 2017-03-28 07:16:43 UTC
This is not fixed yet. Could you please also provide the core dumps with matching debug binaries?

Comment 8 ldu 2017-03-29 02:28:00 UTC
(In reply to Ravindra Kumar from comment #7)
> This is not fixed yet. Could you please also provide the core dumps with
> matching debug binaries?

Hi Ravindra,

I know this issue is not fixed yet, I just want to record the test result, the attachment is the core dumps, I am not sure where is the debug binaries,could you provide the path?
thanks very much!

ldu

Comment 9 ldu 2017-03-29 02:29:11 UTC
Created attachment 1267213 [details]
core dump

Comment 10 Ravindra Kumar 2017-03-29 02:54:46 UTC
(In reply to ldu from comment #8)
> the attachment is the core dumps, I am not sure where is the debug
> binaries,could you provide the path?

Debug binaries would be there in debuginfo package. I think Richard can help you with getting a useful backtrace.

Comment 11 John Savanyo 2017-06-27 22:58:08 UTC
(In reply to Ravindra Kumar from comment #5)
> "vmware-xferlogs enc" transfers support logs to VMware HV platform and
> "vmtoolsd -g" is running "vmtoolsd" in debug mode.
> 
> There is no reason for someone to run these commands on non-VMware platform.
> However, I agree that we could enhance these to fail gracefully with an
> error message instead of crashing.
> 
> I will file a VMware internal bug to fix these in the next release.

Hi Ravindra, What's the internal PR? In the future, please post internal PR# in comments so other people can find the bugs.

Comment 12 Ravindra Kumar 2017-06-28 05:51:44 UTC
(In reply to John Savanyo from comment #11)
> What's the internal PR?

It is 1757250.

> In the future, please post internal PR#
> in comments so other people can find the bugs.

Yes, that's a good idea, I already started doing that recently.

Comment 13 Cathy Avery 2018-07-05 17:49:23 UTC
I assigning bug to myself. Ravindra please continue to work this issue.

Comment 14 Ranjith Rajaram 2019-04-26 06:12:27 UTC
Hello,

Do we any update on this issue ?

Was it fixed in open-vm-tools-10.2.5-3.el7 ?

Comment 17 ldu 2019-07-05 13:23:12 UTC
Hi JinYan,
Could you help check the VMware internal bug 1757250 has been fixed or not?
Thanks very much!

Lili Du

Comment 18 Yan Jin 2019-10-22 03:59:30 UTC
(In reply to ldu from comment #17)
> Hi JinYan,
> Could you help check the VMware internal bug 1757250 has been fixed or not?
> Thanks very much!
> 
> Lili Du
Hi Lili,
The status of the VMware internal bug is not resolved as fixed yet.

Comment 19 Jaroslav Suchanek 2019-12-04 12:47:06 UTC
Closing as won't fix. If the resolution or status should be different, please change. Thanks.

Comment 20 John Savanyo 2020-03-12 03:27:34 UTC
Clearing need-info to eliminate reminders.

Comment 21 John Wolfe 2020-10-28 01:01:49 UTC
A fix for this is in the open-vm-tools 11.2.0 release.

commit 1f66f283c20f7f5cd154ca34c33e3e145659916a
Date:   Fri Sep 11 12:11:05 2020 -0700

    Ensuring vmtools utilities are only used in a VMware virtual environment.
    
    Several utilities do not check that their running environment is in a
    VMware hypervisor.  Add checks and generate error messages if the
    running environment is a physical machine.  Some makefiles were altered
    o resolve dependency issues.

Comment 22 Cathy Avery 2020-10-28 15:10:43 UTC
(In reply to John Wolfe from comment #21)

John is this an issue in all open-vm-tools revs up to 11.2.0?

Comment 23 John Wolfe 2020-10-28 20:37:50 UTC
(In reply to Cathy Avery from comment #22)
> (In reply to John Wolfe from comment #21)
> 
> John is this an issue in all open-vm-tools revs up to 11.2.0?

Yes Cathy, this problem is an issue in all open-vm-tools releases prior to 11.2.0.  As reported in description, there is really no reason to run these commands if not on a VMware guest.

The fix is to check for the presence of a VMware hypervisor before attempting to access the backdoor channel.  The following commands have been updated in 11.2.0

   vmtoolsd -g
   vmware-namespace-cmd
   vmware-rpctool 
   vmware-xferlogs
   vmware-alias-import


Note You need to log in before you can comment on or make changes to this bug.