Hide Forgot
Description of problem: Trying to install F24 Version-Release number of selected component: anaconda-24.13.4-1 The following was filed automatically by anaconda: anaconda 24.13.4-1 exception report Traceback (most recent call first): File "/usr/lib64/python3.5/site-packages/pyanaconda/packaging/dnfpayload.py", line 803, in install raise packaging.PayloadError("DNF error: %s" % msg) File "/usr/lib64/python3.5/site-packages/pyanaconda/install.py", line 236, in doInstall payload.install() File "/usr/lib64/python3.5/threading.py", line 862, in run self._target(*self._args, **self._kwargs) File "/usr/lib64/python3.5/site-packages/pyanaconda/threads.py", line 253, in run threading.Thread.run(self, *args, **kwargs) pyanaconda.packaging.PayloadError: DNF error: error reading package headerTraceback (most recent call last): File "/usr/lib64/python3.5/site-packages/pyanaconda/packaging/dnfpayload.py", line 210, in do_transaction base.do_transaction(display=display) File "/usr/lib/python3.5/site-packages/dnf/base.py", line 564, in do_transaction self.transaction.populate_rpm_ts(self.ts) File "/usr/lib/python3.5/site-packages/dnf/transaction.py", line 183, in populate_rpm_ts hdr = tsi.installed.header File "/usr/lib/python3.5/site-packages/dnf/package.py", line 78, in header return dnf.rpm.header(self.localPkg()) File "/usr/lib/python3.5/site-packages/dnf/rpm/__init__.py", line 58, in header return ts.hdrFromFdno(fdno) File "/usr/lib64/python3.5/site-packages/rpm/transaction.py", line 175, in hdrFromFdno raise rpm.error("error reading package header") _rpm.error: error reading package header Additional info: addons: com_redhat_kdump cmdline: /usr/bin/python3 /sbin/anaconda cmdline_file: BOOT_IMAGE=/images/pxeboot/vmlinuz inst.stage2=hd:LABEL=Fedora-E-dvd-x86_64-24 quiet executable: /sbin/anaconda hashmarkername: anaconda kernel: 4.5.2-301.fc24.x86_64 product: Fedora release: Cannot get release name. reproducible: Not sure how to reproduce the problem type: anaconda version: 24
Created attachment 1153387 [details] File: anaconda-tb
Created attachment 1153388 [details] File: anaconda.log
Created attachment 1153389 [details] File: dnf.log
Created attachment 1153390 [details] File: dnf.rpm.log
Created attachment 1153391 [details] File: environ
Created attachment 1153392 [details] File: lsblk_output
Created attachment 1153393 [details] File: lvm.log
Created attachment 1153394 [details] File: nmcli_dev_list
Created attachment 1153395 [details] File: os_info
Created attachment 1153396 [details] File: program.log
Created attachment 1153397 [details] File: storage.log
Created attachment 1153398 [details] File: syslog
Created attachment 1153399 [details] File: ifcfg.log
Created attachment 1153400 [details] File: packaging.log
Similar problem has been detected: Trying to install F24 addons: com_redhat_kdump cmdline: /usr/bin/python3 /sbin/anaconda cmdline_file: BOOT_IMAGE=/images/pxeboot/vmlinuz inst.stage2=hd:LABEL=Fedora-E-dvd-x86_64-24 quiet hashmarkername: anaconda kernel: 4.5.2-301.fc24.x86_64 package: anaconda-24.13.4-1 product: Fedora reason: pyanaconda.packaging.PayloadError: DNF error: error reading package headerTraceback (most recent call last): release: Cannot get release name. reproducible: Not sure how to reproduce the problem version: 24
Reassigning to RPM. Probably some package had malformed header.
Rpm refusing to read a malformed package is a feature, not bug. Damaged packages do happen, and the software on top of rpm should anticipate them and handle the error cleanly instead of throwing up a traceback. I'm not sufficiently familiar with dnf or anaconda these days to tell which one should be catching this one, but this: File "/usr/lib/python3.5/site-packages/dnf/package.py", line 78, in header return dnf.rpm.header(self.localPkg()) ...seems to suggest that its dnf who's not expecting a failure. Anaconda will just give up here in any case I think, but dnf could catch the rpm-level exception and riase an exception of its own, at least reporting which package it was that failed. Rpm cannot do that because it just gets a file descriptor.
Fixed by https://github.com/rpm-software-management/libhif/pull/208 Testing reproducer was: # touch /tmp/empty.rpm # dnf install /tmp/empty.rpm Fixed version output: Last metadata expiration check: 0:00:00 ago on Wed Nov 02 14:53:41 2016 CET. Can not load RPM file: /tmp/empty.rpm. Could not open: /tmp/empty.rpm