Tmp folder filling up

I am running ubuntu-mate 16.04.1. I partitioned my harddrive so that my root (/) partition is 60 GB. Periodically during the day the Disk Usage Analyzer will pop up saying that I am running out of space in the / partition. In checking there will be over 50GB of files in the tmp folder. Of course, these are cleared out when I reboot. Is this a possible bug in ubuntu 16.04? I have read the other posts relating to this question, but no one is addressing why Ubuntu is putting 50+GB of files (almost 10,000 folders @ 5MB/folder) in the tmp folder when all I’ve done is watch one 170MB video. Is this something I should fill out a bug report for? Thanks, Jim

In rechecking, all of the folders begin with the name “atril-thumbnailer-???”. The ??? representing a series of 4 or 5 digit numbers. I know that “Atril” is the pdf document viewer. Why would the pdf document viewer be putting 50GB of temporary files in the tmp folder when I’m watching a video?

Hi @Jim007,

Egad, that’s a nasty one. I’d bet on something mis-configured… but how? Anyone else have a clue what could be invoking atril activity?

You didn’t say what you were using to watch the video so I’ll assume default VLC. Perhaps resetting the VLC preferences could kill this.

Can you open Caja (the file manager) on /tmp and confirm watching a video creates these files? You can do this by just checking but timestamps may help.

Also, on these /tmp files or directories, find out who owns them:

sudo ls -al /tmp

It’s probably you but anything else could be a big clue.

You could also run lsof /tmp to see which processes have which files open in /tmp.

Hi Bill, I just discovered that I don’t have to watch a video (yes, i use VLC) to replicate the problem,

I opened Caja and went to the tmp folder so I could monitor the tmp file ceation.

I then opened a second Caja to go to my video folder. Tmp files, “atril-thumbnailer-???”, began to be created in the tmp folder. Within just a few minutes I was up to over 2500 files. This is after a reboot and I had not run VLC since rebooting.

After closing the second instance of Caja, tmp files stopped being created. It seems that at least part of the problem is due to having two instances of Caja open at the same time.

Jim

Almost forgot to mention - I own all the atril-thumbnailer-??? files.

Hi Bill, here’s another clue.

I opened Caja and went to Edit>Preferences and went to the Extensions tab. I unchecked the box next to “Atril Properties.” I then opened a second instance of Caja. No “Atril-thumbnailer-???” files were created. This solves my problem on a temporary basis. Not sure what removing that checkmark will do to the performance of the document viewer??? Jim

LATER: Problem continues. Opened Caja and went to tmp folder. Opened second Caja and went to documents folder. Opened pdf document. “Atril-thumbnailer-???” files immediately began to be created in tmp folder.

There seems to be some conflict between Caja and Atril. The only thing I haven’t tried is opening a pdf file, closing Caja, letting the file be open for some time, closing the file, reopening Caja and checking to see if the tmp files were created while Caja was closed.

STILL LATER: Replaced checkmark next to “Atril Properties” in Caja. Closed all instances of Caja. Opened Atril. Went to File menu and open pdf document. Left document open while I made coffee. Closed pdf and Atril. Opened Caja and checked tmp folder. No “Atril-thumbnailer-???” files were created.

It would seem to me that the problem is in Caja since the tmp files are only created when it’s open. Let me know if you are able to replicate the problem. Thanks, Jim

Hi
Can you check in the “Preferred Applications” settings what you have set in the “Multimedia” category?
Edit: also, I don’t think Caja would be directly responsible for this.
The fact that thumbnails for pdf documents pop up in /tmp is probably expected behavior when running Atril.
Can you investigate by opening your files from the command line with no Caja instance for a while?

xdg-open document.pdf
xdg-open video.mp4

Then list content of /tmp using

ls /tmp | less

Preferred Applications:

Image Viewer: Eye of Mate image viewer
Multimedia player: VLC media player
Video player: VLC media player

contents of tmp after opening document and video from terminal:

config-err-rUtMaV
r2-ipc
Rainlendar2-jim
ssh-OZYlvC8cYxzG
systemd-private-3f6e9d5da0ce4ae8839a29310cf712d6-rtkit-daemon.service-xF2ckH
(END)

With Caja closed, I open Atril and open several documents from file menu. I then close all documents and Atril. I then check contents of tmp folder and find it to be same as above. All the “Atril-thumbnailer-???” folders only seem to be added during the time that Caja is open.

Very weird
What version of MATE are you using? 1.12.1?

Yes. Mate version 1.12.1.

I have a theory that goes like this…

When Caja displays a directory of files, that “Atril properties” extension gets info on all the Atril files listed. That’s what it does by design. While Atril is certainly a PDF reader, it also does other files (like epub), too.

I’m guessing some file, or group of files, on your system has contents (or even a file name!) arranged just right (or wrong) to trigger this explosion of /tmp files. Finding this file is key to the solution and an excellent bug report.

I think that Caja would only evaluate the directory displayed at any one time. So with Caja looking at only your home directory, is /tmp taking off? Does /tmp take off only when entering ~/Documents?

See where I’m going? Locate the directory, then by moving things around, locate the file itself.

What I’m not sure is if, once triggered, the /tmp explosion continues if Caja goes elsewhere or not. Or it could create one burst of files every time you enter a directory.

I’m crossing my fingers. Excellent work getting to Caja’s Atril extension!

1 Like

I think this may have solved the problem. I checked the contents of the folders inside the “Atril-thumbnailer-???” folders. If I had 10,000 Atril-thumbnailer-??? folders, the contents of each folder referred to one of three epub files located in my Downloads folder.

For some reason having an epub file in my Downloads folder was triggering this explosion of tmp files. I moved the three files to my Documents folder, and as on right now, the file explosion has come to a screeching halt!!!

I will continue to monitor the tmp folder and let you know if this does not correct the problem. I guess the question now is why Atril doesn’t like epub files in the Downloads folder???

Thanks for helping me with this one, Jim

I downloaded an epub file and tried this myself and I think I may have found an explanation.

When you open an epub file with Atril, it is unpacked into individual files into a randomly named folder called /tmp/atril-xxxx .
Note that if you close Atril and reopen the same file again, Atril creates another folder in /tmp each time, with identical contents.
Now for the thumbnailer: this one is triggered only if you open a folder in Caja that is set to icon view.
If you do, then each epub in that folder is unpacked into /tmp/atril-thumbnailer-xxxx .
So I suspect that you have Downloads in icon view but not Documents .

I keep all the folders in icon view. I may switch to list view while searching for a specific file, but then I switch back to icon view.

Now this is the interesting part. I’ve been running various linux distros for about 10 years and have my harddrive partitioned so that, if I decide to switch distros, I can do so fairly easily. I’ve only been running ubuntu-mate since April. I reformatted my / partition when installing, and those epub files have been sitting in my Downloads folder for the last couple of years. I’m pretty sure I haven’t opened them since installing mate.

Moving them was a simple matter for me. I probably could have just deleted them. One of them was gnucash-guide.epub and another was gnucash-help.epub. I downloaded them a couple of years ago, but currently I don’t even have gnucash installed on my system.

Since we’ve figured out this much, I’d just leave a couple of epub files in your Downloads folder and let them sit for a while.

What has been happening on my computer is Atril is unpacking each of those epub files in my Downloads folder thousands of times each. It’s like caught in a loop and it keeps unpacking the same files over and over.

I really appreciate everyone’s suggestion in the community, and while I may not have responded to each directly I tried everything that all of you suggested. Thanks again. I look forward to our next talk. Jim

2 Likes

Problem continues. I went to my Documents folder and opened gnucash-guide.epub and gnucash-help.epub. I noticed my harddrive light going crazy so I went to my tmp folder and the file explosion was happening again. I then got a popup notice that “Atril Document Viewer has closed unexpectedly.” I’ve left the notice up on my computer. I tried to do a ctrl-A and copy the contents here but that didn’t work. I’m guessing there’s a file that contains the contents of the crash notice. Let me know where to find that and I’ll send it to you. Jim

Found the crash file for Atril document viewer. The file is 775 kb. Too big to paste it all here. Here are a few lines from the end:

 (caja:5763): MateDesktop-WARNING **: Error creating thumbnail for file:///home/jim/Documents/My%20eBooks/gnucash-guide.epub: Unrecognized image file format
 (caja:5763): MateDesktop-WARNING **: Unable to create loader for mime type application/epub+zip: Unrecognized image file format
 (caja:5763): MateDesktop-WARNING **: Error creating thumbnail for file:///home/jim/Documents/My%20eBooks/Civil_government.epub: Unrecognized image file format
 (caja:5763): MateDesktop-WARNING **: Unable to create loader for mime type application/epub+zip: Unrecognized image file format
 (caja:5763): MateDesktop-WARNING **: Error creating thumbnail for file:///home/jim/Documents/My%20eBooks/gnucash-guide.epub: Unrecognized image file format
 (caja:5763): MateDesktop-WARNING **: Unable to create loader for mime type application/epub+zip: Unrecognized image file format
 (caja:5763): MateDesktop-WARNING **: Error creating thumbnail for file:///home/jim/Documents/My%20eBooks/Civil_government.epub: Unrecognized image file format
 (caja:5763): MateDesktop-WARNING **: Unable to create loader for mime type application/epub+zip: Unrecognized image file format
 (caja:5763): MateDesktop-WARNING **: Error creating thumbnail for file:///home/jim/Documents/My%20eBooks/gnucash-guide.epub: Unrecognized image file format
 (caja:5763): MateDesktop-WARNING **: Unable to create loader for mime type application/epub+zip: Unrecognized image file format
 (caja:5763): MateDesktop-WARNING **: Error creating thumbnail for file:///home/jim/Documents/My%20eBooks/Civil_government.epub: Unrecognized image file format
 (caja:5763): MateDesktop-WARNING **: Unable to create loader for mime type application/epub+zip: Unrecognized image file format
 (caja:5763): MateDesktop-WARNING **: Error creating thumbnail for file:///home/jim/Documents/My%20eBooks/gnucash-guide.epub: Unrecognized image file format
 (caja:5763): MateDesktop-WARNING **: Unable to create loader for mime type application/epub+zip: Unrecognized image file format
 (caja:5763): MateDesktop-WARNING **: Error creating thumbnail for file:///home/jim/Documents/My%20eBooks/gnucash-help.epub: Unrecognized image file format

I suspect there is some kind of bug in Atril’s epub thumbnailing code.
In fact on the epub I tested this with (free download from http://www.baen.com/on-basilisk-station.html) all thumbnails within Atril are blank, and Caja simply displays the default icon instead of a preview thumbnail.

I agree. What’s interesting is that there seems to be two events which set off this “Atril-thumbnailer-xxxxx” file explosion: (1) opening an epub file from Caja, and (2) keeping epub files in the Downloads folder.

LATER: I’ve just discovered the connection and how to replicate the problem. Open one instance of Caja and go to the tmp folder so you can monitor “Atril-thumbnailer-xxxxx” file creation. Open another instance of Caja and go to any folder where you store epub and document files. As long as that folder is open, Atril will keep trying to create a thumbnail for the epub file. This will result in thousands of attempts to create the thumbnail until you run out of diskspace, Atril crashes or you close the folder.

It only does this in Icon View because this is the only view in which Atril creates a thumbnail. In List and Compact view, Caja uses a default icon rather than a thumbnail.

I’ve been trying to reproduce this without success. I can create only a few directories like /tmp/atril-thumbnailer-xxxxx and notice it contains a directory with the name of the epub file.

When it explodes, is it always a particular file or any/all?

As for ~/Downloads perhaps some other application is set to monitor that directory - like a Firefox or Transmission defaulting there. Some apps get awfully prolific in the interest of performance, something I’m not keen on.

I did blow away some /tmp files and crashed /usr/bin/atril-thumbnailer once.

The last thing I’m wondering… any strange permissions or owners on any files involved?

I don’t think ~/Downloads has anything to do with the problem. I have that folder open a lot, and what I initially noticed was that the contents of the atril-thumbnailer-xxxxx folders contained folders relating to files in the ~/Downloads folder. So the connection between the problem and ~/Downloads is purely coincidental.

This is my best understanding of what seems to be happening: If I open ANY folder, in Icon View, which contains epub files, then Atril tries to create thumbnails for the files. It never seems to get to all the files - just the first two or three it encounters in the folder. It then gets in a loop and tries to create thumbnails for those files over and over until I close that folder.

There are no strange file permissions to my knowledge, but I should add this (and this gets me really hot). I built my own computer a couple of years ago, and in the process of moving my Western Digital harddrive to my new computer, the so-called “Smart Drive Technology” decided that I was doing something illegal and destroyed the MBR and basically trashed the drive. I was finally able to recover all my files and transfer them to a new Seagate harddrive, but all the file permissions had been changed. I don’t remember all the details now, but I looked on the ubuntu forum and did a bulk file permission reset.

I don’t know if I did that correctly or not, and this could be related to the problem.

The only thing that I can definitively state is that the explosion only seems to be related to epub files in a folder open in Icon View in Caja. Hope this helps.

Install okular and select it as your default association and see if that solves it.

To be honest, I don’t think the S.M.A.R.T. destroyed the MBR as it does checks and monitoring. Installing on BIOS and then turning BIOS UEFI is not good and moving an installed system (and its drive) to another machine won’t be never a good idea to me, moreover, if that is MBR and not GPT; anyway, that is a total different related stuff.
“Recovering the files” is exactly what must be done after installing a system and then putting them on the drive after installing is the way to go. On that regard, those files (if its not placed with the new system) the files permission must be changed and you may have screwed something doing it depending on how you did that.