VMware {code} Community
arogge
Contributor
Contributor

VDDK 7.0.1 Crashing in/after VixDiskLib_OpenEx()

After building an application[1] using VDDK 7.0.1 instead of 6.5 it started to crash on some systems.

The last thing that is logged is "VixDiskLib_OpenEx: Open a disk." and after that it crashes with a SIGSEGV. While tracing the source of the problem in the application's code, I noticed that the library causes the crash.

Using strace I can see that the last syscall is openat() trying to open /sys/class/scsi_disk/. Supposedly in case that call fails, the program will crash afterwards. If it succeeds, it will then openat() /etc/mtab and again: if that file doesn't exist, then the library will crash the program.

Loading the SD driver on a system without SCSI drives will lead to an empty /sys/class/scsi_disk/, in which case /etc/mtab seems not to be checked at all.

Also, forcing a transport (i.e. nbdssl) will circumvent the problem, that seems to exist in the probing-code for the SAN and/or hotadd transports.

 

<rant>Thanks for stripping most of the debug symbols, it really helped to make the debugging expierience as bad as possible. I also cannot believe you're shipping software with a bug like that. What did you put in your developers' tea that they don't check if opening a file actually worked?</rant>

Best Regards,
Andreas

 

[1] https://github.com/bareos/bareos/tree/master/core/src/vmware/vadp_dumper

Labels (4)
Tags (4)
0 Kudos
0 Replies