Bug 84126 - rpm-4.2 hang on futex during update or install
Summary: rpm-4.2 hang on futex during update or install
Keywords:
Status: CLOSED WORKSFORME
Alias: None
Product: Red Hat Public Beta
Classification: Retired
Component: rpm
Version: phoebe
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Jeff Johnson
QA Contact: Mike McLean
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2003-02-12 15:47 UTC by David Balažic
Modified: 2007-04-18 16:51 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2003-02-25 02:39:27 UTC
Embargoed:


Attachments (Terms of Use)
This file only contains the __db.00? files (956.07 KB, application/octet-stream)
2005-05-01 19:56 UTC, Håkon Løvdal
no flags Details
Full contents of /var/lib/rpm (if needed), part 1 (11.01 MB, application/octet-stream)
2005-05-01 19:59 UTC, Håkon Løvdal
no flags Details
Full contents of /var/lib/rpm (if needed), part 2 (15.44 MB, application/octet-stream)
2005-05-01 20:01 UTC, Håkon Løvdal
no flags Details

Description David Balažic 2003-02-12 15:47:33 UTC
Description of problem:

[root@localhost newfiles]# rpm -Uvh  groff-1.18.1-15.i386.rpm
Preparing...                ###########################################
[100%]
   1:groff                  ###########################################
[100%]
( hangs here for minutes , no CPU activity , no disk activity )

[root@localhost root]# ps aux|grep rpm
root      3236  0.3  2.0  9252 5296 pts/1    S    20:34   0:01 rpm -Uvh

[root@localhost root]# strace -p 3236
futex(0x405881ec, FUTEX_WAIT, 0, NULL

( cursor stays after "NULL" , no activity )

If I press ctrl-C on strace :

[root@localhost root]# strace -p 3236
futex(0x405881ec, FUTEX_WAIT, 0, NULL <unfinished ...>

Then I did :
[root@localhost newfiles]# kill -9 3236
[root@localhost newfiles]# rm /var/lib/rpm/__db.00*
[root@localhost newfiles]# rpm -e  groff --nodeps
[root@localhost newfiles]# rpm -i  groff-1.18.1-15.i386.rpm

and it all worked.


This seems to happen on rpm -Uvh xxx  , if the __db.00? files exits in
/var/lib/rpm.  As they are left after all rpm invocations, that is
almost a given.

If I remove them before calling "rpm -Uvh xxx.rpm" then it does not
hang.

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

rpm-4.2-0.56
glibc-2.3.1-36
kernel-2.4.20-2.21.athlon ( also tried 2.4.20-2.41-athlon, same )

How reproducible:


Steps to Reproduce:
1. rpm ivh ( or -Uvh ) some.rpm
2.
3.
    
Actual results:

it hangs at the end ( the new files are put on the file system )

Expected results:

no hang

Additional info:

Comment 1 Jeff Johnson 2003-02-25 02:39:27 UTC
Can you reproduce this problem? If so, please
reopen with a description of how to do so, as I
doubt I'm going to be able to reproduce otherwise.

Comment 2 David Balažic 2003-02-26 09:04:34 UTC
After a few minutes of trying, I can't reproduce it any more with :
kernel-2.4.20-2.54-athlon
glibc-2.3.1-51
rpm-4.2-0.68


Comment 3 Håkon Løvdal 2005-05-01 19:24:20 UTC
I also get the error from time to time on Fedora Core 3 when synaptic for some
reason is stuck and I have killed it.

I can confirm that removing the /var/lib/__db.00? files "fixes" the problem,
however this time I saved them first, and now I can consistently retrigger the
error by copying the files back.

I will attach a tar file of a couple of /var/lib/rpm configurations with and
without hangs (with hard links for common files) so you should be able to recreate.

rpm-4.3.2-21
glibc-2.3.5-0.fc3.1
kernel-2.6.9-1.667

The hang is related to glibc nptl:
   OK:   env LD_ASSUME_KERNEL=2.2.5 rpm -qal | head
   OK:   env LD_ASSUME_KERNEL=2.4.1 rpm -qal | head
   HANG: env LD_ASSUME_KERNEL=2.4.20 rpm -qal | head
but that is sort of expected I guess since futexes are firstly used in nptl.

Comment 4 Håkon Løvdal 2005-05-01 19:56:42 UTC
Created attachment 113909 [details]
This file only contains the __db.00? files

Comment 5 Håkon Løvdal 2005-05-01 19:59:13 UTC
Created attachment 113910 [details]
Full contents of /var/lib/rpm (if needed), part 1

Comment 6 Håkon Løvdal 2005-05-01 20:01:07 UTC
Created attachment 113911 [details]
Full contents of /var/lib/rpm (if needed), part 2


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