Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 399839 - app-admin/tmpwatch reports "Cannot stat file" with --fuser on sufficiently loaded system
Summary: app-admin/tmpwatch reports "Cannot stat file" with --fuser on sufficiently lo...
Status: RESOLVED TEST-REQUEST
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: No maintainer - Look at https://wiki.gentoo.org/wiki/Project:Proxy_Maintainers if you want to take care of it
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-01-23 14:17 UTC by Doug Warner
Modified: 2016-05-28 09:35 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Doug Warner 2012-01-23 14:17:12 UTC
When running tmpwatch with --fuser on a sufficiently loaded system, it's common to get errors like this on stderr:

# tmpwatch --mtime --fuser --quiet  504 /usr/portage/distfiles
Cannot stat file /proc/10661/fd/542: No such file or directory
Cannot stat file /proc/10661/fd/549: No such file or directory
Cannot stat file /proc/10661/fd/587: No such file or directory
Cannot stat file /proc/10661/fd/593: No such file or directory

We can't send stderr to /dev/null since this would mask legitimate errors from tmpwatch.  The best solution would be to ignore this race condition in tmpwatch.
Comment 1 Christian Faulhammer (RETIRED) gentoo-dev 2012-02-05 13:29:57 UTC
Which version of tmpwatch is this?
Comment 2 Doug Warner 2012-02-06 02:27:07 UTC
$ equery l tmpwatch
 * Searching for tmpwatch ...
[IP-] [  ] app-admin/tmpwatch-2.10.1:0


FWIW, I've seen this problem for quite some time but only recently realized it was due to fuser.
Comment 3 Christian Faulhammer (RETIRED) gentoo-dev 2012-02-06 20:21:52 UTC
(In reply to comment #2)
> $ equery l tmpwatch
>  * Searching for tmpwatch ...
> [IP-] [  ] app-admin/tmpwatch-2.10.1:0


 Please try 2.10.3.
Comment 4 Michael Watters 2012-02-17 15:33:53 UTC
Upgrading to 2.10.3 doesn't seem to help.  There is still a race condition caused by tmpwatch trying to look at processes that no longer exist.

For example, tmpwatch produces errors like this:

Cannot stat file /proc/4892/fd/51: No such file or directory
Cannot stat file /proc/8860/fd/7: No such file or directory
Cannot stat file /proc/5474/fd/7: No such file or directory

This can be reproduced by running 

tmpwatch --mtime --fuser --quiet  504 /usr/portage/distfiles
Comment 5 Pacho Ramos gentoo-dev 2016-05-28 09:35:14 UTC
Try with 2.11-r1