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 634595 - yum traceback when running concurrent yum and rpm transactions
Summary: yum traceback when running concurrent yum and rpm transactions
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: yum
Version: 6.0
Hardware: All
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: James Antill
QA Contact: Karel Srot
URL:
Whiteboard:
Depends On: 629274
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-09-16 13:31 UTC by Karel Srot
Modified: 2014-01-21 06:19 UTC (History)
2 users (show)

Fixed In Version: yum-3.2.29-11.el6
Doc Type: Bug Fix
Doc Text:
Previously, when concurrent yum and RPM transactions were running, yum sometimes terminated with a traceback. With this update, transaction conflicts are properly recognised, and when they are encountered, yum exits with a proper error message.
Clone Of:
Environment:
Last Closed: 2011-05-19 13:33:57 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
bug reproducer (947 bytes, application/x-gzip)
2010-09-16 13:31 UTC, Karel Srot
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2011:0602 0 normal SHIPPED_LIVE yum bug fix and enhancement update 2011-05-19 09:37:29 UTC

Description Karel Srot 2010-09-16 13:31:27 UTC
Created attachment 447745 [details]
bug reproducer

Description of problem:
yum traceback when running concurrent yum and rpm transactions. 
I know this is not a good idea at all.. :-)

Version-Release number of selected component (if applicable):
yum-3.2.27-14.el6

How reproducible:
occasionally

Steps to Reproduce:
perform cuncurrent yum and rpm transactions - see the attached reproducer.
Please note that you may have to run the test several times to trigger the bug, maybe you have to play with sleep intervals in the testing. I was running it in a slow virtual host.
  
Actual results:
---> Package dummypkg8.x86_64 0:1.0-1 set to be updated
---> Package dummypkg9.x86_64 0:1.0-1 set to be updated
Error: Rpmdb changed underneath us
 You could try using --skip-broken to work around the problem
Traceback (most recent call last):
  File "/usr/bin/yum", line 29, in <module>
    yummain.user_main(sys.argv[1:], exit_code=True)
  File "/usr/share/yum-cli/yummain.py", line 254, in user_main
    errcode = main(args)
  File "/usr/share/yum-cli/yummain.py", line 174, in main
    if not base._rpmdb_warn_checks(out=verbose_logger.info, warn=False):
  File "/usr/lib/python2.6/site-packages/yum/__init__.py", line 1142, in _rpmdb_warn_checks
    probs.extend(self.rpmdb.check_dependencies())
  File "/usr/lib/python2.6/site-packages/yum/rpmsack.py", line 1247, in check_dependencies
    for rreq in pkg.requires:
  File "/usr/lib/python2.6/site-packages/yum/packages.py", line 508, in <lambda>
    requires = property(fget=lambda self: self.returnPrco('requires'))
  File "/usr/lib/python2.6/site-packages/yum/packages.py", line 1147, in returnPrco
    self._populatePrco()
  File "/usr/lib/python2.6/site-packages/yum/packages.py", line 1161, in _populatePrco
    hdr = self._get_hdr()
  File "/usr/lib/python2.6/site-packages/yum/rpmsack.py", line 66, in _get_hdr
    raise Errors.PackageSackError, 'Rpmdb changed underneath us'
yum.Errors.PackageSackError: Rpmdb changed underneath us


Expected results:
error displayed and a peaceful exit

Comment 1 James Antill 2010-09-16 16:33:15 UTC
It's priority high to provide just the error message instead of a traceback?

We currently don't catch Errors.PackageSackError, but we can do (esp. when not run in debug mode, say). So I'm happy to ACK this for 6.1.

Comment 5 Karel Srot 2011-03-11 11:26:52 UTC
While testing with yum-3.2.29-8.el6.noarch I am getting following error:

---> Package dummyA.noarch 0:1.0-1 will be erased
---> Package dummyB.noarch 0:1.0-1 will be erased
---> Package dummypkg10.x86_64 0:1.0-1 will be erased
Error: Rpmdb changed underneath us
 You could try using --skip-broken to work around the problem
Traceback (most recent call last):
  File "/usr/bin/yum", line 29, in <module>
    yummain.user_main(sys.argv[1:], exit_code=True)
  File "/usr/share/yum-cli/yummain.py", line 274, in user_main
    errcode = main(args)
  File "/usr/share/yum-cli/yummain.py", line 194, in main
    warn_checks()
NameError: global name 'warn_checks' is not defined

Comment 7 Karel Srot 2011-03-25 12:32:44 UTC
Another error with yum-3.2.29-10.el6

Error: Rpmdb changed underneath us
 You could try using --skip-broken to work around the problem
Traceback (most recent call last):
  File "/usr/bin/yum", line 29, in <module>
    yummain.user_main(sys.argv[1:], exit_code=True)
  File "/usr/share/yum-cli/yummain.py", line 274, in user_main
    errcode = main(args)
  File "/usr/share/yum-cli/yummain.py", line 194, in main
    rpmdb_warn_checks()
  File "/usr/share/yum-cli/yummain.py", line 82, in rpmdb_warn_checks
    except YumBaseError, e:
NameError: global name 'YumBaseError' is not defined

Comment 8 James Antill 2011-03-25 13:29:02 UTC
*sigh* ... it's Errors.YumBaseError ... I'll get a fixed package out today.

Comment 10 Tomas Capek 2011-05-17 12:01:58 UTC
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
Previously, when concurrent yum and RPM transactions were running, yum sometimes terminated with a traceback. With this update, transaction conflicts are properly recognised, and when they are encountered, yum exits with a proper error message.

Comment 11 errata-xmlrpc 2011-05-19 13:33:57 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2011-0602.html


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