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 687889 - [abrt] crash in yum-3.2.27-2.fc12: utils.py:108:show_lock_owner:TypeError: 'NoneType' object is unsubscriptable
Summary: [abrt] crash in yum-3.2.27-2.fc12: utils.py:108:show_lock_owner:TypeError: 'N...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: yum
Version: 6.0
Hardware: x86_64
OS: Unspecified
medium
medium
Target Milestone: rc
: ---
Assignee: James Antill
QA Contact: Karel Srot
URL:
Whiteboard: abrt_hash:7cdc7b34
Depends On: 588002
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-03-15 16:34 UTC by Red Hat Case Diagnostics
Modified: 2018-11-14 13:51 UTC (History)
1 user (show)

Fixed In Version: yum-3.2.29-12.el6
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-05-19 13:34:15 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
File: backtrace (646 bytes, text/plain)
2011-03-15 16:34 UTC, Red Hat Case Diagnostics
no flags Details
File: backtrace (646 bytes, text/plain)
2011-04-05 17:01 UTC, Red Hat Case Diagnostics
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 Red Hat Case Diagnostics 2011-03-15 16:34:12 UTC
+++ This bug was initially created as a clone of Bug 588002 +++

abrt 1.0.9 detected a crash.

architecture: x86_64
cmdline: /usr/bin/python /usr/bin/yum -y install esound-libs.i686
component: yum
executable: /usr/bin/yum
kernel: 2.6.32.11-99.fc12.x86_64
package: yum-3.2.27-2.fc12
reason: utils.py:108:show_lock_owner:TypeError: 'NoneType' object is unsubscriptable
release: Fedora release 12 (Constantine)

backtrace
-----
utils.py:108:show_lock_owner:TypeError: 'NoneType' object is unsubscriptable

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 103, in main
    show_lock_owner(e.pid, logger)
  File "/usr/share/yum-cli/utils.py", line 108, in show_lock_owner
    if ps['name'] == 'yumBackend.py':
TypeError: 'NoneType' object is unsubscriptable

Local variables in innermost frame:
ps: None
logger: <logging.Logger instance at 0x1aa1f38>
pid: 8215

--- Additional comment from tortugero onSun May 02 04:46:08 EDT 2010 ---
Created attachment 410755 [details]
File: backtrace

--- Additional comment from james.antill onSun May 02 05:23:47 EDT 2010 ---
This Bug is already fixed, Run: yum update yum

--- Additional comment from bugzilla.acct onTue Jun 15 12:45:49 EDT 2010 ---
Still occurs in 3.2.27-4

--- Additional comment from mads onThu Jun 17 21:44:52 EDT 2010 ---
Confirmed - abrt just reported this crash with yum-3.2.27-4.fc13. It filed it as a duplicate of this, so I reopen it.

AFAICS get_process_info can return None for example in the racy situation where the process just went away.

Proposed patch:

--- /usr/share/yum-cli/utils.py.org	2010-06-17 23:42:45.000000000 +0200
+++ /usr/share/yum-cli/utils.py	2010-05-03 17:53:03.000000000 +0200
@@ -100,10 +100,10 @@
     return ps
 
 def show_lock_owner(pid, logger):
-    ps = get_process_info(pid)
-    if not ps:
+    if not pid:
         return
 
+    ps = get_process_info(pid)
     # This yumBackend isn't very friendly, so...
     if ps['name'] == 'yumBackend.py':
         nmsg = _("  The other application is: PackageKit")

--- Additional comment from mads onThu Jun 17 21:46:00 EDT 2010 ---
Baah:

--- /usr/share/yum-cli/utils.py.org	2010-05-03 17:53:03.000000000 +0200
+++ /usr/share/yum-cli/utils.py	2010-06-17 23:42:45.000000000 +0200
@@ -100,10 +100,10 @@
     return ps
 
 def show_lock_owner(pid, logger):
-    if not pid:
+    ps = get_process_info(pid)
+    if not ps:
         return
 
-    ps = get_process_info(pid)
     # This yumBackend isn't very friendly, so...
     if ps['name'] == 'yumBackend.py':
         nmsg = _("  The other application is: PackageKit")

--- Additional comment from j.heather.uk onFri Aug 13 11:18:47 EDT 2010 ---
Still happening... see below. Looking at my yum log, this was after the 6 Aug update to yum-3.2.28-1.fc13.noarch, but before the 8 Aug updates to yum-utils and some plugins.

Looks like the patch Mads provided above hasn't been committed.

James

---------------

Another app is currently holding the yum lock; waiting for it to exit...
  The other application is: yum-updatesd-he
    Memory : 220 M RSS (600 MB VSZ)
    Started: Sun Aug  8 09:04:31 2010 - 09:03 ago
    State  : Sleeping, pid: 4565
Another app is currently holding the yum lock; waiting for it to exit...
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 258, in user_main
    errcode = main(args)
  File "/usr/share/yum-cli/yummain.py", line 104, in main
    show_lock_owner(e.pid, logger)
  File "/usr/share/yum-cli/utils.py", line 112, in show_lock_owner
    nmsg = _("  The other application is: %s") % ps['name']
TypeError: 'NoneType' object is unsubscriptable

--- Additional comment from mads onFri Aug 13 11:46:00 EDT 2010 ---
(In reply to comment #6)
> Looks like the patch Mads provided above hasn't been committed.

Another fix was committed instead - but that fix wasn't complete.

I now propose this:

--- /usr/share/yum-cli/utils.py	2010-08-09 21:34:16.000000000 +0200
+++ utils.py	2010-08-13 13:43:49.000000000 +0200
@@ -101,12 +101,13 @@
     return ps
 
 def show_lock_owner(pid, logger):
-    if not pid:
+    ps = get_process_info(pid)
+    if not ps:
+        logger.critical(_("  Process %s not found", pid))
         return
 
-    ps = get_process_info(pid)
     # This yumBackend isn't very friendly, so...
-    if ps is not None and ps['name'] == 'yumBackend.py':
+    if ps['name'] == 'yumBackend.py':
         nmsg = _("  The other application is: PackageKit")
     else:
         nmsg = _("  The other application is: %s") % ps['name']

--- Additional comment from james.antill onTue Aug 17 17:18:41 EDT 2010 ---
Ok, patch from comment #7 (without the message) is now upstream.

--- Additional comment from triage.org onWed Nov 03 15:51:44 EDT 2010 ---

This message is a reminder that Fedora 12 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 12.  It is Fedora's policy to close all
bug reports from releases that are no longer maintained.  At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '12'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 12's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 12 is end of life.  If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora please change the 'version' of this 
bug to the applicable version.  If you are unable to change the version, 
please add a comment here and someone will do it for you.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

--- Additional comment from triage.org onFri Dec 03 15:12:37 EST 2010 ---

Fedora 12 changed to end-of-life (EOL) status on 2010-12-02. Fedora 12 is 
no longer maintained, which means that it will not receive any further 
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of 
Fedora please feel free to reopen this bug against that version.

Thank you for reporting this bug and we are sorry it could not be fixed.

Comment 1 Red Hat Case Diagnostics 2011-03-15 16:34:34 UTC
Created attachment 485550 [details]
File: backtrace

Comment 8 Red Hat Case Diagnostics 2011-04-05 17:01:16 UTC
Created attachment 490037 [details]
File: backtrace

Comment 12 errata-xmlrpc 2011-05-19 13:34:15 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.