Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
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 2066334

Summary: dnf fails with "Error: basic_string::_M_construct null not valid" when reading repodata created with a distro flag
Product: Red Hat Enterprise Linux 8 Reporter: jcastran
Component: libdnfAssignee: Jan Kolarik <jkolarik>
Status: CLOSED ERRATA QA Contact: Eva Mrakova <emrakova>
Severity: medium Docs Contact:
Priority: low    
Version: 8.5CC: james.antill, jkolarik, mbanas, unixi
Target Milestone: rcKeywords: Triaged
Target Release: ---Flags: pm-rhel: mirror+
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: libdnf-0.63.0-13.el8 Doc Type: No Doc Update
Doc Text:
If this bug requires documentation, please select an appropriate Doc Type value.
Story Points: ---
Clone Of:
: 2121659 (view as bug list) Environment:
Last Closed: 2023-05-16 09:06:42 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 2121659    

Description jcastran 2022-03-21 14:20:59 UTC
Description of problem:
If repository metadata is created with "--distro X", dnf is not able to parse the repodata.

  [root@r8 repo]# yum repolist -v
  Loaded plugins: builddep, changelog, config-manager, copr, debug, debuginfo-install, download, generate_completion_cache, groups-manager, kpatch, needs-restarting, playground, product-id, repoclosure, repodiff, repograph, repomanage, reposync, subscription-manager, uploadprofile, versionlock
  Updating Subscription Management repositories.
  YUM version: 4.7.0
  cachedir: /var/cache/dnf
  test                                                                      48 kB/s | 1.9 kB     00:00
  Error: basic_string::_M_construct null not valid
  Ignoring repositories: test
Version-Release number of selected component (if applicable):


How reproducible:
Everytime

Steps to Reproduce:
  # mkdir repo && cd ./repo
  # yumdownloader bash
  # createrepo . --distro RHEL8
  # cat /etc/yum.repos.d/test.repo
    [test]
    name=test
    baseurl=file:///root/repo
    enabled=1
  # yum repolist -v
    Error: basic_string::_M_construct null not valid
    Ignoring repositories: test

Actual results:
    Error: basic_string::_M_construct null not valid
    Ignoring repositories: test

Expected results:
functional repo

Additional info:
This works for RHEL 7 systems tested the same way.

Comment 1 Jaroslav Mracek 2022-03-28 14:10:42 UTC
The issue is reproducible with dnf-4.11.1 and libdnf-0.66.0. It looks like that the issue is in DNF for a long time and it is the only report therefore I am setting low priority. We will revisit the issue around 8.9 but there is a low change that we will fix it because there are more important issues.

Comment 2 Jan Kolarik 2022-08-10 05:30:13 UTC
Following PRs were queued to fix this:

fix:   https://github.com/rpm-software-management/libdnf/pull/1571
tests: https://github.com/rpm-software-management/ci-dnf-stack/pull/1139

Comment 4 Jan Kolarik 2022-08-26 06:56:11 UTC
Cloned into RHEL 9 ticket https://bugzilla.redhat.com/show_bug.cgi?id=2121659.

Comment 15 errata-xmlrpc 2023-05-16 09:06:42 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 (libdnf 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-2023:2979