Bug 507127

Summary: update error: database disk image is malformed
Product: [Fedora] Fedora Reporter: tkbonito
Component: PackageKitAssignee: Richard Hughes <richard>
Status: CLOSED INSUFFICIENT_DATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: low    
Version: 11CC: ffesti, james.antill, lmacken, pmatilai, rhughes, richard, smparrish, tim.lauridsen, tkbonito
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-09-12 23:40:37 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 tkbonito 2009-06-21 07:02:35 UTC
I ran into a very small bug and was able to fix it. Im not sure if im supposed to report a bug if its easily fixable like this. I was given a window with this bug information:

Traceback (most recent call last):
  File "/usr/share/PackageKit/helpers/yum/yumBackend.py", line 2095, in get_distro_upgrades
    pkgs = self.yumbase.pkgSack.returnNewestByName(name='preupgrade')
  File "/usr/lib/python2.6/site-packages/yum/__init__.py", line 649, in <lambda>
    pkgSack = property(fget=lambda self: self._getSacks(),
  File "/usr/lib/python2.6/site-packages/yum/__init__.py", line 473, in _getSacks
    if self._pkgSack and thisrepo is None:
  File "/usr/lib/python2.6/site-packages/yum/packageSack.py", line 290, in __len__
    ret += len(sack)
  File "/usr/lib/python2.6/site-packages/yum/sqlitesack.py", line 337, in __len__
    pkg_num += self._sql_MD_pkg_num('primary', repo)
  File "/usr/lib/python2.6/site-packages/yum/sqlitesack.py", line 316, in _sql_MD_pkg_num
    return self._sql_MD('primary', repo, sql).fetchone()[0]
  File "/usr/lib/python2.6/site-packages/yum/sqlitesack.py", line 53, in newFunc
    raise Errors.RepoError, str(e)
RepoError: database disk image is malformed

I ran into this while having the gnome update manager opened and trying to run an update through the terminal. I wasnt using the gnome package update manager, i simply had the window open. The program then gave me an error and thereafter everytime it tried to update i was given this message in the terminal:

Error: database disk image is malformed

Note: I'm using the yum-fastestmirror/yum-presto plugins.

I was able to fix it by running: yum clean all

Comment 1 James Antill 2009-06-22 05:44:40 UTC
It looks like PK is using the yum data without holding the lock.

Comment 2 Richard Hughes 2009-06-22 07:52:14 UTC
(In reply to comment #1)
> It looks like PK is using the yum data without holding the lock.  

We don't do any action without getting the lock -- not having the lock is a fatal check done at init, and done before any other method is called.

(In reply to comment #0)
> I was able to fix it by running: yum clean all  

If this fixed it, then does "pkcon get-distro-upgrades" return an error or no error?

Comment 3 tkbonito 2009-06-22 21:59:59 UTC
no error received

Comment 4 Steven M. Parrish 2009-07-22 13:03:46 UTC
Ping?

-- 
Steven M. Parrish - KDE Triage Master
                  - PackageKit Triager
Fedora Bugzappers volunteer triage team
https://fedoraproject.org/wiki/BugZappers

Comment 5 Richard Hughes 2009-07-22 13:25:35 UTC
Has this issue even happened since?

Comment 6 Steven M. Parrish 2009-09-12 23:40:37 UTC
Since there are insufficient details provided in this report for us to investigate the issue further, and we have not received feedback to the information we have requested above, we will assume the problem was not reproducible, or has been fixed in one of the updates we have released for the reporter's distribution.

Users who have experienced this problem are encouraged to upgrade to the latest update of their distribution, and if this issue turns out to still be reproducible in the latest update, please reopen this bug with additional information.

Closing as INSUFFICIENT_DATA.

-- 
Steven M. Parrish - KDE Triage Master
                  - PackageKit Triager
Fedora Bugzappers volunteer triage team
https://fedoraproject.org/wiki/BugZappers