Bug 1199679

Summary: df -l stats everything and can hang on NFS mountpoints
Product: [Fedora] Fedora Reporter: Tom Horsley <horsley1953>
Component: coreutilsAssignee: Pádraig Brady <pbrady>
Status: CLOSED NEXTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 22CC: admiller, kdudka, kzak, ooprala, ovasik, pbrady, p, twaugh
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-07-29 12:12:29 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Tom Horsley 2015-03-07 00:21:42 UTC
Description of problem:

At one time in history, the "-l" option on the "df" command worked fine even when some NFS mounted filesystems were not talking (because, for instance, the remote system is down or troubled in some way).

Now, df issues a stat() for every dadgum mountpoint, even when called with the -l option. If an NFS mount is having trouble this can hang forever (with the right mount options). The whole point of -l was to avoid this (well, a major point, anyway).


Version-Release number of selected component (if applicable):
coreutils-8.21-21.fc20.x86_64


How reproducible:
100%

Steps to Reproduce:
1.run strace df -l -h on a system with network mounts.
2.grep the strace output for stat() calls.
3.see stat() calls for every single network mount as well as the local ones.

Actual results:
Hang when there is network or server trouble

Expected results:
No hang, it shouldn't be touching anything on the network.

Additional info:
Here are some of the stat() calls from my fedora 20 system at work. All
these names are NFS mountpoints, yet I ran with the -l option:

stat("/trex/tooth", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
stat("/userland", {st_mode=S_IFDIR|0777, st_size=4096, ...}) = 0
stat("/raptor/fang", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
stat("/ada/denmark", {st_mode=S_IFDIR|0777, st_size=4096, ...}) = 0
stat("/raptor/foot", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
stat("/varmit/stew", {st_mode=S_IFDIR|0777, st_size=4096, ...}) = 0
stat("/tt/sulphur", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
stat("/marmot/burrow", {st_mode=S_IFDIR|0777, st_size=4096, ...}) = 0
stat("/marmot/fur", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
stat("/raptor/bite", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
stat("/tt/hydrogen", {st_mode=S_IFDIR|0777, st_size=4096, ...}) = 0
stat("/raptor/claw", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
stat("/iggy/pop", {st_mode=S_IFDIR|0777, st_size=4096, ...}) = 0
stat("/tt/carbon", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0

Comment 1 Pádraig Brady 2015-03-07 01:32:57 UTC
This is a fair point, and probably wound up in another change I'm looking at to avoid needing to stat to get device IDs. I'll take a look upstream

Comment 2 Pádraig Brady 2015-04-05 19:34:59 UTC
Fix proposed upstream
http://lists.gnu.org/archive/html/coreutils/2015-04/msg00009.html

Comment 3 Fedora End Of Life 2015-05-29 13:43:56 UTC
This message is a reminder that Fedora 20 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 20. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '20'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 20 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.