Bug 75826 - rpm freezes on corrupt database
Summary: rpm freezes on corrupt database
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: rpm
Version: 8.0
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Jeff Johnson
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2002-10-13 11:29 UTC by Phil Anderson
Modified: 2007-04-18 16:47 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2002-10-22 17:15:42 UTC
Embargoed:


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

Description Phil Anderson 2002-10-13 11:29:49 UTC
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 11:34:57 UTC
Created attachment 80204 [details]
strace of rpm dying

Comment 2 Jeff Johnson 2002-10-13 12:55:06 UTC
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 19:51:42 UTC
Created attachment 80828 [details]
Another occurence of this...

Comment 4 Frode Tennebø 2002-10-17 19:57:18 UTC
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-18 00:19:49 UTC
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 20:39:51 UTC
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 20:48:28 UTC
Here's some more info, old gcc package left from previous rpm lockup:

# rpm -q gcc
gcc-3.2-10
gcc-3.2-7

# 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 20:50:33 UTC
Created attachment 80984 [details]
output from rpm -evvvv gcc-3.2-7 rpm lockup

Comment 9 mxkennedy 2002-10-21 07:48:56 UTC
I had a problem like this with rpm, and had to reboot to fix it. 


Comment 10 Todd Mokros 2002-10-22 17:15:34 UTC
Reboot fixed the problem for me.  No idea why, lsof | grep rpm displayed nothing.

Comment 11 Jeff Johnson 2002-10-25 19:00:01 UTC
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
	ftp://people.redhat.com/jbj/test-4.1
so I'm gonna close this report.

Comment 12 Frode Tennebø 2002-11-03 22:23:55 UTC
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 19:31:56 UTC
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.