Bug 676214

Summary: yum wedged, can't update anything because of errors related to gnome-python2-gnome
Product: [Fedora] Fedora Reporter: Przemek Klosowski <przemek>
Component: yumAssignee: Seth Vidal <skvidal>
Status: CLOSED WONTFIX QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 14CC: ffesti, james.antill, maxamillion, pmatilai, tim.lauridsen
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-08-16 15:49:02 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Przemek Klosowski 2011-02-09 04:41:56 UTC
Description of problem:
after successfully updating Fedora 14 multiple times, update stopped working due to a yum error (see below)

Version-Release number of selected component (if applicable):
yum-3.2.28-5.fc14.noarch, relatively current F14

How reproducible: every time


Steps to Reproduce:
1. on my system, every 'yum update' command fails this way
2.
3.
  
Actual results:

yum update piklab
Loaded plugins: auto-update-debuginfo, presto, refresh-packagekit
Found 90 installed debuginfo package(s)
Enabling rpmfusion-free-updates-debuginfo: RPM Fusion for Fedora 14 - Free - Updates Debug
Enabling rpmfusion-free-debuginfo: RPM Fusion for Fedora 14 - Free - Debug
Enabling fedora-debuginfo: Fedora 14 - i386 - Debug
Enabling updates-debuginfo: Fedora 14 - i386 - Updates - Debug
Setting up Update Process
Resolving Dependencies
--> Running transaction check
---> Package piklab.i686 0:0.15.10-1.fc14 set to be updated
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 154, in main
    (result, resultmsgs) = base.buildTransaction() 
  File "/usr/lib/python2.7/site-packages/yum/__init__.py", line 919, in buildTransaction
    (rescode, restring) = self.resolveDeps()
  File "/usr/lib/python2.7/site-packages/yum/depsolve.py", line 722, in resolveDeps
    for po, dep in self._checkFileRequires():
  File "/usr/lib/python2.7/site-packages/yum/depsolve.py", line 971, in _checkFileRequires
    self.installedFileProviders = self.rpmdb.fileRequiresData()
  File "/usr/lib/python2.7/site-packages/yum/rpmsack.py", line 718, in fileRequiresData
    iFR, iFP = self._read_file_requires()
  File "/usr/lib/python2.7/site-packages/yum/rpmsack.py", line 661, in _read_file_requires
    rpmdbv = self.simpleVersion(main_only=True)[0]
  File "/usr/lib/python2.7/site-packages/yum/rpmsack.py", line 965, in simpleVersion
    if 'checksum_type' in ydbi and 'checksum_data' in ydbi:
  File "/usr/lib/python2.7/site-packages/yum/rpmsack.py", line 1672, in __contains__
    x = self.get(attr)
  File "/usr/lib/python2.7/site-packages/yum/rpmsack.py", line 1702, in get
    res = self._read(attr)
  File "/usr/lib/python2.7/site-packages/yum/rpmsack.py", line 1619, in _read
    info = misc.stat_f(fn)
  File "/usr/lib/python2.7/site-packages/yum/misc.py", line 907, in stat_f
    return os.stat(filename)
OSError: [Errno 20] Not a directory: '/var/lib/yum/yumdb/g/a3dbcf24aa1fd0c0002512b4c88dfd823ac86216-gnome-python2-gnome-2.28.1-3.fc14-i686/checksum_type'


Expected results:
successful update


Additional info:

Comment 1 Przemek Klosowski 2011-02-09 04:49:04 UTC
In a fit of cargo culting I tried "yum clean headers" and "yum clean all" but they don't help

Comment 2 Tim Lauridsen 2011-02-09 08:06:19 UTC
Could you try this as root:
yumdb sync gnome-python2-gnome

Comment 3 Przemek Klosowski 2011-02-10 05:06:35 UTC
yumdb sync was added on Oct 26, and F14 has yum-utils version 1.1.28 from August.

I can't use yum with a different repo, so I instead took the patch from 
http://yum.baseurl.org/gitweb?p=yum-utils.git;a=commitdiff;h=9382ceee464a7e0e389f85f5c8c517d106909b24

and made a local yumdb. Unfortunately, it  crashes with this trace:

./yumdb sync gnome-python2-gnome
Loaded plugins: auto-update-debuginfo, presto, refresh-packagekit
Found 90 installed debuginfo package(s)
Enabling rpmfusion-free-updates-debuginfo: RPM Fusion for Fedora 14 - Free - Updates Debug
Enabling rpmfusion-free-debuginfo: RPM Fusion for Fedora 14 - Free - Debug
Enabling fedora-debuginfo: Fedora 14 - i386 - Debug
Enabling updates-debuginfo: Fedora 14 - i386 - Updates - Debug
gnome-python2-gnome-2.28.1-3.fc14.i686
Traceback (most recent call last):
  File "./yumdb", line 231, in <module>
    main()
  File "./yumdb", line 227, in main
    run_cmd(yb, args)
  File "./yumdb", line 188, in run_cmd
    setattr(pkg.yumdb_info, ykey, ndata[ykey])
  File "/usr/lib/python2.7/site-packages/yum/rpmsack.py", line 1659, in __setattr__
    self._write(attr, value)
  File "/usr/lib/python2.7/site-packages/yum/rpmsack.py", line 1595, in _write
    misc.unlink_f(fn + '.tmp')
  File "/usr/lib/python2.7/site-packages/yum/misc.py", line 899, in unlink_f
    os.unlink(filename)
OSError: [Errno 20] Not a directory: '/var/lib/yum/yumdb/g/a3dbcf24aa1fd0c0002512b4c88dfd823ac86216-gnome-python2-gnome-2.28.1-3.fc14-i686/changed_by.tmp'

Comment 4 Przemek Klosowski 2011-02-10 05:18:27 UTC
The root cause is of course  /var/lib/yum/yumdb/g/*gnome-python2-gnome which should be a directory but instead is a regular file.

I have four such files in the /var/lib/yum/yumdb/* directories, all with mtime March 1 2009. This system was upgraded from F13 but the packages appear to be from f14 which I installed sometime in the fall of 2010, so I don't understand the 2009 dates.

This unfortunately looks like a filesystem corruption on my system, but yum should deal with it more gracefully.

a3dbcf24aa1fd0c0002512b4c88dfd823ac86216-gnome-python2-gnome-2.28.1-3.fc14-i686

f3a9ebaebb51d94bb9e42a7254ffeb2bcefb2fd9-mysql-5.1.52-1.fc14-i686

ebb0e56182c33d9f78df2efb8a1ead022566bf85-qt3-devel-3.3.8b-30.fc14-i686

b00e6399257cc49668771e1d728aa46e676240d3-system-config-date-docs-1.0.10-1.fc14-noarch

87ec61512c8854bc7c9ff64b53d951764f9c6bdd-vorbis-tools-1.4.0-2.fc14.1-i686

Comment 5 Przemek Klosowski 2011-02-10 05:34:15 UTC
I found a workaround: I deleted the faulty files manually, and ran 

yumdb sync <packagenames>

which made yum happy, and allowed me to complete the update.

I think the 'sync' verb in yumdb should test for non-directories and clear them out.

Comment 6 Fedora End Of Life 2012-08-16 15:49:05 UTC
This message is a notice that Fedora 14 is now at end of life. Fedora 
has stopped maintaining and issuing updates for Fedora 14. It is 
Fedora's policy to close all bug reports from releases that are no 
longer maintained.  At this time, all open bugs with a Fedora 'version'
of '14' have been closed as WONTFIX.

(Please note: Our normal process is to give advanced warning of this 
occurring, but we forgot to do that. A thousand apologies.)

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, feel free to reopen 
this bug and simply change the 'version' to a later Fedora version.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we were unable to fix it before Fedora 14 reached 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, you are encouraged to click on 
"Clone This Bug" (top right of this page) and open it against that 
version of Fedora.

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