Bugzilla will be upgraded to version 5.0 on a still to be determined date in the near future. The original upgrade date has been delayed.
Bug 75826 - rpm freezes on corrupt database
rpm freezes on corrupt database
Product: Red Hat Linux
Classification: Retired
Component: rpm (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Jeff Johnson
Depends On:
  Show dependency treegraph
Reported: 2002-10-13 07:29 EDT by Phil Anderson
Modified: 2007-04-18 12:47 EDT (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2002-10-22 13:15:42 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
strace of rpm dying (78.01 KB, text/plain)
2002-10-13 07:34 EDT, Phil Anderson
no flags Details
Another occurence of this... (19.66 KB, text/plain)
2002-10-17 15:51 EDT, Frode Tennebø
no flags Details
output from rpm -evvvv gcc-3.2-7 rpm lockup (3.00 KB, text/plain)
2002-10-18 16:50 EDT, Todd Mokros
no flags Details

  None (edit)
Description Phil Anderson 2002-10-13 07:29:49 EDT
Description of problem:
After installing an rpm from lexmark (printer driver), my rpm database became
corrupt.  every rpm command (except --help) would freeze, and not respond to ctrl-c.

After many hours of trying to fix it, i ran db_recover in /var/lib/rpm, which
fixed things up.

rpm should handle this more gracefully.

I've attached an strace of rpm.  I killed it when it got to it's freeze stage.
Comment 1 Phil Anderson 2002-10-13 07:34:57 EDT
Created attachment 80204 [details]
strace of rpm dying
Comment 2 Jeff Johnson 2002-10-13 08:55:06 EDT
This is a deadlock, probably stale, of unknown origin.

So what caused the lock? ^C on previous execution?
Comment 3 Frode Tennebø 2002-10-17 15:51:42 EDT
Created attachment 80828 [details]
Another occurence of this...
Comment 4 Frode Tennebø 2002-10-17 15:57:18 EDT
This looks very similar to what I currently experience. I have not tried 
db_recover (yet, in case you need more info). 

I believe this happened when I was running up2date (I was waiting for the 
initial download of the package descriptions) and then started an rpm -e... 
before up2date was finished (in the expectation that if there ever was a 
conflict between them the rpm -e would stop).

Comment 5 Phil Anderson 2002-10-17 20:19:49 EDT
I did a ctrl-c on a previous session, when uninstalling a rpm from lexmark for
their linux printer control program.  (i can find the url of if if you want). 
The post-uninstall script was sitting there idle for over 5 minutes.  If i
recall correctly, ctrl-c didn't work, and i ended up doing a kill -KILL.
Comment 6 Todd Mokros 2002-10-18 16:39:51 EDT
I'm currently having a similar problem under current rawhide with
rpm-4.1-1.06hammer.2.i386.rpm.  I can't expunge any packages that have a
post-uninstall script.  rpm freezes and requires a kill -KILL.  The scripts are
left in /var/tmp.  I've tried db_recover and --rebuilddb, no luck.
Comment 7 Todd Mokros 2002-10-18 16:48:28 EDT
Here's some more info, old gcc package left from previous rpm lockup:

# rpm -q gcc

# rpm -evvvv gcc-3.2-7
(I've attached the output of this)

At this point rpm is frozen and needs the -KILL
here is the script left in /var/tmp:

# cat /var/tmp/rpm-tmp.82425
set -x
if [ $1 = 0 ]; then
  /sbin/install-info --delete \
    --info-dir=/usr/share/info /usr/share/info/gcc.info.gz

This occurs with several packages, like bash for instance, that have
post-uninstall scripts.
Comment 8 Todd Mokros 2002-10-18 16:50:33 EDT
Created attachment 80984 [details]
output from rpm -evvvv gcc-3.2-7 rpm lockup
Comment 9 mxkennedy 2002-10-21 03:48:56 EDT
I had a problem like this with rpm, and had to reboot to fix it. 
Comment 10 Todd Mokros 2002-10-22 13:15:34 EDT
Reboot fixed the problem for me.  No idea why, lsof | grep rpm displayed nothing.
Comment 11 Jeff Johnson 2002-10-25 15:00:01 EDT
2nd strace is also a stale lock of unknown origing

These problems all smell (but I can't tell precisely)
of the missing SIGCHLD problem that is fixed in
rpm-4.1-9 packages at
so I'm gonna close this report.
Comment 12 Frode Tennebø 2002-11-03 17:23:55 EST
Just more info. I have not upgraded as suggested yet, but doing an rpm -U 
(I have installed/upgraded packages before this) yielded a hang and a 
strace shows:

[root@leia tmp]# strace -p 7002
select(0, NULL, NULL, NULL, {0, 470673}) = 0 (Timeout)
select(0, NULL, NULL, NULL, {1, 0})     = 0 (Timeout)
select(0, NULL, NULL, NULL, {1, 0})     = 0 (Timeout)
select(0, NULL, NULL, NULL, {1, 0})     = 0 (Timeout)
select(0, NULL, NULL, NULL, {1, 0})     = 0 (Timeout)
select(0, NULL, NULL, NULL, {1, 0})     = 0 (Timeout)
select(0, NULL, NULL, NULL, {1, 0})     = 0 (Timeout)
select(0, NULL, NULL, NULL, {1, 0})     = 0 (Timeout)
select(0, NULL, NULL, NULL, {1, 0})     = 0 (Timeout)
select(0, NULL, NULL, NULL, {1, 0} <unfinished ...>

ad nauseam....

I'll upgrade later and see what happens.
Comment 13 Irina Kaliman 2003-07-22 15:31:56 EDT
I have just installed RedHat 9.0 and rpm freezes occasionally again.

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