Bug 1625641 - qemu-system-x86_64: symbol lookup error: qemu-system-x86_64: undefined symbol: libusb_set_option
Summary: qemu-system-x86_64: symbol lookup error: qemu-system-x86_64: undefined symbol...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: qemu
Version: 29
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Fedora Virtualization Maintainers
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 1635865 (view as bug list)
Depends On:
Blocks: TRACKER-bugs-affecting-libguestfs
TreeView+ depends on / blocked
 
Reported: 2018-09-05 12:27 UTC by Richard W.M. Jones
Modified: 2019-06-20 21:09 UTC (History)
14 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-06-20 21:09:29 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Richard W.M. Jones 2018-09-05 12:27:19 UTC
Description of problem:

Cannot create the libguestfs appliance with latest libvirt.
See the full output below.

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

libvirt-4.6.0-1.fc29.x86_64
qemu-3.0.0-0.2.rc3.fc29.x86_64

How reproducible:

100%

Steps to Reproduce:
1. libguestfs-test-tool

Additional info:

     ************************************************************
     *                    IMPORTANT NOTICE
     *
     * When reporting bugs, include the COMPLETE, UNEDITED
     * output below in your bug report.
     *
     ************************************************************
PATH=/usr/libexec/python2-sphinx:/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/home/rjones/.local/bin:/home/rjones/bin
XDG_RUNTIME_DIR=/run/user/1000
SELinux: Enforcing
guestfs_get_append: (null)
guestfs_get_autosync: 1
guestfs_get_backend: libvirt
guestfs_get_backend_settings: []
guestfs_get_cachedir: /var/tmp
guestfs_get_hv: /usr/bin/qemu-kvm
guestfs_get_memsize: 500
guestfs_get_network: 0
guestfs_get_path: /usr/lib64/guestfs
guestfs_get_pgroup: 0
guestfs_get_program: libguestfs-test-tool
guestfs_get_recovery_proc: 1
guestfs_get_smp: 1
guestfs_get_sockdir: /run/user/1000
guestfs_get_tmpdir: /tmp
guestfs_get_trace: 0
guestfs_get_verbose: 1
host_cpu: x86_64
Launching appliance, timeout set to 600 seconds.
libguestfs: launch: program=libguestfs-test-tool
libguestfs: launch: version=1.39.8fedora=29,release=1.fc29,libvirt
libguestfs: launch: backend registered: unix
libguestfs: launch: backend registered: uml
libguestfs: launch: backend registered: libvirt
libguestfs: launch: backend registered: direct
libguestfs: launch: backend=libvirt
libguestfs: launch: tmpdir=/tmp/libguestfsambi2d
libguestfs: launch: umask=0002
libguestfs: launch: euid=1000
libguestfs: libvirt version = 4006000 (4.6.0)
libguestfs: guest random name = guestfs-1ty0tysxwm8mvdoq
libguestfs: connect to libvirt
libguestfs: opening libvirt handle: URI = qemu:///session, auth = default+wrapper, flags = 0
libguestfs: successfully opened libvirt handle: conn = 0x560794922090
libguestfs: unable to read qemu version from libvirt: internal error: Cannot find suitable emulator for x86_64 [code=1 int1=-1]
libguestfs: get libvirt capabilities
libguestfs: parsing capabilities XML
libguestfs: build appliance
libguestfs: begin building supermin appliance
libguestfs: run supermin
libguestfs: command: run: /usr/bin/supermin
libguestfs: command: run: \ --build
libguestfs: command: run: \ --verbose
libguestfs: command: run: \ --if-newer
libguestfs: command: run: \ --lock /var/tmp/.guestfs-1000/lock
libguestfs: command: run: \ --copy-kernel
libguestfs: command: run: \ -f ext2
libguestfs: command: run: \ --host-cpu x86_64
libguestfs: command: run: \ /usr/lib64/guestfs/supermin.d
libguestfs: command: run: \ -o /var/tmp/.guestfs-1000/appliance.d
supermin: version: 5.1.19
supermin: rpm: detected RPM version 4.14
supermin: package handler: fedora/rpm
supermin: acquiring lock on /var/tmp/.guestfs-1000/lock
supermin: if-newer: output does not need rebuilding
libguestfs: finished building supermin appliance
libguestfs: command: run: qemu-img
libguestfs: command: run: \ create
libguestfs: command: run: \ -f qcow2
libguestfs: command: run: \ -o backing_file=/var/tmp/.guestfs-1000/appliance.d/root,backing_fmt=raw
libguestfs: command: run: \ /tmp/libguestfsambi2d/overlay2.qcow2
Formatting '/tmp/libguestfsambi2d/overlay2.qcow2', fmt=qcow2 size=4294967296 backing_file=/var/tmp/.guestfs-1000/appliance.d/root backing_fmt=raw cluster_size=65536 lazy_refcounts=off refcount_bits=16
libguestfs: create libvirt XML
libguestfs: command: run: dmesg | grep -Eoh 'lpj=[[:digit:]]+'
libguestfs: read_lpj_from_dmesg: external command exited with error status 1
libguestfs: read_lpj_from_files: no boot messages files are readable
libguestfs: libvirt XML:\n<?xml version="1.0"?>\n<domain type="qemu" xmlns:qemu="http://libvirt.org/schemas/domain/qemu/1.0">\n  <name>guestfs-1ty0tysxwm8mvdoq</name>\n  <memory unit="MiB">500</memory>\n  <currentMemory unit="MiB">500</currentMemory>\n  <vcpu>1</vcpu>\n  <clock offset="utc">\n    <timer name="rtc" tickpolicy="catchup"/>\n    <timer name="pit" tickpolicy="delay"/>\n    <timer name="hpet" present="no"/>\n  </clock>\n  <os>\n    <type>hvm</type>\n    <kernel>/var/tmp/.guestfs-1000/appliance.d/kernel</kernel>\n    <initrd>/var/tmp/.guestfs-1000/appliance.d/initrd</initrd>\n    <cmdline>panic=1 console=ttyS0 edd=off udevtimeout=6000 udev.event-timeout=6000 no_timer_check printk.time=1 cgroup_disable=memory usbcore.nousb cryptomgr.notests tsc=reliable 8250.nr_uarts=1 root=/dev/sdb selinux=0 guestfs_verbose=1 TERM=xterm-256color</cmdline>\n    <bios useserial="yes"/>\n  </os>\n  <on_reboot>destroy</on_reboot>\n  <devices>\n    <rng model="virtio">\n      <backend model="random">/dev/urandom</backend>\n    </rng>\n    <controller type="scsi" index="0" model="virtio-scsi"/>\n    <disk device="disk" type="file">\n      <source file="/tmp/libguestfsambi2d/scratch1.img"/>\n      <target dev="sda" bus="scsi"/>\n      <driver name="qemu" type="raw" cache="unsafe"/>\n      <address type="drive" controller="0" bus="0" target="0" unit="0"/>\n    </disk>\n    <disk type="file" device="disk">\n      <source file="/tmp/libguestfsambi2d/overlay2.qcow2"/>\n      <target dev="sdb" bus="scsi"/>\n      <driver name="qemu" type="qcow2" cache="unsafe"/>\n      <address type="drive" controller="0" bus="0" target="1" unit="0"/>\n    </disk>\n    <serial type="unix">\n      <source mode="connect" path="/run/user/1000/libguestfs4HoktP/console.sock"/>\n      <target port="0"/>\n    </serial>\n    <channel type="unix">\n      <source mode="connect" path="/run/user/1000/libguestfs4HoktP/guestfsd.sock"/>\n      <target type="virtio" name="org.libguestfs.channel.0"/>\n    </channel>\n    <controller type="usb" model="none"/>\n    <memballoon model="none"/>\n  </devices>\n  <qemu:commandline>\n    <qemu:env name="TMPDIR" value="/var/tmp"/>\n  </qemu:commandline>\n</domain>\n
libguestfs: command: run: ls
libguestfs: command: run: \ -a
libguestfs: command: run: \ -l
libguestfs: command: run: \ -R
libguestfs: command: run: \ -Z /var/tmp/.guestfs-1000
libguestfs: /var/tmp/.guestfs-1000:
libguestfs: total 180
libguestfs: drwxr-xr-x.  3 rjones rjones unconfined_u:object_r:user_tmp_t:s0    174 Sep  5 13:26 .
libguestfs: drwxrwxrwt. 12 root   root   system_u:object_r:tmp_t:s0           16384 Sep  5 13:26 ..
libguestfs: drwxr-xr-x.  2 rjones rjones unconfined_u:object_r:user_tmp_t:s0     46 Sep  5 13:23 appliance.d
libguestfs: -rw-r--r--.  1 rjones rjones unconfined_u:object_r:user_tmp_t:s0      0 Aug 11 17:04 lock
libguestfs: -rw-rw-r--.  1 rjones rjones unconfined_u:object_r:user_tmp_t:s0  10303 Jul  7 07:15 qemu-281-1528225229.devices
libguestfs: -rw-rw-r--.  1 rjones rjones unconfined_u:object_r:user_tmp_t:s0  26160 Jul  7 07:15 qemu-281-1528225229.help
libguestfs: -rw-rw-r--.  1 rjones rjones unconfined_u:object_r:user_tmp_t:s0 117701 Jul  7 07:15 qemu-281-1528225229.qmp-schema
libguestfs: -rw-rw-r--.  1 rjones rjones unconfined_u:object_r:user_tmp_t:s0     35 Jul  7 07:15 qemu-281-1528225229.stat
libguestfs: 
libguestfs: /var/tmp/.guestfs-1000/appliance.d:
libguestfs: total 468140
libguestfs: drwxr-xr-x. 2 rjones rjones unconfined_u:object_r:user_tmp_t:s0         46 Sep  5 13:23 .
libguestfs: drwxr-xr-x. 3 rjones rjones unconfined_u:object_r:user_tmp_t:s0        174 Sep  5 13:26 ..
libguestfs: -rw-r--r--. 1 rjones rjones unconfined_u:object_r:user_tmp_t:s0     759296 Sep  5 13:26 initrd
libguestfs: -rwxr-xr-x. 1 rjones rjones unconfined_u:object_r:user_tmp_t:s0    8655560 Sep  5 13:26 kernel
libguestfs: -rw-r--r--. 1 rjones rjones unconfined_u:object_r:user_tmp_t:s0 4294967296 Sep  5 13:26 root
libguestfs: command: run: ls
libguestfs: command: run: \ -a
libguestfs: command: run: \ -l
libguestfs: command: run: \ -Z /run/user/1000/libguestfs4HoktP
libguestfs: total 0
libguestfs: drwx------.  2 rjones rjones unconfined_u:object_r:user_tmp_t:s0  80 Sep  5 13:26 .
libguestfs: drwx------. 15 rjones rjones system_u:object_r:tmpfs_t:s0        320 Sep  5 13:26 ..
libguestfs: srwxrwxr-x.  1 rjones rjones unconfined_u:object_r:user_tmp_t:s0   0 Sep  5 13:26 console.sock
libguestfs: srwxrwxr-x.  1 rjones rjones unconfined_u:object_r:user_tmp_t:s0   0 Sep  5 13:26 guestfsd.sock
libguestfs: launch libvirt guest
libguestfs: error: could not create appliance through libvirt.

Try running qemu directly without libvirt using this environment variable:
export LIBGUESTFS_BACKEND=direct

Original error from libvirt: XML error: No PCI buses available [code=27 int1=-1]
libguestfs: closing guestfs handle 0x5607949202e0 (state 0)
libguestfs: command: run: rm
libguestfs: command: run: \ -rf /tmp/libguestfsambi2d
libguestfs: command: run: rm
libguestfs: command: run: \ -rf /run/user/1000/libguestfs4HoktP

Comment 1 Richard W.M. Jones 2018-09-05 12:28:43 UTC
Similar bugs have been filed in the past, but only on MIPS (this
bug affects x86_64):

https://bugs.launchpad.net/ubuntu/+source/libvirt/+bug/1561497
https://bugzilla.redhat.com/show_bug.cgi?id=1432101

Comment 2 Richard W.M. Jones 2018-09-05 13:37:06 UTC
Actually I just noticed that the real error happens a bit earlier:

internal error: Cannot find suitable emulator for x86_64 [code=1 int1=-1]

And this is caused by qemu:

$ qemu-system-x86_64 --help
qemu-system-x86_64: symbol lookup error: qemu-system-x86_64: undefined symbol: libusb_set_option

Comment 3 Richard W.M. Jones 2018-09-05 13:39:13 UTC
Solution was to update libusbx to 1.0.22-1.fc29

Symbol versions would help here, I think.

Comment 4 Richard W.M. Jones 2018-10-03 19:57:20 UTC
*** Bug 1635865 has been marked as a duplicate of this bug. ***

Comment 5 Radek Vykydal 2018-10-08 13:20:49 UTC
Shouldn't we file some BZ or reassign this to fix the dependencies?
Eg updating @virtualization to latest on F28 Base cloud image breaks virtualization.

Comment 6 Cole Robinson 2018-10-08 23:48:22 UTC
I'll add a version check to the next build

Comment 7 Mohammed Naser 2019-05-10 05:15:10 UTC
This is still an issue with Fedora 28 at the moment.  We're running OpenStack Ansible against Fedora 28 in order to be able to be ready for CentOS 8 release and this is breaking us.

Comment 8 Cole Robinson 2019-06-20 21:09:29 UTC
Fedora 28 is end of life, and the lowest version of libusbx in fedora 29 is 1.0.22, so this isn't a problem anymore for any stable Fedora version


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