Bug 1537957

Summary: [abrt] dnf: _add_from_xml_filename(): comps.py:328:_add_from_xml_filename:_libpycomps.ParserError: Fatal parser error
Product: [Fedora] Fedora Reporter: Elizabeth Pratt <stuff>
Component: dnfAssignee: Marek Blaha <mblaha>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 27CC: ahmed.hosny.badr, aklimov, alireza.tjd77, awilliam, dmach, emrakova, flydove, freddy, jblazek, jiabanster, jmracek, mblaha, mhatina, packaging-team-maint, red, rpm-software-management, vmukhame
Target Milestone: ---Keywords: Triaged
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
URL: https://retrace.fedoraproject.org/faf/reports/bthash/d5dfb36f23b37014bd6b48ce29b57aae9aa21a03
Whiteboard: abrt_hash:e06494d434f11fb436ab70bdf990738aa9d8097e;VARIANT_ID=workstation;
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-06-28 08:24:29 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: _var_log_dnf.log
none
File: backtrace
none
File: cgroup
none
File: cpuinfo
none
File: dnf-makecache.log
none
File: environ
none
File: mountinfo
none
File: namespaces
none
File: open_fds none

Description Elizabeth Pratt 2018-01-24 07:41:44 UTC
Version-Release number of selected component:
dnf-2.7.5-2.fc27

Additional info:
reporter:       libreport-2.9.3
cmdline:        /usr/bin/python3 /usr/bin/dnf group
crash_function: _add_from_xml_filename
exception_type: _libpycomps.ParserError
executable:     /usr/bin/dnf
kernel:         4.14.14-300.fc27.x86_64
runlevel:       N 5
type:           Python3
uid:            1000

Truncated backtrace:
comps.py:328:_add_from_xml_filename:_libpycomps.ParserError: Fatal parser error

Traceback (most recent call last):
  File "/usr/bin/dnf", line 58, in <module>
    main.user_main(sys.argv[1:], exit_code=True)
  File "/usr/lib/python3.6/site-packages/dnf/cli/main.py", line 179, in user_main
    errcode = main(args)
  File "/usr/lib/python3.6/site-packages/dnf/cli/main.py", line 64, in main
    return _main(base, args, cli_class, option_parser_class)
  File "/usr/lib/python3.6/site-packages/dnf/cli/main.py", line 99, in _main
    return cli_run(cli, base)
  File "/usr/lib/python3.6/site-packages/dnf/cli/main.py", line 115, in cli_run
    cli.run()
  File "/usr/lib/python3.6/site-packages/dnf/cli/cli.py", line 1014, in run
    return self.command.run()
  File "/usr/lib/python3.6/site-packages/dnf/cli/commands/group.py", line 375, in run
    self._grp_setup()
  File "/usr/lib/python3.6/site-packages/dnf/cli/commands/group.py", line 108, in _grp_setup
    self.base.read_comps(arch_filter=True)
  File "/usr/lib/python3.6/site-packages/dnf/base.py", line 550, in read_comps
    self._comps._add_from_xml_filename(decompressed)
  File "/usr/lib/python3.6/site-packages/dnf/comps.py", line 328, in _add_from_xml_filename
    ret = comps.fromxml_f(fn)
_libpycomps.ParserError: Fatal parser error

Local variables in innermost frame:
comps: <_libpycomps.Comps object at 0x7f2542c98b70>
fn: '/var/tmp/dnf-elzi-qogip5ia/updates-09879b494aeba108/repodata/gen/groups.xml'
self: <dnf.comps.Comps object at 0x7f2542ce65f8>

Comment 1 Elizabeth Pratt 2018-01-24 07:41:52 UTC
Created attachment 1385286 [details]
File: _var_log_dnf.log

Comment 2 Elizabeth Pratt 2018-01-24 07:41:53 UTC
Created attachment 1385287 [details]
File: backtrace

Comment 3 Elizabeth Pratt 2018-01-24 07:41:54 UTC
Created attachment 1385288 [details]
File: cgroup

Comment 4 Elizabeth Pratt 2018-01-24 07:41:55 UTC
Created attachment 1385289 [details]
File: cpuinfo

Comment 5 Elizabeth Pratt 2018-01-24 07:41:56 UTC
Created attachment 1385290 [details]
File: dnf-makecache.log

Comment 6 Elizabeth Pratt 2018-01-24 07:41:58 UTC
Created attachment 1385291 [details]
File: environ

Comment 7 Elizabeth Pratt 2018-01-24 07:42:00 UTC
Created attachment 1385292 [details]
File: mountinfo

Comment 8 Elizabeth Pratt 2018-01-24 07:42:01 UTC
Created attachment 1385293 [details]
File: namespaces

Comment 9 Elizabeth Pratt 2018-01-24 07:42:02 UTC
Created attachment 1385294 [details]
File: open_fds

Comment 10 Adam Williamson 2018-01-24 08:19:38 UTC
Similar problem has been detected:

This can be triggered by just running 'dnf groupinstall base-x' from a Fedora 27 system. It started happening between 19 hours ago and 10 hours ago. I think it's a problem with the repo metadata, as it can be triggered on a system which wasn't updated in that time frame.

reporter:       libreport-2.9.3
cmdline:        /usr/bin/python3 /bin/dnf groupinstall base-x
crash_function: _add_from_xml_filename
exception_type: _libpycomps.ParserError
executable:     /bin/dnf
kernel:         4.14.13-300.fc27.x86_64
package:        dnf-2.7.5-2.fc27
reason:         comps.py:328:_add_from_xml_filename:_libpycomps.ParserError: Fatal parser error
runlevel:       N 5
type:           Python3
uid:            0

Comment 11 FlyDove 2018-01-24 10:28:59 UTC
*** Bug 1538018 has been marked as a duplicate of this bug. ***

Comment 12 Adam Williamson 2018-01-24 11:38:37 UTC
Note, this was caused by bad repodata (empty comps.xml) making it out to the mirrors; apparently there was an NFS hiccup during the sync which caused this to happen. releng is running an emergency update push to clear up the problem. Will leave the bug open just in case DNF folks think it makes sense to handle this case a bit more cleanly (i.e. not just crash on the parser exception but handle or pre-empt it somehow).

Comment 13 Ahmed Hosny 2018-01-24 14:59:57 UTC
*** Bug 1538166 has been marked as a duplicate of this bug. ***

Comment 14 Ahmed Hosny 2018-01-24 15:41:25 UTC
Just did `dnf clean metadata` then `dnf update` and the problem resolved.

Comment 15 Marek Blaha 2018-01-25 08:45:40 UTC
*** Bug 1538151 has been marked as a duplicate of this bug. ***

Comment 17 Daniel Mach 2018-01-31 12:06:53 UTC
*** Bug 1538036 has been marked as a duplicate of this bug. ***

Comment 18 Marek Blaha 2018-02-13 06:21:49 UTC
*** Bug 1544407 has been marked as a duplicate of this bug. ***

Comment 19 Marek Blaha 2018-06-11 13:32:19 UTC
*** Bug 1586014 has been marked as a duplicate of this bug. ***

Comment 20 Jaroslav Mracek 2018-06-28 08:24:29 UTC
The issue is solved by dnf-3.0.1-1 that was released into rawhide.