Bug 995883

Summary: qemu-system-x86_64: symbol lookup error: qemu-system-x86_64: undefined symbol: rbd_aio_flush
Product: [Fedora] Fedora Reporter: Steve Tyler <stephent98>
Component: qemuAssignee: Fedora Virtualization Maintainers <virt-maint>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: amit.shah, berrange, cfergeau, crobinso, crosa, dwmw2, fzatlouk, itamar, lmr, pbonzini, rjones, scottt.tw, stephent98, virt-maint
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1024781 (view as bug list) Environment:
Last Closed: 2013-08-20 19:51:53 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 910269, 1024781    

Description Steve Tyler 2013-08-11 19:25:11 UTC
Description of problem:
qemu is not pulling in an updated ceph-libs when it is installed.

See Bug 993423, Comment 19:
Bug 993423 - Gnome Boxes fails to setup Box 

Version-Release number of selected component (if applicable):
qemu-system-x86-1.5.2-4.fc20.x86_64
qemu-img-1.5.2-4.fc20.x86_64
ceph-libs-0.56.4-1.fc20.x86_64

How reproducible:
Always.

Steps to Reproduce:
1. Install ceph-libs-0.56.4-1.fc20.x86_64.
2. Install qemu.

Actual results:
ceph-libs is not updated.

$ qemu-system-x86_64 -display none
qemu-system-x86_64: symbol lookup error: qemu-system-x86_64: undefined symbol: rbd_aio_flush

Expected results:
ceph-libs is updated to:
ceph-libs-0.61.7-2.fc20.x86_64

Additional info:
See also Bug 993423, Comment 16:
With ceph-libs-0.61.7-2.fc20.x86_64,
librbd.so.1 provides rbd_flush and rbd_aio_flush.

Comment 1 Lucas Meneghel Rodrigues 2013-08-20 13:04:18 UTC
I hit this bug yesterday, when setting up Fedora 19 KVM test jobs. Any attempt to use qemu-kvm will fail with:

CmdError: Command </usr/bin/qemu-kvm -cpu '?'> failed, rc=127, Command returned non-zero exit status    [context: preprocessing]
* Command:
    /usr/bin/qemu-kvm -cpu '?'
Exit status: 127
Duration: 0.0959279537201

stderr:
/usr/bin/qemu-system-x86_64: symbol lookup error: /usr/bin/qemu-system-x86_64: undefined symbol: rbd_aio_flush

Comment 2 Steve Tyler 2013-08-20 13:29:22 UTC
Could you post the versions you have installed?
$ rpm -q qemu-kvm ceph-libs

Having you tried updating ceph-libs?
$ sudo yum update ceph-libs

The latest F19 versions are:
$ sudo repoquery --arch=x86_64 qemu-kvm ceph-libs
ceph-libs-0:0.61.7-1.fc19.x86_64
qemu-kvm-2:1.4.2-5.fc19.x86_64

Comment 3 Cole Robinson 2013-08-20 14:48:02 UTC
*** Bug 998692 has been marked as a duplicate of this bug. ***

Comment 4 Lucas Meneghel Rodrigues 2013-08-20 17:00:53 UTC
No ceph-libs installed:

[root@virtlab201 ~]# rpm -q qemu-kvm ceph-libs
qemu-kvm-0.12.1.2-2.355.el6_4.7.x86_64
package ceph-libs is not installed

Comment 5 Cole Robinson 2013-08-20 17:23:52 UTC
(In reply to Lucas Meneghel Rodrigues from comment #4)
> No ceph-libs installed:
> 
> [root@virtlab201 ~]# rpm -q qemu-kvm ceph-libs
> qemu-kvm-0.12.1.2-2.355.el6_4.7.x86_64
> package ceph-libs is not installed

Something weird is going on there, that's a RHEL6 qemu-kvm package.

I tried to reproduce on F19 by downgrading ceph-libs and qemu\*, but everything worked fine. rawhide is definitely affected though and needs a dep on newer ceph, pushing a build now

Comment 6 Lucas Meneghel Rodrigues 2013-08-20 17:34:28 UTC
Yes, turns out that the machine I reserved to reproduce the bug got unlocked, and RHEL6 was installed on it instead.

My apologies, I did not notice I was on RHEL6 by the time I made the check.

Comment 7 Cole Robinson 2013-08-20 19:51:53 UTC
Fixed in qemu-1.6.0-3.fc20

Comment 8 Steve Tyler 2013-08-20 20:27:45 UTC
Thanks, Cole.[1]

I was wondering why the Requires couldn't be done automatically:
+# ceph added new symbol rbd_aio_flush which qemu wants to use, but ceph
+# lacks symbol versioning so RPM doesn't pick up the dependency.

Is the lack of symbol versioning a Fedora problem or an upstream problem?

[1] Require newer ceph-libs to fix symbol error (bz #995883)
http://pkgs.fedoraproject.org/cgit/qemu.git/commit/?id=f950cd7985506fd67b1bf318a842b92c2d09bb5f

Comment 9 Richard W.M. Jones 2013-08-20 20:36:43 UTC
(In reply to Steve Tyler from comment #8)
> Thanks, Cole.[1]
> 
> I was wondering why the Requires couldn't be done automatically:
> +# ceph added new symbol rbd_aio_flush which qemu wants to use, but ceph
> +# lacks symbol versioning so RPM doesn't pick up the dependency.
> 
> Is the lack of symbol versioning a Fedora problem or an upstream problem?

This is an upstream problem.

Fedora (actually RPM) will extract the basic fact that
the qemu binary needs ceph-libs, but with more sophisticated
symbol versioning upstream it would be possible for RPM to
determine precisely which version of ceph-libs is needed.

See for example:
http://libvirt.org/git/?p=libvirt.git;a=blob;f=src/libvirt_public.syms;h=bbdf78ac222f14c39a5bd3cc264dc9aa7f54a70b;hb=HEAD

Comment 10 Steve Tyler 2013-08-20 21:17:01 UTC
Thanks, Richard. That's very interesting. I copied your explanation to:
Bug 999087, Comment 3:
Bug 999087 - Use symbol versioning to improve RPM autodependencies

Thanks for opening Bug 999087, Cole.