Bug 80471 - rpm hangs while installing a package.
rpm hangs while installing a package.
Status: CLOSED DEFERRED
Product: Red Hat Public Beta
Classification: Retired
Component: rpm (Show other bugs)
phoebe
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Jeff Johnson
Mike McLean
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2002-12-26 19:40 EST by Michael Fratoni
Modified: 2007-04-18 12:49 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2002-12-27 19:11:36 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Michael Fratoni 2002-12-26 19:40:51 EST
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.1) Gecko/20021003

Description of problem:
While installing a single package using 'rpm -ivh package.rpm',
the rpm process hung. The only way to force it to exit was by killing the
process with kill -9.

# rpm -ivh whichcd-0.2.1-1.noarch.rpm
warning: whichcd-0.2.1-1.noarch.rpm: V3 DSA signature: NOKEY, key ID
801bfd2b
Preparing...                ################################## [100%]
   1:whichcd               ################################## [100%]
Killed.

Attempting to query the installed package resulted in another hang.

[root@pheobe root]# rpm -q whichcd
Killed

Rebuilding the database, the packages was shown as not installed.

[root@pheobe root]# rm -f /var/lib/rpm/__db.00*
[root@pheobe root]# rpm --rebuilddb

[root@pheobe root]# rpm -q whichcd
package whichcd is not installed

At this point, installing it again worked.

[root@pheobe root]# rpm -ivh whichcd-0.2.1-1.noarch.rpm
warning: whichcd-0.2.1-1.noarch.rpm: V3 DSA signature: NOKEY, key ID
801bfd2b
Preparing...                ################################# [100%]
   1:whichcd               ################################# [100%]
[root@pheobe root]# rpm -q whichcd
whichcd-0.2.1-1


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


How reproducible:
Didn't try


Additional info:
Comment 1 Jeff Johnson 2002-12-27 09:25:59 EST
Try rpm-4.2-9 packages at
    ftp://people.redhat.com/jbj/test-4.1
There is a missed sigchild fixed there.
Comment 2 Michael Fratoni 2002-12-27 18:59:49 EST
All I see available at ftp://people.redhat.com/jbj/test-4.1 is rpm-4.1-9.
That version works fine, and I am using it on my 8.0 machine.
However, that version would be a downgrade from the the one included with the
beta, no? Included with the beta is rpm-4.2-0.25.1.

Should I downgrade to 4.1-9 on Pheobe?
Comment 3 Jeff Johnson 2002-12-27 19:11:36 EST
Apologies, the same fix is already in rpm-4.2, my brain fart.

The "hang" is almost certainly coming from a stale lock.

The workaround for the moment is to do
        rm -f /var/lib/rpm/__db*
to remove stale locks residnt in those files.

The "fix" will be to use nptl /dev/futex locks which
are refcounted, and disappear when refcount goes to 0,
liminating stale locks.

The "fix" is in the works, deferred until then.
Comment 4 Pawel Salek 2003-01-22 17:21:56 EST
Observed something similar with rpm-4.2-0.56 on fresh phoebe (beta 2). 
rpm -Uv package.rpm hang. strace revealed that it was waiting on
futex(0x405ca1ec,FUTEX_WAIT,0,NULL
gdb says that the hang occured in __lock_get_rpmdb

I did a rpm --rebuilddb after a reboot and it produced:
db4 error(16) from dbenv->remove: Device or resource busy
but I have not seen the hangs since then (i.e. during last 2 hours).

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