Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 163431 - _sqlite.OperationalError: database is locked
Summary: _sqlite.OperationalError: database is locked
Alias: None
Product: Fedora
Classification: Fedora
Component: yum
Version: 4
Hardware: i386
OS: Linux
Target Milestone: ---
Assignee: Jeremy Katz
QA Contact:
Depends On:
TreeView+ depends on / blocked
Reported: 2005-07-16 10:25 UTC by Fehér János
Modified: 2014-01-21 22:52 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2005-07-29 18:59:03 UTC

Attachments (Terms of Use)

Description Fehér János 2005-07-16 10:25:11 UTC
Description of problem:

I've tried to upgrade 15 of our workstations from FC3 to FC4. The nodes are
using a central yum cache via NFS. While the upgrading some of them had to be
aborted. They give the error msg on the bottom. Some of them has finished the
upgrade "successfully" but they do the same. Some of them (3) is ok.

I've tried to delete __db.* from /var/lib/rpm , but it wasn't help.

Version-Release number of selected component (if applicable):


Steps to Reproduce:
1. Upgrade from FC3 latest to FC4
2. Abort the upgrade
Actual results:

Repository extras already added, not adding again
Setting up Upgrade Process
Setting up repositories
livna                     100% |=========================|  951 B    00:00
updates-released          100% |=========================|  951 B    00:00
base                      100% |=========================| 1.1 kB    00:00
extras                    100% |=========================| 1.1 kB    00:00
Reading repository metadata in from local files
Traceback (most recent call last):
  File "/usr/bin/yum", line 15, in ?
  File "/usr/share/yum-cli/", line 72, in main
    result, resultmsgs = do()
  File "/usr/share/yum-cli/", line 428, in doCommands
    return self.updatePkgs()
  File "/usr/share/yum-cli/", line 877, in updatePkgs
  File "/usr/share/yum-cli/", line 78, in doRepoSetup
  File "", line 241, in doSackSetup
  File "", line 283, in populateSack
  File "", line 96, in getPrimary
  File "", line 83, in _getbase
  File "", line 79, in getDatabase
  File "", line 239, in makeSqliteCacheFile
  File "", line 150, in createTablesPrimary
  File "", line 188, in createDbInfo
line 244, in execute
_sqlite.OperationalError: database is locked

Expected results:

An upgrade-ed system.

Additional info: rpm, yum are fresh, installed from the central repository.

Comment 1 Seth Vidal 2005-07-16 13:49:16 UTC
the yum cache on nfs is where the problem is. You've got multiple clients
accessing the same sqlite db via nfs and at least one of them is locking the db
for a while.

That's the problem.

Comment 2 Fehér János 2005-07-18 08:04:08 UTC
The problem is permanent, it's still exists since 2 weeks. Only one client
access the cache at the same time. If a client were upgraded successfully, they
can be again without problem.

Comment 3 Seth Vidal 2005-07-22 15:59:26 UTC
right - b/c nfs locking of sqlite dbs is pretty much not going to work.
The resolution to this bug, most likely, is "don't do that"

Comment 4 Fehér János 2005-07-24 09:52:19 UTC
Seth drove me to a workaround:

1) copy the whole NFS repo to the disk of the machine which needs upgrading
2) then yum upgrade

It's not too admin friendly, but works.

Comment 5 Seth Vidal 2005-07-29 18:59:03 UTC
or just setup a local repo in nfs and use it from there.

either way - closing - wontfix

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