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 2077864 - "dnf download" does not randomly redownload a broken package
Summary: "dnf download" does not randomly redownload a broken package
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: librepo
Version: 8.7
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: rc
: ---
Assignee: amatej
QA Contact: Eva Mrakova
Mariya Pershina
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-04-22 13:03 UTC by Eva Mrakova
Modified: 2022-11-08 12:49 UTC (History)
6 users (show)

Fixed In Version: librepo-1.14.2-2.el8
Doc Type: No Doc Update
Doc Text:
Clone Of: 2077859
Environment:
Last Closed: 2022-11-08 10:54:34 UTC
Type: Bug
Target Upstream Version:
Embargoed:
pm-rhel: mirror+


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker RHELPLAN-119696 0 None None None 2022-04-22 13:32:27 UTC
Red Hat Product Errata RHBA-2022:7780 0 None None None 2022-11-08 10:54:36 UTC

Comment 1 Petr Pisar 2022-04-25 11:58:29 UTC
I can reproduce it RHEL 9.0 and RHEL 8.6. But it does not manifests in Fedora 37 and Fedora 34. Because DNF stack in RHEL 9.0 is newer that Fedora's one, I suspect this could be a bug in Linux kernel. Kernel in RHEL 9 is older than in Fedora.

Comment 2 amatej 2022-04-26 06:52:47 UTC
I managed to reproduce it even on fedora.

I am pretty sure the problem is that since https://github.com/rpm-software-management/dnf/pull/1743 dnf uses librepo for checksum checking which uses caching.

Basically dnf downloads the package and stores (caches) its checksum and mtime to xattrs of the file then when the computer is fast enough (only sometimes) it rewrites the file with "blah" in the same mtime. On the next run dnf compares the file mtime with cached mtime and since they match it uses the cached (wrong) checksum -> no redownload.

To workaround this you can:
2. for i in {1..10}; do echo blah > bash-5.1.8-4.el9.x86_64.rpm ; dnf download bash; sleep 1s; done

Comment 4 amatej 2022-05-05 10:49:52 UTC
I have created a PR that should resolve this: https://github.com/rpm-software-management/librepo/pull/256

Comment 5 amatej 2022-05-10 10:35:53 UTC
PR with CI tests: https://github.com/rpm-software-management/ci-dnf-stack/pull/1096

Comment 13 errata-xmlrpc 2022-11-08 10:54:34 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 (librepo 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-2022:7780


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