For some reason, /tmp is being cleaned from time to time.
EDIT 3: Solution
It turns out the files in /tmp were deleted by gsd-housekeepin which is a process ran by Gnome when you change the Privacy settings on gnome-control-center, turning off the option that periodically deletes the files from /tmp solves my issue.
EDIT: Please don't downvote this if you think I think /tmp is just another storage folder as ~/.
Since a couple of weeks, after the last update of Gnome (3.26.2, that is) was introduced on my system, I noticed that the content of /tmp disappears, for instance, a couple of minutes ago I downloaded a video with youtube-dl and split it with ffmpeg. After coming from the bathroom both files were gone.
I noticed this especially with Emacs running as a daemon, from time to time magit will fail to perform a commit because it couldn't find the file socket, forcing me to restart emacs daemon.
I still have a huge amount of space in my SSD and my HDD (I really don't know in which device /tmp is mounted), any ideas what could this be?
EDIT2: Output of fatrace
I do ls a couple of times to /tmp/emacs1000 and 15~ minutes later something called gsd-housekeepin goes in and mess with /tmp, one hour later I found out about the nonexistence of the mentioned folder, which supports my theory that gsd-housekeepin is the culprit of my problem.
17:02:03.689322 zsh(5268): O /tmp
17:02:03.689382 zsh(5268): RC /tmp
17:02:04.188665 ls(5740): O /tmp/emacs1000
17:02:04.188665 ls(5740): R /tmp/emacs1000
17:02:04.188721 ls(5740): C /tmp/emacs1000
17:06:47.330129 ls(5823): RCO /tmp/emacs1000
17:07:06.540735 nautilus(5857): O /tmp/flatpak-seccomp-BBH09Y (deleted)
17:07:06.540882 nautilus(5857): W /tmp/flatpak-seccomp-BBH09Y (deleted)
17:07:06.540882 nautilus(5857): W /tmp/flatpak-seccomp-BBH09Y (deleted)
17:07:06.574195 bwrap(5872): R /tmp/flatpak-seccomp-BBH09Y (deleted)
17:07:08.294462 nautilus(5857): O /tmp/gnome-desktop-thumbnailer-HW209Y/gnome-desktop-thumbnailer.png
17:07:08.294609 nautilus(5857): RC /tmp/gnome-desktop-thumbnailer-HW209Y/gnome-desktop-thumbnailer.png (deleted)
17:07:08.294691 nautilus(5857): CW /tmp/flatpak-seccomp-BBH09Y (deleted)
17:07:08.294691 nautilus(5857): CW /tmp/flatpak-seccomp-BBH09Y (deleted)
17:07:22.252302 systemd(1): RCO /tmp/systemd-private-4e9ad0b7c811424f9e4e6d608cf9a5cc-systemd-hostnamed.service-gZ9ZeU (deleted)
17:07:22.252302 systemd(1): RCO /tmp/systemd-private-4e9ad0b7c811424f9e4e6d608cf9a5cc-systemd-hostnamed.service-gZ9ZeU/tmp (deleted)
17:14:54.822068 gsd-housekeepin(1596): O /tmp
17:14:54.822428 gsd-housekeepin(1596): R /tmp
17:14:54.822576 gsd-housekeepin(1596): R /tmp
17:14:54.824185 gsd-housekeepin(1596): R /tmp
17:14:54.825122 gsd-housekeepin(1596): O /tmp/hsperfdata_i2p
17:14:54.825122 gsd-housekeepin(1596): O /tmp/jna-101312875
17:14:54.825122 gsd-housekeepin(1596): O /tmp/hsperfdata_jorge
17:14:54.825122 gsd-housekeepin(1596): O /tmp/.Test-unix
17:14:54.825122 gsd-housekeepin(1596): O /tmp/.font-unix
17:14:54.825122 gsd-housekeepin(1596): O /tmp/.XIM-unix
17:14:54.825122 gsd-housekeepin(1596): O /tmp/.ICE-unix
17:14:54.825122 gsd-housekeepin(1596): O /tmp/babel-1164Pzz
17:14:54.825424 gsd-housekeepin(1596): O /tmp/UMS-jorge
17:14:54.831647 gsd-housekeepin(1596): R /tmp/jna-101312875
17:14:54.831647 gsd-housekeepin(1596): R /tmp/hsperfdata_i2p
17:14:54.831647 gsd-housekeepin(1596): R /tmp/hsperfdata_jorge
17:14:54.831793 gsd-housekeepin(1596): R /tmp/hsperfdata_jorge
17:14:54.831793 gsd-housekeepin(1596): R /tmp/hsperfdata_i2p
17:14:54.833650 gsd-housekeepin(1596): R /tmp/.Test-unix
17:14:54.833650 gsd-housekeepin(1596): R /tmp/.Test-unix
17:14:54.833748 gsd-housekeepin(1596): R /tmp/.font-unix
17:14:54.835771 gsd-housekeepin(1596): R /tmp/.XIM-unix
17:14:54.835771 gsd-housekeepin(1596): R /tmp/.XIM-unix
17:14:54.835863 gsd-housekeepin(1596): R /tmp/.ICE-unix
17:14:54.835863 gsd-housekeepin(1596): R /tmp/UMS-jorge
17:14:54.835922 gsd-housekeepin(1596): O /tmp/yaourt-tmp-jorge
17:14:54.835922 gsd-housekeepin(1596): O /tmp/.esd-1000
17:14:54.835922 gsd-housekeepin(1596): O /tmp/emacs1000
17:14:54.836083 gsd-housekeepin(1596): C /tmp
17:14:54.836131 gsd-housekeepin(1596): R /tmp/babel-1164Pzz
17:14:54.836564 gsd-housekeepin(1596): C /tmp/jna-101312875
17:14:54.838510 gsd-housekeepin(1596): C /tmp/.Test-unix
17:14:54.838559 gsd-housekeepin(1596): C /tmp/.font-unix
17:14:54.838590 gsd-housekeepin(1596): C /tmp/.XIM-unix
17:14:54.838752 gsd-housekeepin(1596): R /tmp/yaourt-tmp-jorge
17:14:54.838752 gsd-housekeepin(1596): R /tmp/emacs1000
17:14:54.838856 gsd-housekeepin(1596): R /tmp/emacs1000
17:14:54.840498 gsd-housekeepin(1596): R /tmp/.esd-1000
17:14:54.840567 gsd-housekeepin(1596): R /tmp/.esd-1000
17:14:54.849084 gsd-housekeepin(1596): C /tmp/babel-1164Pzz
17:14:54.850940 gsd-housekeepin(1596): C /tmp/hsperfdata_jorge
17:14:54.851143 gsd-housekeepin(1596): C /tmp/hsperfdata_i2p
17:14:54.851203 gsd-housekeepin(1596): C /tmp/.ICE-unix
17:14:54.851284 gsd-housekeepin(1596): C /tmp/UMS-jorge
17:14:54.851477 gsd-housekeepin(1596): C /tmp/yaourt-tmp-jorge (deleted)
17:14:54.858799 gsd-housekeepin(1596): C /tmp/emacs1000
17:14:54.858914 gsd-housekeepin(1596): C /tmp/.esd-1000
18:14:54.823216 gsd-housekeepin(1596): O /tmp
18:14:54.823430 gsd-housekeepin(1596): R /tmp
18:14:54.823544 gsd-housekeepin(1596): R /tmp
18:14:54.823618 gsd-housekeepin(1596): R /tmp
18:14:54.824448 gsd-housekeepin(1596): O /tmp/.esd-1000
18:14:54.824586 gsd-housekeepin(1596): O /tmp/emacs1000
18:14:54.824705 gsd-housekeepin(1596): O /tmp/UMS-jorge
18:14:54.824752 gsd-housekeepin(1596): O /tmp/hsperfdata_i2p
18:14:54.824752 gsd-housekeepin(1596): O /tmp/hsperfdata_jorge
18:14:54.824923 gsd-housekeepin(1596): O /tmp/.font-unix
18:14:54.824970 gsd-housekeepin(1596): O /tmp/.ICE-unix
18:14:54.825008 gsd-housekeepin(1596): O /tmp/.Test-unix
18:14:54.825008 gsd-housekeepin(1596): C /tmp
18:14:54.825008 gsd-housekeepin(1596): O /tmp/.XIM-unix
18:14:54.825100 gsd-housekeepin(1596): R /tmp/.esd-1000
18:14:54.825251 gsd-housekeepin(1596): R /tmp/emacs1000
18:14:54.825334 gsd-housekeepin(1596): R /tmp/UMS-jorge
18:14:54.825334 gsd-housekeepin(1596): R /tmp/hsperfdata_i2p
18:14:54.825402 gsd-housekeepin(1596): R /tmp/hsperfdata_i2p
18:14:54.825402 gsd-housekeepin(1596): R /tmp/hsperfdata_jorge
18:14:54.825464 gsd-housekeepin(1596): R /tmp/.font-unix
18:14:54.825464 gsd-housekeepin(1596): R /tmp/.ICE-unix
18:14:54.825527 gsd-housekeepin(1596): R /tmp/.Test-unix
18:14:54.825527 gsd-housekeepin(1596): R /tmp/.XIM-unix
18:14:54.825527 gsd-housekeepin(1596): C /tmp/.esd-1000
18:14:54.827944 gsd-housekeepin(1596): C /tmp/emacs1000
18:14:54.829924 gsd-housekeepin(1596): C /tmp/UMS-jorge
18:14:54.832092 gsd-housekeepin(1596): C /tmp/hsperfdata_jorge
18:14:54.834025 gsd-housekeepin(1596): C /tmp/.font-unix
18:14:54.834165 gsd-housekeepin(1596): C /tmp/.Test-unix
18:14:54.834228 gsd-housekeepin(1596): C /tmp/.XIM-unix
18:14:54.834273 gsd-housekeepin(1596): C /tmp/hsperfdata_i2p
18:14:54.834346 gsd-housekeepin(1596): C /tmp/.ICE-unix
19:13:13.835614 zsh(5268): O /tmp
19:13:13.835694 zsh(5268): RC /tmp
Edited 27 Nov 2017. We only hold this version.
About this post
- Posted
- Archived
- Edited
- Score
- 1 · 100% up
- Kind
- Text
- ID
- 7fjdbf
16 comments
There is a scrubbing process. Check it with
sudo systemctl status systemd-tmpfiles-clean.timerNothing suspicious :(
Well, yes there is. That timer triggers a clean of all dirs mounted via tmpfiles, which includes /tmp. You may be able to exclude /tmp from the cleaning via a /etc/tmpfiles.d/*.conf file
Start gnome-control-center and look at the "Privacy" panel. Is the "Purge Trash & Temporary Files" setting enabled? This is what I believe gsd-housekeeping implements.
It's a bingo!
That was my issue, silly me.
Thank you!
Then maybe put an edit in your post so other people can find the solution right away.
I would try to research this with a tool named
fatracethat's in the AUR. It's a simple program that waits for processes doing file accesses and prints that to the terminal. You could combine it with grep, then just keep a terminal with it running and wait:(that space character in front of the /tmp is intentional)
EDIT:
It has a parameter
-c=--current-mountthat's interesting. You would use it like this:EDIT2:
I just tested stuff here, and I think the tool might not be good for this problem. It doesn't really print anything if files get unlinked. There was a message about the
rmprocess doing something when I triedrm -r *, but that was just by a side-effect, I guess, because the process had a deleted folder open at some point.I will try to use it with the Emacs'
serverfile that lives in /tmp and see what I got.Thanks for the suggestion!
Unless configured otherwise
/tmpis a tmpfs in Arch. That means it resides in the machine's RAM. The default configuration will use up to half of the total RAM. So with 8GB RAM/tmpcan use up to 4GB.As such it's expected to be emptied on a reboot. It shouldn't usually happen at runtime, as far as I know. But I may well be unaware of some scrubbing process or a mechanism freeing space for new files.
I know.
That's two of us. However, I have not the configuration system-wide since long time ago, or enable anything that jerks around with /tmp so this situation is puzzling for me.