Bug 1855816

Summary: Renaming of libbpf to bcc_libbpf causes update issues
Product: Red Hat Enterprise Linux 8 Reporter: Kyle Walker <kwalker>
Component: libbpfAssignee: Jiri Olsa <jolsa>
Status: CLOSED ERRATA QA Contact: Martin Cermak <mcermak>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 8.3CC: alsouza, jhsiao, jmarchan, jolsa, mcermak, rdossant, skozina
Target Milestone: rcFlags: pm-rhel: mirror+
Target Release: 8.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: libbpf-0.0.8-3.el8 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-11-04 02:11:33 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: 1819241    

Description Kyle Walker 2020-07-10 15:04:49 UTC
Description of problem:
 When a customer has a bcc revision older than bcc-0.11.0-2.el8.x86_64.rpm, a libbpf library is present in the /usr/lib64/ directory as the following:

# rpm -qlp bcc-0.8.0-4.el8.x86_64.rpm  | grep bpf
/usr/lib64/libbpf.so.0
/usr/lib64/libbpf.so.0.8.0

This conflicts with the libbpf component introduced in the 8.2.0 release.

# rpm -qlp libbpf-0.0.4-5.el8.x86_64.rpm  | grep bpf
/usr/lib64/libbpf.so.0
/usr/lib64/libbpf.so.0.0.4

As a result, customers using "yum update --security" encounter failures.


Version-Release number of selected component (if applicable):
 bcc-0.11.0-2.el8

How reproducible:
 Easily

Steps to Reproduce:
1. Install bcc-0.8.0-4.el8 or bcc-0.7.0-5.el8
    # yum install bcc-0.8.0-4.el8

2. Install perf-4.18.0-147.5.1.el8_1.x86_64
    # yum install perf-4.18.0-147.5.1.el8_1.x86_64

3. Use the security modifier for yum update
    # yum update --security

Actual results:
        # yum update --security
    Updating Subscription Management repositories.
    Last metadata expiration check: 0:57:49 ago on Fri 10 Jul 2020 08:37:12 AM EDT.
    Dependencies resolved.
    =========================================================================================================
     Package       Arch   Version                                     Repository                        Size
    =========================================================================================================
    Upgrading:
     gnutls        x86_64 3.6.8-11.el8_2                              rhel-8-for-x86_64-baseos-rpms    915 k
     libnghttp2    x86_64 1.33.0-3.el8_2.1                            rhel-8-for-x86_64-baseos-rpms     77 k
     perf          x86_64 4.18.0-193.6.3.el8_2                        rhel-8-for-x86_64-baseos-rpms    4.7 M
     qemu-guest-agent
                   x86_64 15:2.12.0-99.module+el8.2.0+6870+55b789b4.2 rhel-8-for-x86_64-appstream-rpms 217 k
    Installing dependencies:
     libbpf        x86_64 0.0.4-5.el8                                 rhel-8-for-x86_64-baseos-rpms     72 k
    
    Transaction Summary
    =========================================================================================================
    Install  1 Package
    Upgrade  4 Packages
    
    Total size: 6.0 M
    Is this ok [y/N]: y
    Downloading Packages:
    [SKIPPED] libbpf-0.0.4-5.el8.x86_64.rpm: Already downloaded                                             
    [SKIPPED] perf-4.18.0-193.6.3.el8_2.x86_64.rpm: Already downloaded                                      
    [SKIPPED] gnutls-3.6.8-11.el8_2.x86_64.rpm: Already downloaded                                          
    [SKIPPED] libnghttp2-1.33.0-3.el8_2.1.x86_64.rpm: Already downloaded                                    
    [SKIPPED] qemu-guest-agent-2.12.0-99.module+el8.2.0+6870+55b789b4.2.x86_64.rpm: Already downloaded      
    Running transaction check
    Transaction check succeeded.
    Running transaction test
    The downloaded packages were saved in cache until the next successful transaction.
    You can remove cached packages by executing 'yum clean packages'.
    Error: Transaction test error:
      file /usr/lib64/libbpf.so.0 from install of libbpf-0.0.4-5.el8.x86_64 conflicts with file from package bcc-0.8.0-4.el8.x86_64

Expected results:

    # yum update --security
    Updating Subscription Management repositories.
    Last metadata expiration check: 1:16:47 ago on Fri 10 Jul 2020 08:37:12 AM EDT.
    Dependencies resolved.
    =========================================================================================================
     Package       Arch   Version                                     Repository                        Size
    =========================================================================================================
    Upgrading:
     gnutls        x86_64 3.6.8-11.el8_2                              rhel-8-for-x86_64-baseos-rpms    915 k
     libnghttp2    x86_64 1.33.0-3.el8_2.1                            rhel-8-for-x86_64-baseos-rpms     77 k
     perf          x86_64 4.18.0-193.6.3.el8_2                        rhel-8-for-x86_64-baseos-rpms    4.7 M
     qemu-guest-agent
                   x86_64 15:2.12.0-99.module+el8.2.0+6870+55b789b4.2 rhel-8-for-x86_64-appstream-rpms 217 k
    Installing dependencies:
     libbpf        x86_64 0.0.4-5.el8                                 rhel-8-for-x86_64-baseos-rpms     72 k
    
    Transaction Summary
    =========================================================================================================
    Install  1 Package
    Upgrade  4 Packages
    
    Total download size: 6.0 M
    Is this ok [y/N]: y
    Downloading Packages:
    (1/5): libbpf-0.0.4-5.el8.x86_64.rpm                                     261 kB/s |  72 kB     00:00    
    (2/5): gnutls-3.6.8-11.el8_2.x86_64.rpm                                  2.4 MB/s | 915 kB     00:00    
    (3/5): libnghttp2-1.33.0-3.el8_2.1.x86_64.rpm                            425 kB/s |  77 kB     00:00    
    (4/5): perf-4.18.0-193.6.3.el8_2.x86_64.rpm                              9.2 MB/s | 4.7 MB     00:00    
    (5/5): qemu-guest-agent-2.12.0-99.module+el8.2.0+6870+55b789b4.2.x86_64. 1.3 MB/s | 217 kB     00:00    
    ---------------------------------------------------------------------------------------------------------
    Total                                                                     11 MB/s | 6.0 MB     00:00     
    Running transaction check
    Transaction check succeeded.
    Running transaction test
    Transaction test succeeded.
    Running transaction
      Preparing        :                                                                                 1/1 
      Running scriptlet: libbpf-0.0.4-5.el8.x86_64                                                       1/1 
      Installing       : libbpf-0.0.4-5.el8.x86_64                                                       1/9 
      Upgrading        : perf-4.18.0-193.6.3.el8_2.x86_64                                                2/9 
      Upgrading        : qemu-guest-agent-15:2.12.0-99.module+el8.2.0+6870+55b789b4.2.x86_64             3/9 
      Upgrading        : libnghttp2-1.33.0-3.el8_2.1.x86_64                                              4/9 
      Upgrading        : gnutls-3.6.8-11.el8_2.x86_64                                                    5/9 
      Cleanup          : qemu-guest-agent-15:2.12.0-99.module+el8.2.0+5827+8c39933c.x86_64               6/9 
      Cleanup          : libnghttp2-1.33.0-1.el8_0.1.x86_64                                              7/9 
      Cleanup          : gnutls-3.6.8-10.el8_2.x86_64                                                    8/9 
      Cleanup          : perf-4.18.0-147.5.1.el8_1.x86_64                                                9/9 
      Running scriptlet: perf-4.18.0-147.5.1.el8_1.x86_64                                                9/9 
      Verifying        : libbpf-0.0.4-5.el8.x86_64                                                       1/9 
      Verifying        : perf-4.18.0-193.6.3.el8_2.x86_64                                                2/9 
      Verifying        : perf-4.18.0-147.5.1.el8_1.x86_64                                                3/9 
      Verifying        : gnutls-3.6.8-11.el8_2.x86_64                                                    4/9 
      Verifying        : gnutls-3.6.8-10.el8_2.x86_64                                                    5/9 
      Verifying        : libnghttp2-1.33.0-3.el8_2.1.x86_64                                              6/9 
      Verifying        : libnghttp2-1.33.0-1.el8_0.1.x86_64                                              7/9 
      Verifying        : qemu-guest-agent-15:2.12.0-99.module+el8.2.0+6870+55b789b4.2.x86_64             8/9 
      Verifying        : qemu-guest-agent-15:2.12.0-99.module+el8.2.0+5827+8c39933c.x86_64               9/9 
    Installed products updated.
    
    Upgraded:
      gnutls-3.6.8-11.el8_2.x86_64      libnghttp2-1.33.0-3.el8_2.1.x86_64                                  
      perf-4.18.0-193.6.3.el8_2.x86_64  qemu-guest-agent-15:2.12.0-99.module+el8.2.0+6870+55b789b4.2.x86_64 
    
    Installed:
      libbpf-0.0.4-5.el8.x86_64                                                                              
    
    Complete!
    
Additional info:

 In the above, perf has a security errata notice and gets pulled into the transaction. The libbpf component gets added as a dependency of the new perf revision, but it then conflicts with the already installed older bcc revision.

 The simplest workaround is to just update bcc prior to issuing the above update.

    # yum update bcc -y

 That will avoid the condition by updating to a revision of bcc that already has the libbcc_bpf rename in place.

    # rpm -qlp bcc-0.11.0-2.el8.x86_64.rpm | grep bpf
    /usr/lib64/libbcc_bpf.so.0
    /usr/lib64/libbcc_bpf.so.0.11.0

Comment 1 Jerome Marchand 2020-07-20 09:15:41 UTC
(In reply to Kyle Walker from comment #0)
> Description of problem:
>  When a customer has a bcc revision older than bcc-0.11.0-2.el8.x86_64.rpm,
> a libbpf library is present in the /usr/lib64/ directory as the following:
> 
> # rpm -qlp bcc-0.8.0-4.el8.x86_64.rpm  | grep bpf
> /usr/lib64/libbpf.so.0
> /usr/lib64/libbpf.so.0.8.0
> 
> This conflicts with the libbpf component introduced in the 8.2.0 release.
> 
> # rpm -qlp libbpf-0.0.4-5.el8.x86_64.rpm  | grep bpf
> /usr/lib64/libbpf.so.0
> /usr/lib64/libbpf.so.0.0.4
> 
> As a result, customers using "yum update --security" encounter failures.
> 
> 
> Version-Release number of selected component (if applicable):
>  bcc-0.11.0-2.el8
> 
> How reproducible:
>  Easily
> 
> Steps to Reproduce:
> 1. Install bcc-0.8.0-4.el8 or bcc-0.7.0-5.el8
>     # yum install bcc-0.8.0-4.el8
> 
> 2. Install perf-4.18.0-147.5.1.el8_1.x86_64
>     # yum install perf-4.18.0-147.5.1.el8_1.x86_64
> 
> 3. Use the security modifier for yum update
>     # yum update --security
> 
> Actual results:
>         # yum update --security
>     Updating Subscription Management repositories.
>     Last metadata expiration check: 0:57:49 ago on Fri 10 Jul 2020 08:37:12
> AM EDT.
>     Dependencies resolved.
>    
> =============================================================================
> ============================
>      Package       Arch   Version                                    
> Repository                        Size
>    
> =============================================================================
> ============================
>     Upgrading:
>      gnutls        x86_64 3.6.8-11.el8_2                             
> rhel-8-for-x86_64-baseos-rpms    915 k
>      libnghttp2    x86_64 1.33.0-3.el8_2.1                           
> rhel-8-for-x86_64-baseos-rpms     77 k
>      perf          x86_64 4.18.0-193.6.3.el8_2                       
> rhel-8-for-x86_64-baseos-rpms    4.7 M
>      qemu-guest-agent
>                    x86_64 15:2.12.0-99.module+el8.2.0+6870+55b789b4.2
> rhel-8-for-x86_64-appstream-rpms 217 k
>     Installing dependencies:
>      libbpf        x86_64 0.0.4-5.el8                                
> rhel-8-for-x86_64-baseos-rpms     72 k
>     
>     Transaction Summary
>    
> =============================================================================
> ============================
>     Install  1 Package
>     Upgrade  4 Packages
>     
>     Total size: 6.0 M
>     Is this ok [y/N]: y
>     Downloading Packages:
>     [SKIPPED] libbpf-0.0.4-5.el8.x86_64.rpm: Already downloaded             
> 
>     [SKIPPED] perf-4.18.0-193.6.3.el8_2.x86_64.rpm: Already downloaded      
> 
>     [SKIPPED] gnutls-3.6.8-11.el8_2.x86_64.rpm: Already downloaded          
> 
>     [SKIPPED] libnghttp2-1.33.0-3.el8_2.1.x86_64.rpm: Already downloaded    
> 
>     [SKIPPED]
> qemu-guest-agent-2.12.0-99.module+el8.2.0+6870+55b789b4.2.x86_64.rpm:
> Already downloaded      
>     Running transaction check
>     Transaction check succeeded.
>     Running transaction test
>     The downloaded packages were saved in cache until the next successful
> transaction.
>     You can remove cached packages by executing 'yum clean packages'.
>     Error: Transaction test error:
>       file /usr/lib64/libbpf.so.0 from install of libbpf-0.0.4-5.el8.x86_64
> conflicts with file from package bcc-0.8.0-4.el8.x86_64
> 
> Expected results:
> 
>     # yum update --security
>     Updating Subscription Management repositories.
>     Last metadata expiration check: 1:16:47 ago on Fri 10 Jul 2020 08:37:12
> AM EDT.
>     Dependencies resolved.
>    
> =============================================================================
> ============================
>      Package       Arch   Version                                    
> Repository                        Size
>    
> =============================================================================
> ============================
>     Upgrading:
>      gnutls        x86_64 3.6.8-11.el8_2                             
> rhel-8-for-x86_64-baseos-rpms    915 k
>      libnghttp2    x86_64 1.33.0-3.el8_2.1                           
> rhel-8-for-x86_64-baseos-rpms     77 k
>      perf          x86_64 4.18.0-193.6.3.el8_2                       
> rhel-8-for-x86_64-baseos-rpms    4.7 M
>      qemu-guest-agent
>                    x86_64 15:2.12.0-99.module+el8.2.0+6870+55b789b4.2
> rhel-8-for-x86_64-appstream-rpms 217 k
>     Installing dependencies:
>      libbpf        x86_64 0.0.4-5.el8                                
> rhel-8-for-x86_64-baseos-rpms     72 k
>     
>     Transaction Summary
>    
> =============================================================================
> ============================
>     Install  1 Package
>     Upgrade  4 Packages
>     
>     Total download size: 6.0 M
>     Is this ok [y/N]: y
>     Downloading Packages:
>     (1/5): libbpf-0.0.4-5.el8.x86_64.rpm                                    
> 261 kB/s |  72 kB     00:00    
>     (2/5): gnutls-3.6.8-11.el8_2.x86_64.rpm                                 
> 2.4 MB/s | 915 kB     00:00    
>     (3/5): libnghttp2-1.33.0-3.el8_2.1.x86_64.rpm                           
> 425 kB/s |  77 kB     00:00    
>     (4/5): perf-4.18.0-193.6.3.el8_2.x86_64.rpm                             
> 9.2 MB/s | 4.7 MB     00:00    
>     (5/5): qemu-guest-agent-2.12.0-99.module+el8.2.0+6870+55b789b4.2.x86_64.
> 1.3 MB/s | 217 kB     00:00    
>    
> -----------------------------------------------------------------------------
> ----------------------------
>     Total                                                                   
> 11 MB/s | 6.0 MB     00:00     
>     Running transaction check
>     Transaction check succeeded.
>     Running transaction test
>     Transaction test succeeded.
>     Running transaction
>       Preparing        :                                                    
> 1/1 
>       Running scriptlet: libbpf-0.0.4-5.el8.x86_64                          
> 1/1 
>       Installing       : libbpf-0.0.4-5.el8.x86_64                          
> 1/9 
>       Upgrading        : perf-4.18.0-193.6.3.el8_2.x86_64                   
> 2/9 
>       Upgrading        :
> qemu-guest-agent-15:2.12.0-99.module+el8.2.0+6870+55b789b4.2.x86_64         
> 3/9 
>       Upgrading        : libnghttp2-1.33.0-3.el8_2.1.x86_64                 
> 4/9 
>       Upgrading        : gnutls-3.6.8-11.el8_2.x86_64                       
> 5/9 
>       Cleanup          :
> qemu-guest-agent-15:2.12.0-99.module+el8.2.0+5827+8c39933c.x86_64           
> 6/9 
>       Cleanup          : libnghttp2-1.33.0-1.el8_0.1.x86_64                 
> 7/9 
>       Cleanup          : gnutls-3.6.8-10.el8_2.x86_64                       
> 8/9 
>       Cleanup          : perf-4.18.0-147.5.1.el8_1.x86_64                   
> 9/9 
>       Running scriptlet: perf-4.18.0-147.5.1.el8_1.x86_64                   
> 9/9 
>       Verifying        : libbpf-0.0.4-5.el8.x86_64                          
> 1/9 
>       Verifying        : perf-4.18.0-193.6.3.el8_2.x86_64                   
> 2/9 
>       Verifying        : perf-4.18.0-147.5.1.el8_1.x86_64                   
> 3/9 
>       Verifying        : gnutls-3.6.8-11.el8_2.x86_64                       
> 4/9 
>       Verifying        : gnutls-3.6.8-10.el8_2.x86_64                       
> 5/9 
>       Verifying        : libnghttp2-1.33.0-3.el8_2.1.x86_64                 
> 6/9 
>       Verifying        : libnghttp2-1.33.0-1.el8_0.1.x86_64                 
> 7/9 
>       Verifying        :
> qemu-guest-agent-15:2.12.0-99.module+el8.2.0+6870+55b789b4.2.x86_64         
> 8/9 
>       Verifying        :
> qemu-guest-agent-15:2.12.0-99.module+el8.2.0+5827+8c39933c.x86_64           
> 9/9 
>     Installed products updated.
>     
>     Upgraded:
>       gnutls-3.6.8-11.el8_2.x86_64      libnghttp2-1.33.0-3.el8_2.1.x86_64  
> 
>       perf-4.18.0-193.6.3.el8_2.x86_64 
> qemu-guest-agent-15:2.12.0-99.module+el8.2.0+6870+55b789b4.2.x86_64 
>     
>     Installed:
>       libbpf-0.0.4-5.el8.x86_64                                             
> 
>     
>     Complete!
>     
> Additional info:
> 
>  In the above, perf has a security errata notice and gets pulled into the
> transaction. The libbpf component gets added as a dependency of the new perf
> revision, but it then conflicts with the already installed older bcc
> revision.
> 
>  The simplest workaround is to just update bcc prior to issuing the above
> update.
> 
>     # yum update bcc -y
> 
>  That will avoid the condition by updating to a revision of bcc that already
> has the libbcc_bpf rename in place.
> 
>     # rpm -qlp bcc-0.11.0-2.el8.x86_64.rpm | grep bpf
>     /usr/lib64/libbcc_bpf.so.0
>     /usr/lib64/libbcc_bpf.so.0.11.0

Could that be fixed by a "Conflicts: bcc < 0.11" line in libbpf specfile? Does "yum update --security" automatically updates a conflicting package to non conflicting version in that case?

Comment 2 Daniel Mach 2020-07-20 11:17:13 UTC
(In reply to Jerome Marchand from comment #1)
> Could that be fixed by a "Conflicts: bcc < 0.11" line in libbpf specfile?
Yes, adding the Conflicts as you suggested works.

> Does "yum update --security" automatically updates a conflicting package to
> non conflicting version in that case?
Yes, because the Conflicts forces bcc upgrade.

Comment 3 Jerome Marchand 2020-07-20 11:45:58 UTC
(In reply to Daniel Mach from comment #2)
> (In reply to Jerome Marchand from comment #1)
> > Could that be fixed by a "Conflicts: bcc < 0.11" line in libbpf specfile?
> Yes, adding the Conflicts as you suggested works.
> 
> > Does "yum update --security" automatically updates a conflicting package to
> > non conflicting version in that case?
> Yes, because the Conflicts forces bcc upgrade.

Good to know!

Comment 16 errata-xmlrpc 2020-11-04 02:11:33 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 (libbpf 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/RHBA-2020:4588