Bug 80471 - rpm hangs while installing a package.
Summary: rpm hangs while installing a package.
Keywords:
Status: CLOSED DEFERRED
Alias: None
Product: Red Hat Public Beta
Classification: Retired
Component: rpm
Version: phoebe
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Jeff Johnson
QA Contact: Mike McLean
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2002-12-27 00:40 UTC by Michael Fratoni
Modified: 2007-04-18 16:49 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2002-12-28 00:11:36 UTC


Attachments (Terms of Use)

Description Michael Fratoni 2002-12-27 00:40:51 UTC
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 14:25:59 UTC
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 23:59:49 UTC
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-28 00:11:36 UTC
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 22:21:56 UTC
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.