Bug 1729660

Summary: [anaconda] dnf sometimes fails to decompress groups.xml
Product: [Fedora] Fedora Reporter: Alessio <alciregi>
Component: dnfAssignee: Lukáš Hrázký <lhrazky>
Status: CLOSED CURRENTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 31CC: anaconda-maint-list, jkonecny, jmracek, jonathan, jrohel, kellin, lhrazky, mblaha, mhatina, packaging-team-maint, pkratoch, rpm-software-management, vanmeeuwen+fedora, vmukhame, vponcova, wwoods
Target Milestone: ---Keywords: Triaged
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard: abrt_hash:84af80a040e9f6d36afa92f90444fd1b6873cd1b73da1187818e1f747631167d;
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-04-15 10:38:56 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
File: anaconda-tb
none
File: anaconda.log
none
File: dbus.log
none
File: environ
none
File: hawkey.log
none
File: lorax-packages.log
none
File: lsblk_output
none
File: lvm.log
none
File: nmcli_dev_list
none
File: os_info
none
File: program.log
none
File: storage.log
none
File: syslog
none
File: packaging.log none

Description Alessio 2019-07-13 08:00:34 UTC
Description of problem:


Version-Release number of selected component:
anaconda-31.19

The following was filed automatically by anaconda:
anaconda 31.19 exception report
Traceback (most recent call first):
  File "/usr/lib64/python3.7/site-packages/pyanaconda/payload/dnfpayload.py", line 731, in _payload_setup_error
    sys.exit(1)
  File "/usr/lib64/python3.7/site-packages/pyanaconda/payload/dnfpayload.py", line 577, in _apply_selections
    self._payload_setup_error(e)
  File "/usr/lib64/python3.7/site-packages/pyanaconda/payload/dnfpayload.py", line 885, in check_software_selection
    self._apply_selections()
  File "/usr/lib64/python3.7/site-packages/pyanaconda/ui/tui/spokes/software_selection.py", line 340, in check_software_selection
    self.payload.check_software_selection()
  File "/usr/lib64/python3.7/threading.py", line 870, in run
    self._target(*self._args, **self._kwargs)
  File "/usr/lib64/python3.7/site-packages/pyanaconda/threading.py", line 280, in run
    threading.Thread.run(self)
SystemExit: 1

Additional info:
addons:         com_redhat_kdump
cmdline:        /usr/bin/python3  /sbin/anaconda
cmdline_file:   BOOT_IMAGE=vmlinuz initrd=initrd.img inst.stage2=hd:LABEL=Fedora-E-dvd-x86_64-rawh quiet console=ttyS0
dnf.librepo.log: 
executable:     /sbin/anaconda
hashmarkername: anaconda
kernel:         5.3.0-0.rc0.git3.1.fc31.x86_64
product:        Fedora
release:        Fedora release 31 (Rawhide)
release_type:   pre-release
type:           anaconda
version:        rawhide

Comment 1 Alessio 2019-07-13 08:00:38 UTC
Created attachment 1590146 [details]
File: anaconda-tb

Comment 2 Alessio 2019-07-13 08:00:40 UTC
Created attachment 1590147 [details]
File: anaconda.log

Comment 3 Alessio 2019-07-13 08:00:41 UTC
Created attachment 1590148 [details]
File: dbus.log

Comment 4 Alessio 2019-07-13 08:00:42 UTC
Created attachment 1590149 [details]
File: environ

Comment 5 Alessio 2019-07-13 08:00:43 UTC
Created attachment 1590150 [details]
File: hawkey.log

Comment 6 Alessio 2019-07-13 08:00:45 UTC
Created attachment 1590151 [details]
File: lorax-packages.log

Comment 7 Alessio 2019-07-13 08:00:46 UTC
Created attachment 1590152 [details]
File: lsblk_output

Comment 8 Alessio 2019-07-13 08:00:48 UTC
Created attachment 1590153 [details]
File: lvm.log

Comment 9 Alessio 2019-07-13 08:00:49 UTC
Created attachment 1590154 [details]
File: nmcli_dev_list

Comment 10 Alessio 2019-07-13 08:00:50 UTC
Created attachment 1590155 [details]
File: os_info

Comment 11 Alessio 2019-07-13 08:00:52 UTC
Created attachment 1590156 [details]
File: program.log

Comment 12 Alessio 2019-07-13 08:00:54 UTC
Created attachment 1590157 [details]
File: storage.log

Comment 13 Alessio 2019-07-13 08:00:56 UTC
Created attachment 1590158 [details]
File: syslog

Comment 14 Alessio 2019-07-13 08:00:58 UTC
Created attachment 1590159 [details]
File: packaging.log

Comment 15 Alessio 2019-07-14 05:51:12 UTC
It happens sometime. But I'm unable to replicate in a systematic way.

Comment 16 Jiri Konecny 2019-07-15 13:46:18 UTC
This issue is raised from the DNF library. Switching components.


07:57:13,956 CRT exception: Traceback (most recent call last):

  File "/usr/lib/python3.7/site-packages/dnf/yum/misc.py", line 411, in decompress
    libdnf.utils.decompress(filename, out, 0o644, ztype)

  File "/usr/lib64/python3.7/site-packages/libdnf/utils.py", line 208, in decompress
    return _utils.decompress(inPath, outPath, outMode, compressType)

RuntimeError: open: No such file or directory


During handling of the above exception, another exception occurred:


Traceback (most recent call last):

  File "/usr/lib64/python3.7/site-packages/pyanaconda/payload/dnfpayload.py", line 563, in _apply_selections
    self._base.install_specs(install=include_list, exclude=exclude_list)

  File "/usr/lib/python3.7/site-packages/dnf/base.py", line 1849, in install_specs
    self.read_comps(arch_filter=True)

  File "/usr/lib/python3.7/site-packages/dnf/base.py", line 597, in read_comps
    decompressed = misc.repo_gen_decompress(comps_fn, 'groups.xml')

  File "/usr/lib/python3.7/site-packages/dnf/yum/misc.py", line 433, in repo_gen_decompress
    return decompress(filename, dest=dest, check_timestamps=True, fn_only=cached)

  File "/usr/lib/python3.7/site-packages/dnf/yum/misc.py", line 413, in decompress
    raise dnf.exceptions.MiscError(str(e))

dnf.exceptions.MiscError: open: No such file or directory

Comment 17 Ben Cotton 2019-08-13 16:50:37 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 31 development cycle.
Changing version to '31'.

Comment 18 Ben Cotton 2019-08-13 18:56:26 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 31 development cycle.
Changing version to 31.

Comment 19 Lukáš Hrázký 2019-09-02 14:20:15 UTC
Jiri, how did you get the tracebacks from Comment 16? Were you able to reproduce the issue?

I've created a PR to include the filename in the error messages here: https://github.com/rpm-software-management/libdnf/pull/785

However, I think we still need a reproducer...

Comment 20 Jiri Konecny 2019-09-02 14:36:31 UTC
Hello Lukáš, no I did not tried to reproduce it. The traceback is from the anaconda.log.

The reproducer is more on the reporter.

Could you please describe steps to reproduce this issue or better try the proposed change if you know how?

Comment 21 Lukáš Hrázký 2019-09-02 14:48:17 UTC
Ah, sorry, I've missed that log.

Comment 22 Lukáš Hrázký 2020-04-15 10:38:56 UTC
I'll close this; the fixed error message has been released, in case of further occurrences we'll get more information.

The code should really be throwing a specific exception instead of a RuntimeError, but I don't want to touch it without a bug report that would warrant it, changing the type could break things elsewhere...