Hello list,
short description: in 1.38, after manual compilation on OL7.4, tests
fail; the closest error in logs is guestfsd --verbose failing for
libyajl not found, even if it appears correctly linked by the guestfsd
executable. Any help/suggestion?
My environment is a bit tricky as I work on Oracle Linux 7.4; in my
experience it is 99.9% assimilable to RHEL. The server I am using is
dedicated to an application embedding libguestfs to analyse the content
of VMs, and other things. I build libguestfs from source, instead of
relying on the version installed by yum (I also use VirtualBox in this
server, I need to use force_tcg=1 and I had issues with the pre-compiled
version when I tried). I install all the dependencies which I have to
compile manually in ~/install and prepend the following env to anything
(configure / make / make install and tests).
env LIBGUESTFS_BACKEND_SETTINGS="force_tcg=1" LIBGUESTFS_DEBUG=1
LIBGUESTFS_TRACE=1 CPPFLAGS="-I/home/vm/install/include
-I/home/vm/install/usr/include" LDFLAGS="-L/home/vm/install/lib
-L/home/vm/install/usr/lib" PATH="/home/vm/install/bin:$PATH"
After compilation, make check fails with a crash of the appliance; same
happens with libguestfs-test-tool. Here is the final part of the log
+ cmd='guestfsd --verbose'
+ test '' = 1
+ false
+ test '' = 1
+ echo guestfsd --verbose
guestfsd --verbose
+ guestfsd --verbose
guestfsd: error while loading shared libraries: libyajl.so.2: cannot
open shared object file: No such file or directory
+ sync
+ test '' = 1
+ reboot -f
Rebooting.
[ 6.194831] kvm: exiting hardware virtualization
[ 6.195551] sd 2:0:1:0: [sdb] Synchronizing SCSI cache
[ 6.196217] sd 2:0:0:0: [sda] Synchronizing SCSI cache
[ 6.197375] reboot: Restarting system
[ 6.197484] reboot: machine restart
libguestfs: error: appliance closed the connection unexpectedly, see
earlier error messages
libguestfs: child_cleanup: 0xf4a160: child process died
libguestfs: sending SIGTERM to process 20925
libguestfs: qemu maxrss 342340K
libguestfs: error: guestfs_launch failed, see earlier error messages
libguestfs: trace: launch = -1 (error)
libguestfs: trace: close
libguestfs: closing guestfs handle 0xf4a160 (state 0)
libguestfs: command: run: rm
libguestfs: command: run: \ -rf /tmp/libguestfsGxWqKQ
libguestfs: command: run: rm
libguestfs: command: run: \ -rf /run/user/500/libguestfssLfpo6
My guess (not much sustained by data, other than message proximity) is
that guestfsd cannot find libyajl.so.2, the verbose mode fails, and even
if it finishes, perhaps an error message in the log makes the test fail.
I am using yajl in yum, but I also tried to compile version 2.1.0
manually and it did not change
$ sudo yum install yajl yajl-devel
Loaded plugins: ulninfo
Package yajl-2.0.4-4.el7.x86_64 already installed and latest version
Package yajl-devel-2.0.4-4.el7.x86_64 already installed and latest version
The guestfsd executable in appliance/supermin.d/ seems to link yajl
correctly
$ cp -r libguestfs-1.38.0/appliance/supermin.d/*tar.gz /tmp/supermin.d/
$ cd /tmp/supermin.d/
$ for i in *tar.gz; do tar -xzf $i; done
$ ldd ./usr/sbin/guestfsd
linux-vdso.so.1 => (0x00007fff4392d000)
libacl.so.1 => /lib64/libacl.so.1 (0x00007f1a8919e000)
libcap.so.2 => /lib64/libcap.so.2 (0x00007f1a88f99000)
libyajl.so.2 => /lib64/libyajl.so.2 (0x00007f1a88d8e000)
libselinux.so.1 => /lib64/libselinux.so.1 (0x00007f1a88b67000)
libaugeas.so.0 => /lib64/libaugeas.so.0 (0x00007f1a8891b000)
libhivex.so.0 => /home/vm/install/lib/libhivex.so.0
(0x00007f1a88708000)
libiconv.so.2 => /home/vm/install/lib/libiconv.so.2
(0x00007f1a88422000)
libsystemd.so.0 => /lib64/libsystemd.so.0 (0x00007f1a883fa000)
libpcre.so.1 => /lib64/libpcre.so.1 (0x00007f1a88197000)
libdl.so.2 => /lib64/libdl.so.2 (0x00007f1a87f93000)
libm.so.6 => /lib64/libm.so.6 (0x00007f1a87c91000)
libc.so.6 => /lib64/libc.so.6 (0x00007f1a878cd000)
libattr.so.1 => /lib64/libattr.so.1 (0x00007f1a876c8000)
/lib64/ld-linux-x86-64.so.2 (0x000055c87ee30000)
libfa.so.1 => /lib64/libfa.so.1 (0x00007f1a874b5000)
libxml2.so.2 => /lib64/libxml2.so.2 (0x00007f1a8714a000)
libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00007f1a86f34000)
librt.so.1 => /lib64/librt.so.1 (0x00007f1a86d2c000)
liblzma.so.5 => /lib64/liblzma.so.5 (0x00007f1a86b05000)
libgcrypt.so.11 => /lib64/libgcrypt.so.11 (0x00007f1a86884000)
libgpg-error.so.0 => /lib64/libgpg-error.so.0 (0x00007f1a8667f000)
libresolv.so.2 => /lib64/libresolv.so.2 (0x00007f1a86464000)
libdw.so.1 => /lib64/libdw.so.1 (0x00007f1a8621d000)
libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f1a86001000)
libz.so.1 => /lib64/libz.so.1 (0x00007f1a85dea000)
libelf.so.1 => /lib64/libelf.so.1 (0x00007f1a85bd2000)
libbz2.so.1 => /lib64/libbz2.so.1 (0x00007f1a859c1000)
$ file /lib64/libyajl.so.2.0.4 /lib64/libyajl.so.2
/lib64/libyajl.so.2.0.4: ELF 64-bit LSB shared object, x86-64, version 1
(SYSV), dynamically linked,
BuildID[sha1]=b568a12b3f954f8a7fc2be567df484ccc5b1e058, stripped
/lib64/libyajl.so.2: symbolic link to `libyajl.so.2.0.4'
Attached the output of ./libguestfs-test-tool run using this line
$ env LIBGUESTFS_BACKEND_SETTINGS="force_tcg=1"
LIBGUESTFS_PATH=/home/vm/building7.4/deps4libguestfs/libguestfs-1.38.0/appliance
LIBGUESTFS_DEBUG=1 LIBGUESTFS_TRACE=1
CPPFLAGS="-I/home/vm/install/include -I/home/vm/install/usr/include"
LDFLAGS="-L/home/vm/install/lib -L/home/vm/install/usr/lib"
PATH="/home/vm/install/bin:$PATH" ./libguestfs-test-tool >
libyajl.test-fail.out 2>&1
I am either missing something trivial OR this is not the cause of
failure. In both cases, any help is greatly appreciated
Thanks in advance