Bug 1509243 - fuser can hang on nonexistent file
Summary: fuser can hang on nonexistent file
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: psmisc
Version: 29
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Jaromír Cápík
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: 1509245 1693785
TreeView+ depends on / blocked
 
Reported: 2017-11-03 12:06 UTC by Karel Volný
Modified: 2019-04-30 13:28 UTC (History)
4 users (show)

Fixed In Version: psmisc-23.1-4.1.fc29
Clone Of:
: 1509245 (view as bug list)
Environment:
Last Closed: 2019-04-30 13:28:59 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Karel Volný 2017-11-03 12:06:28 UTC
Description of problem:
I have found a problem during mariadb startup, which turned out to be caused by a `fuser` call that timed out due to broken NFS.

While that's a string of unfortunate conditions, making `fuser` behave differently would be IMHO a good thing.

The problem is when a file doesn't exist, instead of bailing out immediately, fuser tries to stat tons of other things, and stating a stale NFS mount leads to hanging on it.

fuser shouldn't do this - I don't know what sense does it make during normal operation (if the file exists), it still would be nice if it could be skipped and so fuser doesn't get blocked by NFS.

But I'm pretty sure it doesn't make any sense when the file doesn't exist ... why to wait for "Specified filename ... does not exist." message until the system is scanned while it can be spit out immediately?

Version-Release number of selected component (if applicable):
psmisc-23.1-2.fc27.x86_64

How reproducible:
always

Steps to Reproduce:
0. have some nfs mounts
[supposing 'kravina' doesn't exist]
1. strace fuser kravina 2>&1 | grep your/mount

Actual results:
stat("your/mount", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0

Expected results:
empty output, grep doesn't match your/mount


Additional info:

Comment 1 Ben Cotton 2018-11-27 18:19:00 UTC
This message is a reminder that Fedora 27 is nearing its end of life.
On 2018-Nov-30  Fedora will stop maintaining and issuing updates for
Fedora 27. 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 '27'.

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 27 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.

Comment 2 Jan Rybar 2019-04-30 13:28:59 UTC
Fixed also in F28 and F30.

With latest update, fuser now does not do redundant /proc walkthrough if invalid filename given.
https://bodhi.fedoraproject.org/updates/FEDORA-2019-65327463be


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