RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 680261 - after removing packages, files left behind untracked by rpmdb
Summary: after removing packages, files left behind untracked by rpmdb
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: rpm
Version: 6.1
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: rc
: ---
Assignee: Panu Matilainen
QA Contact: BaseOS QE Security Team
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-02-24 20:31 UTC by Don Zickus
Modified: 2018-11-14 20:31 UTC (History)
4 users (show)

Fixed In Version: rpm-4.8.0-16.el6
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-05-19 14:19:48 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2011:0739 0 normal SHIPPED_LIVE rpm bug fix and enhancement update 2012-10-23 19:19:10 UTC

Description Don Zickus 2011-02-24 20:31:05 UTC
Description of problem:
When QE started running TPS reports on my package hwloc, they noticed it was not cleaning itself up upon removal.  This was caused by installing both arches, hwloc.ppc64 and hwloc.ppc, then removing them together.


Version-Release number of selected component (if applicable):
rpm.ppc64  4.8.0-14.el6
yum.noarch 3.2.29-5.el6

How reproducible:
always


[root@ibm-js12-03 ~]# yum install -y hwloc.ppc64 hwloc.ppc
Loaded plugins: product-id, subscription-manager
Updating Red Hat repositories.
INFO:rhsm-app.repolib:repos updated: 0
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package hwloc.ppc 0:1.1-0.1.el6 will be installed
---> Package hwloc.ppc64 0:1.1-0.1.el6 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================ Package                                     Arch
Version                                           Repository
Size
================================================================================Installing:
 hwloc                                       ppc
1.1-0.1.el6                                       beaker-Server
1.0 M
 hwloc                                       ppc64
1.1-0.1.el6                                       beaker-Server
1.0 M

Transaction Summary
================================================================================Install       2 Package(s)

Total download size: 2.0 M
Installed size: 4.9 M
Downloading Packages:
(1/2): hwloc-1.1-0.1.el6.ppc.rpm
| 1.0 MB     00:00
(2/2): hwloc-1.1-0.1.el6.ppc64.rpm
| 1.0 MB     00:00
--------------------------------------------------------------------------------Total
12 MB/s | 2.0 MB     00:00
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing : hwloc-1.1-0.1.el6.ppc64
1/2
  Installing : hwloc-1.1-0.1.el6.ppc
2/2
duration: 193(ms)
Installed products updated.

Installed:
  hwloc.ppc 0:1.1-0.1.el6
hwloc.ppc64 0:1.1-0.1.el6

Complete!
[root@ibm-js12-03 ~]# rpm -qf /usr/bin/hwloc-bind
hwloc-1.1-0.1.el6.ppc64
hwloc-1.1-0.1.el6.ppc
[root@ibm-js12-03 ~]# file /usr/bin/hwloc-bind
/usr/bin/hwloc-bind: ELF 64-bit MSB executable, 64-bit PowerPC or cisco
7500, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux
2.6.18, stripped
[root@ibm-js12-03 ~]# yum erase -y hwloc.ppc64 hwloc.ppc
Loaded plugins: product-id, subscription-manager
Updating Red Hat repositories.
INFO:rhsm-app.repolib:repos updated: 0
Setting up Remove Process
Resolving Dependencies
--> Running transaction check
---> Package hwloc.ppc 0:1.1-0.1.el6 will be erased
---> Package hwloc.ppc64 0:1.1-0.1.el6 will be erased
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================ Package                                    Arch
Version                                             Repository
Size
================================================================================Removing:
 hwloc                                      ppc
1.1-0.1.el6                                         @beaker-Server
2.4 M
 hwloc                                      ppc64
1.1-0.1.el6                                         @beaker-Server
2.5 M

Transaction Summary
================================================================================Remove        2 Package(s)

Installed size: 4.9 M
Downloading Packages:
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Erasing    : hwloc-1.1-0.1.el6
1/2
  Erasing    : hwloc-1.1-0.1.el6
2/2
duration: 193(ms)
Installed products updated.

Removed:
  hwloc.ppc 0:1.1-0.1.el6
hwloc.ppc64 0:1.1-0.1.el6

Complete!
[root@ibm-js12-03 ~]# rpm -qf /usr/bin/hwloc-bind
file /usr/bin/hwloc-bind is not owned by any package
[root@ibm-js12-03 ~]# file /usr/bin/hwloc-bind
/usr/bin/hwloc-bind: ELF 64-bit MSB executable, 64-bit PowerPC or cisco
7500, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux
2.6.18, stripped
[root@ibm-js12-03 ~]#

I expected the file /usr/bin/hwloc-bind to be removed.

Comment 2 Panu Matilainen 2011-03-07 13:15:41 UTC
Ack, easily reproduced. There are several, more or less subtle things at play here. Time's getting a bit short for 6.1 but lets see...

Comment 3 Don Zickus 2011-03-07 14:16:13 UTC
Unfortunately, my package hwloc is being poked for updates on resolving this TPS issue.  So I am raising the priority on this bug.  Sorry for the inconvenience.

Cheers,
Don

Comment 5 Panu Matilainen 2011-03-08 07:25:46 UTC
Oh, I'm only glad this was found, the file removal logic is flawed and technically this problem exists in every single "multilib aware" rpm version.  Whether it happens depends on the exact packages being removed and their relations, and the issue has been largely masked in older rpm versions due to other flaws.

I'm looking into it, but this is an area where you do NOT want a last-minute rushed-in patch as mistakes here could have far more severe consequences (broken systems, data loss) than a couple of files left behind.

Comment 6 Panu Matilainen 2011-03-08 11:51:54 UTC
Okay... ACK for fixing the erase ordering for this case in 6.1.

Most of the time package dependencies take care of secondary architecture getting removed first but when such dependencies are not present, such as here, rpm needs to arrange the preferred order by other means. Which in turn gets the files removed without having to mess with the file removal logic.

Comment 8 Panu Matilainen 2011-03-09 06:48:07 UTC
Fixed in rpm-4.8.0-16.el6

Comment 11 errata-xmlrpc 2011-05-19 14:19:48 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2011-0739.html


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