Bug 1867847

Summary: [ppc] virt module 7629: /usr/libexec/qemu-kvm: undefined symbol: fdt_check_full, version LIBFDT_1.2
Product: Red Hat Enterprise Linux 8 Reporter: Yihuang Yu <yihyu>
Component: qemu-kvmAssignee: Miroslav Rezanina <mrezanin>
qemu-kvm sub component: General QA Contact: Yihuang Yu <yihyu>
Status: CLOSED ERRATA Docs Contact:
Severity: urgent    
Priority: urgent CC: dgibson, jinzhao, juzhang, lersek, mrezanin, qzhang, virt-maint
Version: 8.3Keywords: Triaged
Target Milestone: rc   
Target Release: 8.3   
Hardware: ppc64le   
OS: Linux   
Whiteboard:
Fixed In Version: qemu-kvm-4.2.0-33.module+el8.3.0+7705+f09d73e4 Doc Type: If docs needed, set a value
Doc Text:
If this bug requires documentation, please select an appropriate Doc Type value.AU
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-11-04 02:54:17 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:

Description Yihuang Yu 2020-08-11 01:27:53 UTC
Description of problem:
The qemu-kvm of module 7629 requires a newer version of libfdt, when the host install libfdt-1.4.6-1.el8.ppc64le, qemu-kvm will raise the exception "/usr/libexec/qemu-kvm: symbol lookup error: /usr/libexec/qemu-kvm: undefined symbol: fdt_check_full, version LIBFDT_1.2", and it looks like the reported libfdt version is wrong.

Version-Release number of selected component (if applicable):
qemu-kvm-4.2.0-32.module+el8.3.0+7629+c86ce105.ppc64le
libfdt-1.4.6-1.el8.ppc64le

How reproducible:
awlays

Steps to Reproduce:
1. Install virt module 7629

2. Get the qemu version
# /usr/libexec/qemu-kvm -version

Actual results:
/usr/libexec/qemu-kvm: symbol lookup error: /usr/libexec/qemu-kvm: undefined symbol: fdt_check_full, version LIBFDT_1.2

Expected results:
QEMU emulator version 4.2.0 (qemu-kvm-4.2.0-32.module+el8.3.0+7629+c86ce105)
Copyright (c) 2003-2019 Fabrice Bellard and the QEMU Project developers

Additional info:
The host distro tree is "RHEL-8.3.0-20200807.n.0 BaseOS ppc64le", the latest distro tree includes "libfdt-1.6.0-1.el8.ppc64le", which can solve this problem. I can not trigger this problem on aarch64 platform with the same virt module and host distro.
Since it will block the CI job, I would highlight it here.

Comment 1 David Gibson 2020-08-12 03:12:00 UTC
This is essentially a packaging / compose issue.

Mirek, can you advise what we need to do here?  I'm guessing make sure the new libfdt is in the compose and update the dependency version in the qemu-kvm rpm.

Comment 2 Miroslav Rezanina 2020-08-12 06:02:22 UTC
(In reply to David Gibson from comment #1)
> This is essentially a packaging / compose issue.
> 
> Mirek, can you advise what we need to do here?  I'm guessing make sure the
> new libfdt is in the compose and update the dependency version in the
> qemu-kvm rpm.

New dtc package should be already in compose so we just need bump dependency line in spec file. Taking care of this.

Comment 3 David Gibson 2020-08-12 07:14:28 UTC
Great, thanks.

Comment 5 Laszlo Ersek 2020-08-12 11:28:51 UTC
The fdt_check_full() function was introduced in upstream DTC commit 4b8fcc3d015c ("libfdt: Add fdt_check_full() function", 2018-06-07), part of v1.4.7.

Down-stream, we had packaged 1.4.6, and then advanced to 1.6.0, under bug 1679676.

Therefore the BuildRequires bump is justified.


Side comment regarding upstream QEMU:

while upstream QEMU commit fea35ca4b8e6 ("ppc/spapr: Receive and store device tree blob from SLOF", 2019-01-09) modified the "configure" script to look for fdt_check_full() rather than fdt_first_subnode(), the same commit didn't modify the following lines:

>   # and test for required functions to make sure we are on a version >= 1.4.2

and

>           error_exit "DTC (libfdt) version >= 1.4.2 not present." \

both originating from commit 6e85fce0225f ("dtc: Update requirement to v1.4.2", 2017-02-21). I think this is worth fixing, up-stream.

Comment 10 Yihuang Yu 2020-08-21 01:25:22 UTC
Now if the OS cannot provide a version of libfdt >= 1.6.0, the installation process will be terminated.

- RHEL-8.3.0-20200804.n.0:
libfdt-1.4.6-1.el8.ppc64le : Device tree library
Repo        : beaker-AppStream
Matched from:
Provide    : libfdt = 1.4.6-1.el8

# dnf install qemu-kvm
...
...
Error: 
 Problem: package qemu-kvm-15:4.2.0-33.module+el8.3.0+7705+f09d73e4.ppc64le requires qemu-kvm-core = 15:4.2.0-33.module+el8.3.0+7705+f09d73e4, but none of the providers can be installed
  - conflicting requests
  - nothing provides libfdt >= 1.6.0 needed by qemu-kvm-core-15:4.2.0-33.module+el8.3.0+7705+f09d73e4.ppc64le
(try to add '--skip-broken' to skip uninstallable packages or '--nobest' to use not only best candidate packages)


- RHEL-8.3.0-20200819.n.1:
libfdt-1.6.0-1.el8.ppc64le : Device tree library
Repo        : beaker-AppStream
Matched from:
Provide    : libfdt = 1.6.0-1.el8

# dnf install qemu-kvm
...
...
Dependencies resolved.
=====================================================================================================================================================================================
 Package                                         Architecture               Version                                                        Repository                           Size
=====================================================================================================================================================================================
Installing:
 qemu-kvm                                        ppc64le                    15:4.2.0-33.module+el8.3.0+7705+f09d73e4                       virt-7705                           105 k
Installing dependencies:
...
...
 libfdt                                          ppc64le                    1.6.0-1.el8                                                    beaker-AppStream                     33 k


So move the status to "VERIFIED".

Comment 13 errata-xmlrpc 2020-11-04 02:54:17 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Moderate: virt:rhel and virt-devel:rhel security, bug fix, and enhancement update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2020:4676