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 1904490 - Backtrace when performing "yum module remove --all perl:common"
Summary: Backtrace when performing "yum module remove --all perl:common"
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: dnf
Version: 8.3
Hardware: All
OS: Linux
high
high
Target Milestone: rc
: 8.0
Assignee: Jaroslav Mracek
QA Contact: Jan Blazek
URL:
Whiteboard:
Depends On: 1951411
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-12-04 15:51 UTC by Renaud Métrich
Modified: 2021-11-10 09:33 UTC (History)
3 users (show)

Fixed In Version: dnf-4.7.0-1.el8
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-11-09 19:52:16 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2021:4464 0 None None None 2021-11-09 19:52:27 UTC

Description Renaud Métrich 2020-12-04 15:51:45 UTC
Description of problem:

When performing "yum module remove --all perl:common" command to remove the perl-5.26 module and associated packages (which has none because apparently the module is "special") the following backtrace is printed:

-------- 8< ---------------- 8< ---------------- 8< ---------------- 8< --------
# yum module remove --all perl:common
[...]
Traceback (most recent call last):
  File "/usr/bin/yum", 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 201, in user_main
    errcode = main(args)
  File "/usr/lib/python3.6/site-packages/dnf/cli/main.py", line 67, in main
    return _main(base, args, cli_class, option_parser_class)
  File "/usr/lib/python3.6/site-packages/dnf/cli/main.py", line 106, in _main
    return cli_run(cli, base)
  File "/usr/lib/python3.6/site-packages/dnf/cli/main.py", line 122, in cli_run
    cli.run()
  File "/usr/lib/python3.6/site-packages/dnf/cli/cli.py", line 1162, in run
    return self.command.run()
  File "/usr/lib/python3.6/site-packages/dnf/cli/commands/module.py", line 377, in run
    self.subcmd.run_on_module()
  File "/usr/lib/python3.6/site-packages/dnf/cli/commands/module.py", line 254, in run_on_module
    modules_from_specs = self._get_modules_from_name_stream_specs()
  File "/usr/lib/python3.6/site-packages/dnf/cli/commands/module.py", line 48, in _get_modules_from_name_stream_specs
    name = nsvcap.name if nsvcap.name else ""
AttributeError: 'NoneType' object has no attribute 'name'
-------- 8< ---------------- 8< ---------------- 8< ---------------- 8< --------


Version-Release number of selected component (if applicable):

dnf-4.2.23-4.el8.noarch

How reproducible:

Always

Steps to Reproduce:
1. Enable "perl:5.26" module and install a package

  # yum -y module enable perl:5.26
  # yum -y install perl-DBI

2. Remove the module

  # yum -y module remove --all perl:common


Actual results:

-------- 8< ---------------- 8< ---------------- 8< ---------------- 8< --------
Traceback (most recent call last):
  File "/usr/bin/yum", 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 201, in user_main
    errcode = main(args)
  File "/usr/lib/python3.6/site-packages/dnf/cli/main.py", line 67, in main
    return _main(base, args, cli_class, option_parser_class)
  File "/usr/lib/python3.6/site-packages/dnf/cli/main.py", line 106, in _main
    return cli_run(cli, base)
  File "/usr/lib/python3.6/site-packages/dnf/cli/main.py", line 122, in cli_run
    cli.run()
  File "/usr/lib/python3.6/site-packages/dnf/cli/cli.py", line 1162, in run
    return self.command.run()
  File "/usr/lib/python3.6/site-packages/dnf/cli/commands/module.py", line 377, in run
    self.subcmd.run_on_module()
  File "/usr/lib/python3.6/site-packages/dnf/cli/commands/module.py", line 254, in run_on_module
    modules_from_specs = self._get_modules_from_name_stream_specs()
  File "/usr/lib/python3.6/site-packages/dnf/cli/commands/module.py", line 48, in _get_modules_from_name_stream_specs
    name = nsvcap.name if nsvcap.name else ""
AttributeError: 'NoneType' object has no attribute 'name'
-------- 8< ---------------- 8< ---------------- 8< ---------------- 8< --------

Expected results:

No backtrace.

Additional info:

The fact that "perl:5.26" may be some special module may explain this, I don't know:

# yum module info perl:5.26
[...]
Artifacts        :             <<<<< EMPTY

Comment 1 Jaroslav Mracek 2020-12-08 08:22:54 UTC
Thank you very much for report.

I create a patch that resolves the issue - https://github.com/rpm-software-management/dnf/pull/1699
CI-test: https://github.com/rpm-software-management/ci-dnf-stack/pull/922

Comment 8 errata-xmlrpc 2021-11-09 19:52:16 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 (Moderate: dnf security and bug fix 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/RHSA-2021:4464


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