Bug 102929 - rpm hangs with stale nfs mount point
Summary: rpm hangs with stale nfs mount point
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: rpm
Version: 9
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-08-22 18:42 UTC by James Martin
Modified: 2007-04-18 16:57 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2003-08-25 15:57:25 UTC
Embargoed:


Attachments (Terms of Use)

Description James Martin 2003-08-22 18:42:12 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5a) Gecko/20030728
Mozilla Firebird/0.6.1

Description of problem:
I noticed rpm was hanging when I tried to remove some packages with the standard
rpm -e <packagename>.

I did an strace rpm -e <packagename> and found this:

read(4, "/dev/hda6 / ext3 rw 0 0\nnone /pr"..., 4096) = 314
stat64("/", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
stat64("/proc", {st_mode=S_IFDIR|0555, st_size=0, ...}) = 0
stat64("/proc/bus/usb", {st_mode=S_IFDIR|0555, st_size=0, ...}) = 0
stat64("/boot", {st_mode=S_IFDIR|0755, st_size=1024, ...}) = 0
stat64("/home", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
stat64("/dev/pts", {st_mode=S_IFDIR|0755, st_size=0, ...}) = 0
stat64("/dev/shm", {st_mode=S_IFDIR|S_ISVTX|0777, st_size=40, ...}) = 0
stat64("/mnt/fat", {st_mode=S_IFDIR|0755, st_size=16384, ...}) = 0
stat64("/mnt/nfs",


as you can see, it is hanging on the /mnt/nfs..  It's been like this for the
past 5 minutes (still is while I'm writing this bug report).

If I unmount it works fine.  I guess the question is why is rpm -e reading my
mount points, and 2ndly, why is it hanging on a stale NFS mountpoint?  Maybe you
guys need to put a timeout feature on the function that checks all the mount points?

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


How reproducible:
Always

Steps to Reproduce:
1.  Mount a nfs directory.
2.  Make it stale.
3.  Attempt to rpm -e a package.
    

Actual Results:  rpm hangs indefinitely.

Expected Results:  The package should be removed.

Additional info:

my rpm is rpm-4.2-0.69.

Comment 1 Michael Lee Yohe 2003-08-22 20:57:06 UTC
I have this same problem with smbfs file systems.

Comment 2 Jeff Johnson 2003-08-25 15:57:25 UTC
Yup.

In order to do disk space checks, rpm needs to know the
size of all mounted file systems.

This is done with statvfs, which also does a stat on each mount
point.

If/when the stat blocks, then rpm hangs.

Comment 3 James Martin 2003-08-25 16:34:03 UTC
Ok.. so what you are saying is that this is a bug in stat?  Shouldn't rpm be
smart enough to know if stat is taking too long to either die and report an
error or skip that mounted filesystem altogether?  If I were to write a patch
for rpm or stat, where would I be looking?

Comment 4 Jeff Johnson 2003-08-25 16:39:43 UTC
No, stat is behaving exactly as it should.

The problem (I'm told, iirc) is in the statvfs implementation
in glibc, which walks and stats every entry in /etc/mtab
even though statvfs was called with single mount point.


Easiest by far is to add --ignoresize when invoking and skip
the stal nfs (or smbfs) mount.

Comment 5 Jeff Johnson 2003-08-25 21:57:29 UTC
Try again, #packaging and/or #fedora, usually after 7pm EDT

Comment 6 Jeff Johnson 2003-08-26 19:37:59 UTC
Try again, #packaging and/or #fedora, usually after 7pm EDT


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