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 83236 - rpm leaves behind __db.00* lockfiles after any rpm query
Summary: rpm leaves behind __db.00* lockfiles after any rpm query
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: rpm
Version: 8.0
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Jeff Johnson
QA Contact: Mike McLean
Depends On:
TreeView+ depends on / blocked
Reported: 2003-01-31 18:19 UTC by M Glass
Modified: 2005-10-31 22:00 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2003-01-31 18:27:56 UTC

Attachments (Terms of Use)

Description M Glass 2003-01-31 18:19:25 UTC
Description of problem:
After having many troubles with rpm hangs, I performed the rpm 
database "recovery" (, which gave no 

(I have been trying to install an Openview Operations agent (has rpms), which 
was sporadically failing.  It uses an install script which basically does 
about six "rpm -i" commands to install its rpms.)

Somehow the database is in some state where any rpm command (that actually 
reads) will cause it to leave behind the /var/lib/rpm/__db.00* lock files.  
After this, database reads will work, but write operations will hang.  Even 
operations such as "--rebuilddb" will leave behind the lock files.  Queries 
for non-existant packages will also leave behind the files.

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

How reproducible:

Steps to Reproduce:
1. Get a bad package installation that causes hangs (can be provided)
2. rpm -q anything
3. Note existence of lock files.
4. Delete lock files before you try anything that writes to database...
Actual results:
# ls /var/lib/rpm/__db.00* -l
-rw-r--r--+   1 root     root         8192 Jan 31 10:21 __db.001
-rw-r--r--+   1 root     root      1310720 Jan 31 10:21 __db.002
-rw-r--r--+   1 root     root       360448 Jan 31 10:21 __db.003

Expected results:
No lock files present.

Additional info:
Running base Red Hat 8.0 upgraded from 7.1. rpm version: rpm-4.1-1.06

Comment 1 Jeff Johnson 2003-01-31 18:27:56 UTC
Note carefully:
    The __db files are not "lock files" but files that contain locks.

The existence of __db files is not your problem, the existence
of stale locks is.

There are 2 main causes of stale locks.
1) missed SIGCHLD causes rpm-4.1 to "hang"
    If using rpm-4.1-1.06, upgrade to rpm-4.1-9 packages
    from, the missed
    SIGCHLD is fixed there.

2) abnormal termination (e.g. "kill -9") leaves stale locks
    It's up to the user to do "rm -f /var/lib/rpm/__db*" in this

A more complete description is in bugzilla, look for the summary
    rpm-4.1 hangs: READ THIS FIRST

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