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 2124512 - Concurrent identical dnf package requests fail with a backtrace
Summary: Concurrent identical dnf package requests fail with a backtrace
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: dnf
Version: 8.6
Hardware: All
OS: Linux
low
medium
Target Milestone: rc
: ---
Assignee: Nicola Sella
QA Contact: Tomáš Bajer
Mariya Pershina
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-09-06 11:47 UTC by Pavel Moravec
Modified: 2023-05-16 11:09 UTC (History)
5 users (show)

Fixed In Version: dnf-4.7.0-15.el8
Doc Type: No Doc Update
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-05-16 09:06:59 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker RHELPLAN-133300 0 None None None 2022-09-06 11:51:06 UTC
Red Hat Product Errata RHBA-2023:2980 0 None None None 2023-05-16 09:07:24 UTC

Description Pavel Moravec 2022-09-06 11:47:18 UTC
Description of problem:
Running "dnf reinstall <package> -y" concurrently(*), all except the first request fails with a backtrace.

(*) about legitimacy of such use case: though it seems bit artificial, it can happen in some automated deployments when the same requestis fired (redundantly) concurrently. E.g. I discovered it by firing "reinstall package" request in Satellite twice by a mistake. More legitimate use cases can be e.g. puppet or ansible playbooks.
 

Version-Release number of selected component (if applicable):
dnf-4.7.0-8.el8.noarch


How reproducible:
100%


Steps to Reproduce:
1. Run in three terminals concurrently:
dnf reinstall sos -y


Actual results:
1st succeeds, 2nd and 3rd fails with:
..
Dependencies resolved.
==============================================================================================================================================================================================
 Package                             Architecture                           Version                                       Repository                                                     Size
==============================================================================================================================================================================================
Reinstalling:
 sos                                 noarch                                 4.2-15.el8                                    rhel-8-for-x86_64-baseos-rpms                                 765 k

Transaction Summary
==============================================================================================================================================================================================

Total size: 765 k
Installed size: 2.5 M
Downloading Packages:
[SKIPPED] sos-4.2-15.el8.noarch.rpm: Already downloaded                                                                                                                                      
Running transaction check
Waiting for process with pid 199231 to finish.
The downloaded packages were saved in cache until the next successful transaction.
You can remove cached packages by executing 'dnf clean packages'.
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 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 130, in cli_run
    ret = resolving(cli, base)
  File "/usr/lib/python3.6/site-packages/dnf/cli/main.py", line 176, in resolving
    base.do_transaction(display=displays)
  File "/usr/lib/python3.6/site-packages/dnf/cli/cli.py", line 246, in do_transaction
    tid = super(BaseCli, self).do_transaction(display)
  File "/usr/lib/python3.6/site-packages/dnf/base.py", line 908, in do_transaction
    self.transaction._populate_rpm_ts(self._ts)
  File "/usr/lib/python3.6/site-packages/dnf/db/group.py", line 337, in _populate_rpm_ts
    ts.addErase(tsi.pkg.idx)
  File "/usr/lib64/python3.6/site-packages/rpm/transaction.py", line 109, in addErase
    raise rpm.error("package not installed")
_rpm.error: package not installed
[root@pmoravec-rhel8 ~]# echo $?
1
[root@pmoravec-rhel8 ~]# 


Expected results:
No such backtrace but proper package reinstallation.


Additional info:
yum on RHEL7.9 works fine. Havent checked RHEL9 (let me know if I should)

Comment 10 errata-xmlrpc 2023-05-16 09:06:59 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 (dnf 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:2980


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