Bug 84126 - rpm-4.2 hang on futex during update or install
rpm-4.2 hang on futex during update or install
Status: CLOSED WORKSFORME
Product: Red Hat Public Beta
Classification: Retired
Component: rpm (Show other bugs)
phoebe
All Linux
medium Severity medium
: ---
: ---
Assigned To: Jeff Johnson
Mike McLean
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2003-02-12 10:47 EST by David Balažic
Modified: 2007-04-18 12:51 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2003-02-24 21:39:27 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)
This file only contains the __db.00? files (956.07 KB, application/octet-stream)
2005-05-01 15:56 EDT, 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 15:59 EDT, 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 16:01 EDT, Håkon Løvdal
no flags Details

  None (edit)
Description David Balažic 2003-02-12 10:47:33 EST
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-24 21:39:27 EST
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 04:04:34 EST
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 15:24:20 EDT
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 15:56:42 EDT
Created attachment 113909 [details]
This file only contains the __db.00? files
Comment 5 Håkon Løvdal 2005-05-01 15:59:13 EDT
Created attachment 113910 [details]
Full contents of /var/lib/rpm (if needed), part 1
Comment 6 Håkon Løvdal 2005-05-01 16:01:07 EDT
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.