Bug 190496
Summary: | rpm --install hangs while walking mtab | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Jesse Zbikowski <embeddedlinuxguy> | ||||||||
Component: | rpm | Assignee: | Panu Matilainen <pmatilai> | ||||||||
Status: | CLOSED RAWHIDE | QA Contact: | |||||||||
Severity: | medium | Docs Contact: | |||||||||
Priority: | medium | ||||||||||
Version: | rawhide | CC: | liko, rjones | ||||||||
Target Milestone: | --- | Keywords: | Reopened | ||||||||
Target Release: | --- | ||||||||||
Hardware: | All | ||||||||||
OS: | Linux | ||||||||||
Whiteboard: | |||||||||||
Fixed In Version: | Doc Type: | Bug Fix | |||||||||
Doc Text: | Story Points: | --- | |||||||||
Clone Of: | Environment: | ||||||||||
Last Closed: | 2010-06-10 08:18:37 UTC | Type: | --- | ||||||||
Regression: | --- | Mount Type: | --- | ||||||||
Documentation: | --- | CRM: | |||||||||
Verified Versions: | Category: | --- | |||||||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||||||
Cloudforms Team: | --- | Target Upstream Version: | |||||||||
Embargoed: | |||||||||||
Attachments: |
|
Description
Jesse Zbikowski
2006-05-02 22:04:04 UTC
FWIW, the stat is attempting to avoid stale mounts (when ESTALE is returned) and is necessary to acquire st_dev for the mounted file system in order to do disk accounting correctly per-mount Created attachment 128825 [details]
Code hangs calling stat() on a stale nfs mountpoint.
It's not clear then why the stat is hanging on the stale mountpoint, if it should be returning ESTALE. In my case, everything is being installed to a single partition (using rpm --root), so if there were an option to disable per-mount accounting, that would solve my problem. I still want to check free space on the (known) target partition, so I can't use rpm --ignoresize. The same hang can be triggered by rpm -qp foo.rpm --qf '%{FSSIZES}' I guess I could try to fake it by doing my own accounting with --qf '%{FILESIZES}' but this number seems to be a little smaller. I attach a small code snippet which reproduces this same behavior with stat() -- also, df does the same thing. Is this a bug, and if so should it be moved up- or down-stream? Note, it takes about a minute after the nfs server stops before stat decides something is wrong. The hang is triggered by a stale NFS mount point. rpm is subject to behavior dictated by glibc, the kernel, and other standards. Avoiding a hard hang with ESTALE is not easily solved in general. This is fixed in rpm-4.4.7 (at least) and later. UPSTREAM Fixed upstream in rpm.org too now... FC5 is EOL, changing version to devel. Fixed in next rawhide push, thanks for the patch Jeff. This bug is still present in the latest RPM. If an NFS mountpoint is inaccessible, then rpm -i does a stat(2) system call which hangs. I'm attaching two straces. The first is from a successful run of rpm -i. The second is from a run of rpm -i where I have deliberately made an NFS mountpoint unreachable. Created attachment 422814 [details]
Successful run of rpm -i
Created attachment 422816 [details]
rpm -i hangs on stat when the NFS server is unreachable
RPM version 4.8.0-beta1 Dunno why you're using 4.8.0-beta1 at this point... Anyway, the issue has been really dealt with in rpm >= 4.8.0-8 in F13 and rawhide by only stat()'ing the filesystems the transaction will actually touch, so something like /home on NFS hanging wont cause rpm to hang unnecessarily. |