Hello,
I'm trying to connect to ESX server (6.0) using vixDiskLibSample program provided with vixDiskLib (v6.0) running
on RHEL 6 update to date x64. Program runs fine until connection is created, but dumps core while executing
VixDiskLib_Open call at line 642.
./vix-disklib-sample -info -user root -password XXXX -host h3.lan -initex /dev/null -thumb "21:73:98:D4:89:A3:9D:16:B3:D7:02:80:3D:BA:36:2A:98:5B:DB:05" "[datastore1] rhel6/rhel6.vmdk"
Log: OBJLIB-LIB: Objlib initialized.
Log: VixDiskLib: Advanced transport module not loaded.
Log: VixDiskLib: Using transport modes from DiskLib: file:nbdssl:nbd.
Log: VMware VixDiskLib (6.0) Release build-2498720
Log: VixDiskLibVim: VixDiskLibVim_Init: Initialization is completed.
Log: VixDiskLib: VixDiskLib_Connect: Establish connection.
Log: VixDiskLib: Resolve host.
Log: VixDiskLib: VixDiskLib_OpenEx: Open a disk.
Log: VixDiskLibVim: VixDiskLibVim_GetNfcTicket: Get NFC ticket for [datastore1] rhel6/rhel6.vmdk.
Program received signal SIGSEGV, Segmentation fault.
0x00007ffff590626d in ?? () from /usr/local/lib/vmware-vix-disklib-6.0/lib64/libvixDiskLibVim.so
(gdb) backtrace
#0 0x00007ffff590626d in ?? () from /usr/local/lib/vmware-vix-disklib-6.0/lib64/libvixDiskLibVim.so
#1 0x00007ffff58ffe7d in ?? () from /usr/local/lib/vmware-vix-disklib-6.0/lib64/libvixDiskLibVim.so
#2 0x00007ffff5903409 in VixDiskLibVim_GetNfcTicket () from /usr/local/lib/vmware-vix-disklib-6.0/lib64/libvixDiskLibVim.so
#3 0x00007ffff77d87c3 in ?? () from /usr/local/lib/vmware-vix-disklib-6.0/lib64/libvixDiskLib.so.6
#4 0x00007ffff77d8f3c in ?? () from /usr/local/lib/vmware-vix-disklib-6.0/lib64/libvixDiskLib.so.6
#5 0x00007ffff77d9082 in VixDiskLib_Open () from /usr/local/lib/vmware-vix-disklib-6.0/lib64/libvixDiskLib.so.6
#6 0x0000000000405b72 in VixDisk::VixDisk (this=0x7fffffffdf30, connection=0x89b200, path=0x7fffffffe637 "[datastore1] rhel6/rhel6.vmdk", flags=4) at vixDiskLibSample.cpp:642
#7 0x000000000040391b in DoInfo () at vixDiskLibSample.cpp:1154
#8 0x0000000000402791 in main (argc=13, argv=0x7fffffffe128) at vixDiskLibSample.cpp:825
I saw a similar issue with vixDiskLib 5.2 in the forum, but here, It works fine with a previous 5.5 version.
./vix-disklib-sample -info -user root -password XXXX -host h3.lan -initex /dev/null -thumb "21:73:98:D4:89:A3:9D:16:B3:D7:02:80:3D:BA:36:2A:98:5B:DB:05" "[datastore1] rhel6/rhel6.vmdk"
Log: OBJLIB-LIB: Objlib initialized.
Log: VixDiskLib: Advanced transport module not loaded.
Log: VixDiskLib: Using transport modes from DiskLib: file:nbdssl:nbd.
Log: VMware VixDiskLib (5.5) Release build-1601882
Log: VixDiskLibVim: VixDiskLibVim_Init: Initialization is completed.
Log: VixDiskLib: VixDiskLib_Connect: Establish connection.
Log: VixDiskLib: VixDiskLib_OpenEx: Open a disk.
Log: VixDiskLibVim: VixDiskLibVim_GetNfcTicket: Get NFC ticket for [datastore1] rhel6/rhel6.vmdk.
Log: VixDiskLibVim: VixDiskLibVim_FreeNfcTicket: Free NFC ticket.
Log: NBD_ClientOpen: attempting to create connection to ha-nfc://[datastore1] rhel6/rhel6.vmdk@192.168.0.102:902
Log: Opening file [datastore1] rhel6/rhel6.vmdk (ha-nfc://[datastore1] rhel6/rhel6.vmdk@192.168.0.102:902)
Log: DISKLIB-LINK : Opened 'ha-nfc://[datastore1] rhel6/rhel6.vmdk@192.168.0.102:902' (0x1e): custom, 20971520 sectors / 10 GB.
Log: DISKLIB-LIB : Opened "ha-nfc://[datastore1] rhel6/rhel6.vmdk@192.168.0.102:902" (flags 0x1e, type custom).
Log: VixDiskLib: VixDiskLib_GetTransportMode: Retrieve transport mode.
Disk "[datastore1] rhel6/rhel6.vmdk" is open using transport mode "nbd".
Log: VixDiskLib: VixDiskLib_GetInfo: Retrieve disk info.
capacity = 20971520 sectors
number of links = 1
adapter type = LsiLogic SCSI
BIOS geometry = 0/0/0
physical geometry = 1305/255/63
Log: VixDiskLib: VixDiskLib_FreeInfo: Clean up VixDiskLib.
Transport modes supported by vixDiskLib: file:nbdssl:nbd
Log: VixDiskLib: VixDiskLib_Close: Close disk.
Log: VixDiskLib: VixDiskLib_Disconnect: Disconnect.
Log: VixDiskLib: VixDiskLib_Exit: Unmatched Init calls so far: 1.
Log: VixDiskLibVim: VixDiskLibVim_Exit: Clean up.
I looked the strace output and I didn't see a problem to find libraries such as libssl. Any idea to solve this issue?
Thanks
The command does not contain the ssmoref and transportmode, so it will just use the connect() call rather than connectEx().
. Provide the VM moref and snapshot moref
. Instead of /dev/null, give out the path to the config file.
Hello,
./vix-disklib-sample -info -mode ndb -ssmoref moref=1 -user root -password xxx -host h3.lan -initex config.ini -thumb "21:73:98:D4:89:A3:9D:16:B3:D7:02:80:3D:BA:36:2A:98:5B:DB:05" "[datastore1] rhel6/rhel6.vmdk"
Log: OBJLIB-LIB: Objlib initialized.
Log: VixDiskLib: Advanced transport module not loaded.
Log: VixDiskLib: Using transport modes from DiskLib: file:nbdssl:nbd.
Log: VMware VixDiskLib (6.0) Release build-2498720
Log: VixDiskLibVim: VixDiskLibVim_Init: Initialization is completed.
Log: VixDiskLib: VixDiskLib_ConnectEx: Establish connection using ndb.
Log: VixDiskLib: VixDiskLib_Connect: Establish connection.
Log: VixDiskLib: Resolve host.
Log: VixDiskLib: VixDiskLib_ConnectEx: No transport plugin. Advanced transports not available.
Log: VixDiskLib: VixDiskLib_OpenEx: Open a disk.
Log: VixDiskLibVim: VixDiskLibVim_GetNfcTicket: Get NFC ticket for [datastore1] rhel6/rhel6.vmdk.
Erreur de segmentation (core dumped)
From what we can see, the system is now using ConnectEX, but end up with the same problem at the same place (the backtrace is identical).
Do you know if it's possible to have a VixDisk sdk with some debug symbols?
When calling the program under strace, we see that the problem might come when loading ssl certs, I wonder if it's not an other libssl problem...
write(1, "Log: VixDiskLibVim: VixDiskLibVi"..., 98Log: VixDiskLibVim: VixDiskLibVim_GetNfcTicket: Get NFC ticket for [datastore1] rhel6/rhel6.vmdk.
) = 98
open("/etc/ssl/certs/ca-certificates.crt", O_RDONLY) = 7
read(7, "-----BEGIN CERTIFICATE-----\nMIID"..., 4096) = 4096
read(7, "ycJYgBugl6H8WY3pEfbRD0tVNEYqi4Y7"..., 4096) = 4096
...
close(7) = 0
open("/etc/pki/tls/certs/ca-bundle.crt", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/etc/pki/tls/cert.pem", O_RDONLY) = -1 ENOENT (No such file or directory)
--- SIGSEGV {si_signo=SIGSEGV, si_code=SEGV_MAPERR, si_addr=0} ---
+++ killed by SIGSEGV (core dumped) +++
It looks to segfault before some actual connection (no socket created).
From what I can see in the strace file, the program is loading the libssl included in the SDK
open("/usr/local/lib/vmware-vix-disklib-6.0/lib64/libssl.so.1.0.1", O_RDONLY|O_CLOEXEC) = 4
Thanks,
Best Regards
Did you receive solution to this issue. I am also facing exactly the same issue. Could you please let me know.
Thanks!
hello ,can you paste your /dev/null?
thanks! !