Bug 1304545 - Symlinks can break if upgrading libvpd and libvpd-devel at once
Symlinks can break if upgrading libvpd and libvpd-devel at once
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: libvpd (Show other bugs)
6.8
Unspecified Unspecified
unspecified Severity unspecified
: rc
: ---
Assigned To: Sinny Kumari
qe-baseos-daemons
: Regression
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2016-02-03 18:12 EST by Alois Mahdal
Modified: 2016-05-10 20:07 EDT (History)
6 users (show)

See Also:
Fixed In Version: libvpd-2.2.5-2.el6
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-05-10 20:07:12 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Alois Mahdal 2016-02-03 18:12:14 EST
Description of problem
======================

When `rpm -V` is called during tps-rpmtest, following errors are found:

    # rpm -Va libvpd\*
    ....L....    /usr/lib64/libvpd-2.2.so.2
    ....L....    /usr/lib64/libvpd_cxx-2.2.so.2
    ....L....    /usr/lib/libvpd-2.2.so.2
    ....L....    /usr/lib/libvpd_cxx-2.2.so.2
    #


Version-Release number of selected component
============================================

libvpd-2.2.5-1.el6


How reproducible
================

Always (2 runs, stable-systems and Beaker)


Steps to Reproduce
==================

  1. install new libvpd
  2. run rpm -Va libvpd\*


Actual results
==============

Errors


Expected results
================

No errors


Additional info
===============

With help of rpm --debug and readlink, this is what "should be" (according
to rpm) and what really is:

    FILE                            SHOULD POINT TO          POINTS TO
    ----------------------------------------------------------------------
    /usr/lib64/libvpd-2.2.so.2      libvpd-2.2.so.2.2.5      libvpd.so
    /usr/lib64/libvpd_cxx-2.2.so.2  libvpd_cxx-2.2.so.2.2.5  libvpd_cxx.so
    /usr/lib/libvpd-2.2.so.2        libvpd-2.2.so.2.2.5      libvpd.so
    /usr/lib/libvpd_cxx-2.2.so.2    libvpd_cxx-2.2.so.2.2.5  libvpd_cxx.so

However, the targets are actually symlinks that *further* point to the
right file (e.g. `libvpd.so -> libvpd-2.2.so.2.2.5`), so no broken links
are involved.
Comment 2 Sinny Kumari 2016-02-11 11:28:20 EST
Hi Alois,

I installed libvpd-2.2.5-1.el6 on machine reserved through beaker. Beaker machines used had latest stable RHEL 6 release which is 6.7 and ran command 
# rpm -Va libvpd\*
#

I didn't get any error in output which you mentioned. I tried on x86_64 and ppc64 machine.

Can you please try again and see if bug still exist? If issue exist then please provide exact RHEL version which you used and machine detail which you used.

Thanks
Comment 4 Alois Mahdal 2016-03-08 21:28:28 EST
OK, so I have found out how to reproduce this.  The key difference is that -devel package must be part of the test as well.


Steps to Reproduce
==================

  0. have machine with old libvpd

  1. install libvpd-devel

  2. upgrade *both* devel and libvpd-devel to new version

  3. run rpm -Va libvpd\*

     *  rpm -Va complains that libvpd-2.2.so.2 soname points to libvpd.so

But *furthermore*, since libvpd.so belongs to the -devel package...

  4. remove libvpd-devel

  5. run rpm -Va libvpd\*

     *  libvpd.so is gone so libvpd-2.2.so.2 symlink is now broken!


Also note that same happens in case of *downgrading* from the new version to older;  as long as you up/downgrade both at the same time, the symlinks get messed up.
Comment 5 Sinny Kumari 2016-03-10 03:40:47 EST
Thank Alois.

I can reproduce this issue now with installing both main and devel package of libbvpd and later upgrading/downgrading it.

I am looking into why this problem is happening.
Comment 7 Dan Horák 2016-03-18 04:44:07 EDT
The built libvpd rpms contain correct symlinks, for both libvpd-2.2.5-1.el6 and libvpd-2.2.3-1.el6, so the problem lays outside libvpd.

[dan@eagle tmp]$ rpm2cpio libvpd-2.2.5-1.el6.ppc64.rpm | cpio -ivt
-rw-r--r--   1 root     root           97 Dec 16 08:46 ./etc/udev/rules.d/90-vpdupdate.rules
lrwxrwxrwx   1 root     root           19 Dec 16 08:46 ./usr/lib64/libvpd-2.2.so.2 -> libvpd-2.2.so.2.2.5
-rwxr-xr-x   1 root     root        34784 Dec 16 08:46 ./usr/lib64/libvpd-2.2.so.2.2.5
lrwxrwxrwx   1 root     root           23 Dec 16 08:46 ./usr/lib64/libvpd_cxx-2.2.so.2 -> libvpd_cxx-2.2.so.2.2.5
-rwxr-xr-x   1 root     root       159080 Dec 16 08:46 ./usr/lib64/libvpd_cxx-2.2.so.2.2.5
drwxr-xr-x   2 root     root            0 Dec 16 08:46 ./usr/share/doc/libvpd-2.2.5
-rw-r--r--   1 root     root           68 Nov  3 18:25 ./usr/share/doc/libvpd-2.2.5/AUTHORS
-rw-r--r--   1 root     root        24356 Nov  3 18:25 ./usr/share/doc/libvpd-2.2.5/COPYING
-rw-r--r--   1 root     root         2334 Nov  3 18:25 ./usr/share/doc/libvpd-2.2.5/README
drwxr-xr-x   2 root     root            0 Dec 16 08:46 ./var/lib/lsvpd
-rw-r--r--   1 root     root            0 Dec 16 08:46 ./var/lib/lsvpd/run.vpdupdate
435 blocks
[dan@eagle tmp]$ rpm2cpio libvpd-2.2.3-1.el6.ppc64.rpm | cpio -ivt
-rw-r--r--   1 root     root           97 Apr 23  2014 ./etc/udev/rules.d/90-vpdupdate.rules
lrwxrwxrwx   1 root     root           19 Apr 23  2014 ./usr/lib64/libvpd-2.2.so.2 -> libvpd-2.2.so.2.2.3
-rwxr-xr-x   1 root     root        30384 Apr 23  2014 ./usr/lib64/libvpd-2.2.so.2.2.3
lrwxrwxrwx   1 root     root           23 Apr 23  2014 ./usr/lib64/libvpd_cxx-2.2.so.2 -> libvpd_cxx-2.2.so.2.2.3
-rwxr-xr-x   1 root     root       149216 Apr 23  2014 ./usr/lib64/libvpd_cxx-2.2.so.2.2.3
drwxr-xr-x   2 root     root            0 Apr 23  2014 ./usr/share/doc/libvpd-2.2.3
-rw-r--r--   1 root     root           68 Mar 12  2014 ./usr/share/doc/libvpd-2.2.3/AUTHORS
-rw-r--r--   1 root     root        24356 Mar 12  2014 ./usr/share/doc/libvpd-2.2.3/COPYING
-rw-r--r--   1 root     root           34 Mar 12  2014 ./usr/share/doc/libvpd-2.2.3/NEWS
-rw-r--r--   1 root     root         1039 Mar 12  2014 ./usr/share/doc/libvpd-2.2.3/README
drwxr-xr-x   2 root     root            0 Apr 23  2014 ./var/lib/lsvpd
-rw-r--r--   1 root     root            0 Apr 23  2014 ./var/lib/lsvpd/run.vpdupdate
405 blocks
[dan@eagle tmp]$ rpm2cpio libvpd-devel-2.2.5-1.el6.ppc64.rpm | cpio -ivt
drwxr-xr-x   2 root     root            0 Dec 16 08:46 ./usr/include/libvpd-2
-rw-r--r--   1 root     root         3513 Dec 16 08:46 ./usr/include/libvpd-2/Source.hpp
-rw-r--r--   1 root     root         2066 Dec 16 08:46 ./usr/include/libvpd-2/common.h
-rw-r--r--   1 root     root         3859 Dec 16 08:46 ./usr/include/libvpd-2/component.h
-rw-r--r--   1 root     root        22090 Dec 16 08:46 ./usr/include/libvpd-2/component.hpp
-rw-r--r--   1 root     root         2120 Dec 16 08:46 ./usr/include/libvpd-2/dataitem.h
-rw-r--r--   1 root     root         5741 Dec 16 08:46 ./usr/include/libvpd-2/dataitem.hpp
-rw-r--r--   1 root     root         2137 Dec 16 08:46 ./usr/include/libvpd-2/debug.hpp
-rw-r--r--   1 root     root         3138 Dec 16 08:46 ./usr/include/libvpd-2/helper_functions.hpp
-rw-r--r--   1 root     root         3649 Dec 16 08:46 ./usr/include/libvpd-2/logger.hpp
-rw-r--r--   1 root     root         1905 Dec 16 08:46 ./usr/include/libvpd-2/lsvpd.hpp
-rw-r--r--   1 root     root         2350 Dec 16 08:46 ./usr/include/libvpd-2/lsvpd_error_codes.hpp
-rw-r--r--   1 root     root         2828 Dec 16 08:46 ./usr/include/libvpd-2/system.h
-rw-r--r--   1 root     root         9047 Dec 16 08:46 ./usr/include/libvpd-2/system.hpp
-rw-r--r--   1 root     root         2661 Dec 16 08:46 ./usr/include/libvpd-2/vpddbenv.h
-rw-r--r--   1 root     root         6346 Dec 16 08:46 ./usr/include/libvpd-2/vpddbenv.hpp
-rw-r--r--   1 root     root         2185 Dec 16 08:46 ./usr/include/libvpd-2/vpdexception.hpp
-rw-r--r--   1 root     root         3615 Dec 16 08:46 ./usr/include/libvpd-2/vpdretriever.h
-rw-r--r--   1 root     root         4795 Dec 16 08:46 ./usr/include/libvpd-2/vpdretriever.hpp
lrwxrwxrwx   1 root     root           19 Dec 16 08:46 ./usr/lib64/libvpd.so -> libvpd-2.2.so.2.2.5
lrwxrwxrwx   1 root     root           23 Dec 16 08:46 ./usr/lib64/libvpd_cxx.so -> libvpd_cxx-2.2.so.2.2.5
-rw-r--r--   1 root     root          230 Dec 16 08:46 ./usr/lib64/pkgconfig/libvpd-2.pc
-rw-r--r--   1 root     root          241 Dec 16 08:46 ./usr/lib64/pkgconfig/libvpd_cxx-2.pc
173 blocks
[dan@eagle tmp]$ rpm2cpio libvpd-devel-2.2.3-1.el6.ppc64.rpm | cpio -ivt
drwxr-xr-x   2 root     root            0 Apr 23  2014 ./usr/include/libvpd-2
-rw-r--r--   1 root     root         3513 Apr 23  2014 ./usr/include/libvpd-2/Source.hpp
-rw-r--r--   1 root     root         2066 Apr 23  2014 ./usr/include/libvpd-2/common.h
-rw-r--r--   1 root     root         3859 Apr 23  2014 ./usr/include/libvpd-2/component.h
-rw-r--r--   1 root     root        22089 Apr 23  2014 ./usr/include/libvpd-2/component.hpp
-rw-r--r--   1 root     root         2120 Apr 23  2014 ./usr/include/libvpd-2/dataitem.h
-rw-r--r--   1 root     root         5741 Apr 23  2014 ./usr/include/libvpd-2/dataitem.hpp
-rw-r--r--   1 root     root         2137 Apr 23  2014 ./usr/include/libvpd-2/debug.hpp
-rw-r--r--   1 root     root         3138 Apr 23  2014 ./usr/include/libvpd-2/helper_functions.hpp
-rw-r--r--   1 root     root         2531 Apr 23  2014 ./usr/include/libvpd-2/logger.hpp
-rw-r--r--   1 root     root         1905 Apr 23  2014 ./usr/include/libvpd-2/lsvpd.hpp
-rw-r--r--   1 root     root         2350 Apr 23  2014 ./usr/include/libvpd-2/lsvpd_error_codes.hpp
-rw-r--r--   1 root     root         2828 Apr 23  2014 ./usr/include/libvpd-2/system.h
-rw-r--r--   1 root     root         9047 Apr 23  2014 ./usr/include/libvpd-2/system.hpp
-rw-r--r--   1 root     root         2661 Apr 23  2014 ./usr/include/libvpd-2/vpddbenv.h
-rw-r--r--   1 root     root         6346 Apr 23  2014 ./usr/include/libvpd-2/vpddbenv.hpp
-rw-r--r--   1 root     root         2185 Apr 23  2014 ./usr/include/libvpd-2/vpdexception.hpp
-rw-r--r--   1 root     root         3615 Apr 23  2014 ./usr/include/libvpd-2/vpdretriever.h
-rw-r--r--   1 root     root         4795 Apr 23  2014 ./usr/include/libvpd-2/vpdretriever.hpp
lrwxrwxrwx   1 root     root           19 Apr 23  2014 ./usr/lib64/libvpd.so -> libvpd-2.2.so.2.2.3
lrwxrwxrwx   1 root     root           23 Apr 23  2014 ./usr/lib64/libvpd_cxx.so -> libvpd_cxx-2.2.so.2.2.3
-rw-r--r--   1 root     root          230 Apr 23  2014 ./usr/lib64/pkgconfig/libvpd-2.pc
-rw-r--r--   1 root     root          241 Apr 23  2014 ./usr/lib64/pkgconfig/libvpd_cxx-2.pc
170 blocks
[dan@eagle tmp]$
Comment 14 Alois Mahdal 2016-03-22 09:01:04 EDT
This was not seen with previous release (ER#17574, libvpd-2.2.3-1.el6 for rhel6.6, ~2 years ago), hence Regression keyword.

Unfortunately, due to other hight priority task, I won't be able to test the build manually until Thursday.

OTOH, this should be covered by automated TPS triggered on switch to ON_QE.
Comment 17 Alois Mahdal 2016-03-29 04:07:20 EDT
TPS test, which contains the procedure of upgrading / downgrading the packages, and which failed before, now passes with rhe new build:

    https://errata.devel.redhat.com/tps/errata_results/24446
Comment 19 errata-xmlrpc 2016-05-10 20:07:12 EDT
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, 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://rhn.redhat.com/errata/RHBA-2016-0872.html

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