#78791 tmpreaper: tmpreaper deletes in-use sockets

Package:
tmpreaper
Source:
tmpreaper
Description:
cleans up files in directories based on their age
Submitter:
Date:
2005-07-18 04:04:14 UTC
Severity:
normal
#78791#5
Date:
2000-12-04 19:45:11 UTC
From:
To:
Hi,

tmpreaper regularly deletes my KDE Unix domain sockets in
/tmp/mcop-apenwarr, even though they're in use by running applications.

I think it should avoid deleting any file that it currently in use, by
checking against the "fuser" program.  Unfortunately, fuser doesn't report
correct information for Unix domain sockets, so I guess you'll have to check
netstat also (or report a bug against psmisc to get fuser fixed).

There may be more problems involving a shared, NFS-mounted /tmp, but that's
a dumb idea anyway.

Thanks,

Avery

#78791#10
Date:
2001-12-03 10:15:13 UTC
From:
To:
I could have sworn that I responded to this earlier...

AFAICS tmpreaper doesn't remove files that aren't regular files,
symlinks, or directories; I ran tmpreaper with --verbose and got the
following message:

    Not a regular file, symlink, or directory `agent.19884' -- skipping.
    Back from recursing down `ssh-XX6GXjPD'.


$ ls -l /tmp/ssh-XX6GXjPD/
total 0
srwxr-xr-x    1 paul     paul            0 Sep 22 10:50 agent.19884


Of course, if you give it the --all option it will remove these.
But that's not in the default config for cron.daily.

lsof comes to mind... But wouldn't netstat by itself be enough?
With 'netstat -nap | grep "^unix"' I see the ssh socket being used.


Thanks,
Paul Slootman