Bug 88693 - RPM hangs while modifying database if multiple readers open
Summary: RPM hangs while modifying database if multiple readers open
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: rpm
Version: 9
Hardware: athlon
OS: Linux
Target Milestone: ---
Assignee: Jeff Johnson
QA Contact: Mike McLean
Depends On:
TreeView+ depends on / blocked
Reported: 2003-04-11 22:54 UTC by Scott Hutton
Modified: 2007-04-18 16:52 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2003-04-14 14:39:46 UTC

Attachments (Terms of Use)

Description Scott Hutton 2003-04-11 22:54:24 UTC
Description of problem:

  RPM hangs while modifying database if multiple readers open.

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

  rpm 4.2.0-0.69

How reproducible:

  Very.  I've been able to reproduce this every time I've tried.

Steps to Reproduce:
1. Verify that there are *no* __db* files in /var/lib/rpm
2. Open three terminals
3. In the first, execute "rpm -vv -qa"
4. Once output begins in the first terminal, execute "rpm -vv -qa" in the second
5. Once output begins in teh second terminal, execute "rpm -e inews" (or some
other unnecessary package).
Actual results:

The two queries will complete.  The removal of the package will hang.  A trace
of the process at this point reveals it is stuck in a futex() call.  It must be
killed forcefully.  It will still have three __db files open according to lsof
(though no open file descriptors to them), and all three remain on disk.  The
__db files, of course, must be removed before normal RPM interaction can resume.

Expected results:

Package should be removed.

Additional info:

This is on a Red Hat 9 system with about 900 packages installed, glibc
2.3.2-27.9 (and has been booted since installation), and all patches released
through April 10th, 2003.  System has plenty of memory free and a 1GHz Athlon CPU.

Comment 1 Jeff Johnson 2003-04-14 14:39:46 UTC
    while true; do rpm -qa; sleep 1; done
in 2 different windows, and then trying
    rpm -e time
works for me with glibc-2.3.2-11.9 and kernel-smp-2.4.20-2.54

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