After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 782236 - Six 50MB magick files created in /tmp when launching applications
Six 50MB magick files created in /tmp when launching applications
Status: RESOLVED INCOMPLETE
Product: libgsf
Classification: Core
Component: General
unspecified
Other Linux
: Normal normal
: ---
Assigned To: Jody Goldberg
Jody Goldberg
Depends on:
Blocks:
 
 
Reported: 2017-05-05 18:20 UTC by Chris Roth
Modified: 2017-05-23 18:25 UTC
See Also:
GNOME target: ---
GNOME version: 3.23/3.24



Description Chris Roth 2017-05-05 18:20:01 UTC
New archer / GNOME user here, but long time linux user.

I installed the CUPS printer services yesterday which installed imagemagick as a dependency.

After that I noticed later in the day my /tmp folder had ballooned to about 8Gb of magick-XXXXXXXXXX files, each 50MB in size.

With some tinkering, I realized that each time I launched an application, 6 of these 50MB imagemagick files would spawn, and most of the time about 7 files in /tmp that start with gsf-thumbnailer-XXXXXX

When I close the application, the tmp files stick around.

I'm guessing something isn't right as this does not seem like it should be happening.

In the mean-time I've removed the imagemagick package, but I will need to print from this machine, so I need to be able to put this package back on.

I'm willing to debug as necessary.

Thanks,
Chris
Comment 1 Debarshi Ray 2017-05-06 16:34:30 UTC
Somehow the gsf-office thumbnailer is involved. I wonder if the Arch packaging will let you remove it easily.

Do you also happen to have gnome-photos installed? I haven't dug into this, but gnome-photos can end up using imagemagick (a) via gegl, which has a imagemagick based loader, or (b) by somehow invoking the gsf-office thumbnailer. Even though (b) is very unlikely with gnome-photos-3.24 I just want to be very sure that's not the case here.
Comment 2 Chris Roth 2017-05-08 00:23:06 UTC
I don't have gnome-photos installed. I can post a package list if it would help.
Comment 3 Florian Müllner 2017-05-08 05:59:58 UTC
Did you search anything in the overview? I imagine that the nautilus/documents search providers can trigger thumbnailing ...
Comment 4 Chris Roth 2017-05-08 13:48:19 UTC
Good catch. It helped me narrow things down a bit.

I've thought it was when I launched any application. However, no files are created when I launch an application from the dash, or if I press hotkeys to launch or if I open a terminal window to launch.

The only time the are created is when I press the super key to get to the overview window and then start spelling out a program name to launch that program. This action does cause the system to put thumbnails on the screen that match what I'm typing. So it is triggering thumbnailing, but why are the files so big and why are they not being cleaned up?
Comment 5 Debarshi Ray 2017-05-09 14:06:30 UTC
(In reply to Chris Roth from comment #4)
> The only time the are created is when I press the super key to get to the
> overview window and then start spelling out a program name to launch that
> program. This action does cause the system to put thumbnails on the screen
> that match what I'm typing. So it is triggering thumbnailing, but why are
> the files so big and why are they not being cleaned up?

I am afraid that other than the application icons, every other thumbnail is provided by applications acting as search providers. You can see a list of such applications in Settings -> Search.

Maybe that will help you narrow down the culprit?

(The other option is to work around this by disabling the gsf-office-thumbnailer binary. 'chmod 644 /path/to/gsf-office-thumbnailer' would be the nuclear option.)
Comment 6 Florian Müllner 2017-05-09 15:35:16 UTC
Moving to libgsf which provides the thumbnailer.
Comment 7 Chris Roth 2017-05-09 17:17:37 UTC
For the time being I'm running a cron job that deletes the /tmp/magick-* files. I have enough memory on my machine that it isn't an issue.

This imagemagick bug may also have something to do with the issue:
https://github.com/ImageMagick/ImageMagick/issues/395
Comment 8 Chris Roth 2017-05-10 20:07:44 UTC
When I turn off Documents Search in the Overview (Settings -> Search) I no longer have the problem of magick-XXXXXXXXXX files or gsf-thumbnailer-XXXXXX files populating my /tmp
Comment 9 Debarshi Ray 2017-05-11 18:51:51 UTC
Out of curiosity, what are the MIME type of the files that lead to this?
Comment 10 Chris Roth 2017-05-12 17:10:53 UTC
(In reply to Debarshi Ray from comment #9)
> Out of curiosity, what are the MIME type of the files that lead to this?

pptx
Comment 11 Morten Welinder 2017-05-23 01:01:48 UTC
gsf *provides* the thumbnailer but we have nothing that *runs* it
for the user.  So not a gsf problem, unless you would also consider
"cp" to be at fault if someone copies large files to /tmp/.

However, that is not really helpful.

Suggestion:

1. Rename "gsf-office-thumbnailer" to "gsf-office-thumbnailer.real"

2. Install a shell script called gsf-office-thumbnailer containing
   something like this (untested)

   #!/bin/sh
   LOG=/tmp/thumbnailer-debug
   date >>$LOG
   echo "$@" >>$LOG
   ps -ef | grep -w $$ >>$LOG
   exec gsf-office-thumbnailer.real "$@"

3. Trigger the problem

4. See what's in /tmp/thumbnailer-debug

5. Eventually clean up by renaming back
Comment 12 Chris Roth 2017-05-23 16:45:11 UTC
Morten Welinder, I tried reproducing the bug to enable me to run your suggestion; however, I can no longer produce the bug. My guess is having updated my system in the meantime has fixed the issue. I recall that ImageMagick was one of the updates.

This issue can be marked closed as far as I'm concerned.
Comment 13 Morten Welinder 2017-05-23 18:25:01 UTC
Closing as per comment 12.

Closing this bug report as no further information has been provided. Please feel free to reopen this bug report if you can provide the information that was asked for in a previous comment.
Thanks!