Bug 694838 - tmpwatch doesn't clean up sockets
Summary: tmpwatch doesn't clean up sockets
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: tmpwatch
Version: 14
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Miloslav Trmač
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-04-08 15:10 UTC by Christopher Beland
Modified: 2012-05-25 23:51 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-05-25 23:51:08 UTC
Type: ---


Attachments (Terms of Use)

Description Christopher Beland 2011-04-08 15:10:34 UTC
Old sockets are accumulating in /tmp and nothing is cleaning them up.  This is an excert of "ls -t" in /tmp from today:

srwxrwxr-x. 1 beland beland    0 Mar 16 09:24 fileqpW48B=
drwx------. 2 beland beland 4.0K Mar 15 22:26 keyring-LrTU9u/
drwx------. 2 beland beland 4.0K Mar 15 21:22 keyring-k6YZLs/
srwxr-xr-x. 1 beland beland    0 Mar 15 13:45 gnome-system-monitor.beland.2381881092=
srwxrwxr-x. 1 beland beland    0 Mar 13 12:51 filefEKDQL=
srwxrwxr-x. 1 beland beland    0 Mar  3 08:16 filebWhvvF=
drwx------. 2 beland beland 4.0K Mar  1 08:07 keyring-PBcIki/
srwxrwxr-x. 1 beland beland    0 Feb 27 21:46 fileCCDlwm=
drwx------. 2 beland beland 4.0K Feb 27 21:45 keyring-q2lwXh/
srwxrwxr-x. 1 beland beland    0 Feb 22 23:33 fileD3snCR=
drwx------. 2 beland beland 4.0K Feb 22 20:51 keyring-OaTJdO/
srwxrwxr-x. 1 beland beland    0 Feb 20 16:49 filemeS2kB=
drwx------. 2 beland beland 4.0K Feb 20 16:37 keyring-L4sTu5/
srwxrwxr-x. 1 beland beland    0 Feb 14 13:19 filegSJIU3=
drwx------. 2 beland beland 4.0K Feb 12 17:58 icedteaplugin-beland/
srwxrwxr-x. 1 beland beland    0 Jan 28 13:08 fileOM9Jzc=
drwx------. 2 beland beland 4.0K Jan 27 15:36 keyring-dlX2FA/
srwxrwxr-x. 1 beland beland    0 Jan 25 20:56 filea3uXSA=
drwx------. 2 beland beland 4.0K Jan 25 20:52 keyring-1UWdOz/
srwxrwxr-x. 1 beland beland    0 Jan 23 22:12 filegwJDa1=
drwx------. 2 beland beland 4.0K Jan 23 22:10 keyring-4Inajb/
srwxrwxr-x. 1 beland beland    0 Dec 19 16:44 filendJZkp=
drwx------. 2 beland beland 4.0K Dec 19 16:43 keyring-74Hq5U/
srwxrwxr-x. 1 beland beland    0 Dec 16 14:51 filehYB3Kp=
drwx------. 2 beland beland 4.0K Dec 14 20:42 keyring-r2L9eC/
srwxrwxr-x. 1 beland beland    0 Dec  7 21:00 filepYNgUK=
drwx------. 2 beland beland 4.0K Dec  7 11:36 keyring-7V42dg/
drwx------. 2 beland beland 4.0K Dec  5 16:17 keyring-9AU1YO/

The keyring directories look like this:

keyring-9AU1YO/:
socket=  socket.pkcs11=  socket.ssh=

The daily cron job that tmpwatch runs should be made more intelligent.  At the very least, it should be able to tell that any usage of these sockets predates the last system boot; I don't think it's possible for anything to still be using them.

Comment 1 Miloslav Trmač 2011-04-08 15:21:08 UTC
Thanks for your report.

tmpwatch does not remove sockets because it can not detect whether a socket file has been used recently only using file times (see #114969).

Looking for timestamps that are older than last system boot is a great idea, something to try for F16.

Comment 2 Miloslav Trmač 2012-05-25 23:51:08 UTC
Removing old enough sockets was finally implemented in tmpwatch-2.11, now built for rawhide.


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