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 1491786 - rpm incorrectly estimates required disk space for RPM package with hard links
Summary: rpm incorrectly estimates required disk space for RPM package with hard links
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: rpm
Version: 7.3
Hardware: Unspecified
OS: Linux
high
high
Target Milestone: rc
: ---
Assignee: Pavlina Moravcova Varekova
QA Contact: Karel Srot
URL:
Whiteboard:
Depends On:
Blocks: 1630909 1630918 1654474
TreeView+ depends on / blocked
 
Reported: 2017-09-14 16:29 UTC by jcastran
Modified: 2019-08-06 13:11 UTC (History)
11 users (show)

Fixed In Version: rpm-4.11.3-36.el7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-08-06 13:11:23 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2019:2259 0 None None None 2019-08-06 13:11:37 UTC

Description jcastran 2017-09-14 16:29:34 UTC
Description of problem:
Yum is not properly verifying that there is sufficient capacity in the root filesystem when the root filesystem is low on disk space.

If the root filesystem is low on space, it starts the update but runs out of space during the installation of the RPMs. Yum then fails, leaving the system in a corrupted state.


Version-Release number of selected component (if applicable):
 yum-3.4.3-150.el7.noarch
 kernel-3.10.0-514.6.2.el7.x86_64 (RHEL 7.3)

How reproducible:
-

Steps to Reproduce:
1.1. Build a server with our standard layout including a  3G root filesystem
2. Create a 1.5G file in /usr
	dd if=/dev/urandom of=/usr/bigfile bs=1024k count=1500
3. Update the server:
    yum clean all && yum update -y


Actual results:
RPM installation then fails, leaving packages broken and in an consistent state. The server is then broken; processes no longer can run because dependent libraries are not installed or are installed in inconsistent versions.

Expected results:
Yum transaction check accurately determines if there is enough space before installing packages.





~~~~~~~~~~~~~~~~~~Additional info~~~~~~~~~~~~~~~~~~
On a freshly installed RHEL7.3 machine:

~~~
# df -B1 /
Filesystem                      1B-blocks      Used  Available Use% Mounted on
/dev/mapper/rhel-root          3210215424 971796480 2238418944  31% /
#
~~~

Calculating the space needed for the /usr/bigfile:

~~~
# echo $((2238418944-237072384))
2001346560
# echo $((2001346560/1024/1024))
1908
# dd if=/dev/urandom of=/usr/bigfile bs=1024k count=1908
1908+0 records in
1908+0 records out
2000683008 bytes (2.0 GB) copied, 104.975 s, 19.1 MB/s
# df -B1 /
Filesystem             1B-blocks       Used Available Use% Mounted on
/dev/mapper/rhel-root 3210215424 2972479488 237735936  93% /
#
~~~

Making a little less space:

~~~
# dd if=/dev/urandom of=/usr/bigfile bs=1024k count=1909
1909+0 records in
1909+0 records out
2001731584 bytes (2.0 GB) copied, 104.584 s, 19.1 MB/s
# df -B1 /
Filesystem             1B-blocks       Used Available Use% Mounted on
/dev/mapper/rhel-root 3210215424 2973528064 236687360  93% /
#
~~~

Trying to reproduce:

~~~
# yum update -y
... snip ...
Install   10 Packages (+31 Dependent packages)
Upgrade  199 Packages

Total download size: 214 M
... snip ..

 Updating   : bash-4.2.46-28.el7.x86_64                                                                                                                                                                                               13/444 
  Updating   : nss-softokn-freebl-3.28.3-6.el7.x86_64                                                                                                                                                                                  14/444 
  Updating   : glibc-common-2.17-196.el7.x86_64                                                                                                                                                                                        15/444 
/usr/sbin/build-locale-archive: cannot add to locale archive: No such file or directory
/usr/sbin/build-locale-archive: cannot add to locale archive: No such file or directory
  Updating   : glibc-2.17-196.el7.x86_64                                                                                                                                                                                               16/444 
Error unpacking rpm package glibc-2.17-196.el7.x86_64
warning: /etc/nsswitch.conf created as /etc/nsswitch.conf.rpmnew
error: unpacking of archive failed on file /lib64/libc-2.17.so;5989c491: cpio: write
  Updating   : libstdc++-4.8.5-16.el7.x86_64                                                                                                                                                                                           17/444 
Error unpacking rpm package libstdc++-4.8.5-16.el7.x86_64
error: glibc-2.17-196.el7.x86_64: install failed
error: unpacking of archive failed on file /usr/lib64/libstdc++.so.6.0.19;5989c491: cpio: lsetfilecon
  Updating   : pcre-8.32-17.el7.x86_64                                                                                                                                                                                                 18/444 
Error unpacking rpm package pcre-8.32-17.el7.x86_64
error: libstdc++-4.8.5-16.el7.x86_64: install failed
error: unpacking of archive failed on file /usr/lib64/libpcre.so.1;5989c491: cpio: symlink
  Updating   : libselinux-2.5-11.el7.x86_64                                                                                                                                                                                            19/444 
error: pcre-8.32-17.el7.x86_64: install failed
warning: %triggerin(cronie-1.4.11-14.el7_2.1.x86_64) scriptlet failed, signal 11
... snip ...
#

Comment 23 Karel Srot 2019-05-29 06:18:48 UTC
I have updated the bug summary to better reflect what is being addressed.

Comment 27 errata-xmlrpc 2019-08-06 13:11:23 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, 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/RHEA-2019:2259


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