This is going to be worded like a story, so please bear with me.
Today I was merrily using Xfce when I saw (sysload plugin) swap skyrocket. I did not respond fast enough to stop whatever was eating RAM, so I ended up having to shut off my laptop. I rebooted to find /tmp/magick-XX* files (they look like random named files matching that pattern) amounting to 208MB+, and one of them linked to ~/.thumbnails etc. I could not figure out the problem using logs.
When I got back to my work in Xfce, I noticed that it started again, but this time I stopped it in time. I found out the cause: evidentally the PostScript version of the Slackware Manual is in the Thunar directory I was working in. I launched my Documents/ folder in Thunar and then double-clicked a document I was working on in KWord. The Documents/ folder was still open in Thunar, and Thunar then launched convert (ImageMagick) to make a thumnail for slackbook-2.0.ps. Convert for some reason then started thrashing the system. I closed it in time.
I found the way to prevent it was to shut off thumb nails. However, there is no way to instead specify "no thumnails for files bigger than ____", so this is sort of a bug, sort of a feature request.
Here's some cut and paste of what was going on in the shell. This problem is reproducible (i.e. I tried it again and it happened once again), so if you want anything like strace, etc, logs of this, contact me and I'll provide them. Here's the info:
Tasks: 107 total, 3 running, 104 sleeping, 0 stopped, 0 zombie
Cpu(s): 32.7%us, 4.6%sy, 0.0%ni, 0.0%id, 62.0%wa, 0.7%hi, 0.0%si, 0.0%st
Mem: 1017540k total, 1005320k used, 12220k free, 0k buffers
Swap: 1574360k total, 513376k used, 1060984k free, 635520k cached
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
3979 robert 20 0 911m 578m 575m R 31.9 58.2 0:13.35 convert
3864 robert 20 0 133m 8940 5932 S 0.0 0.9 0:19.87 firefox-bin
2735 root 20 0 206m 7400 2484 S 1.3 0.7 1:28.80 X
2764 robert 20 0 21736 6096 4232 S 0.0 0.6 0:05.66 xfce4-panel
bash-3.1$ ls -lh
-rw------- 1 robert users 206M 2008-10-09 20:15 magick-XXYnSIZz
-rw------- 1 robert users 149 2008-10-09 20:14 magick-XXqQz4lZ
lrwxrwxrwx 1 robert users 47 2008-10-09 20:14 magick-XXsbcsro -> /home/robert/Desktop/Documents/slackbook-2.0.ps
bash-3.1$ ps aux | grep convert
robert 3979 21.0 26.2 275984 266604 tty1 R 20:14 0:03 convert ps:/home/robert/Desktop/Documents/slackbook-2.0.ps -scale 128 png:/tmp/.thunar-vfs-thumbnail.0X8SIU
robert 3997 0.0 0.0 2056 648 pts/2 S+ 20:15 0:00 grep convert
The Slackware Book Post Script file can be found at:
Thank you very much for this report.
I have just tried it and not had the same problem. It is probably due to different compile flags used to build ImageMagick, or different versions of it.
Could you tell me please which ImageMagick version you are running? Also, what distro do you use?
> I found the way to prevent it was to shut off thumb nails.
> However, there is no way to instead specify "no thumnails
> for files bigger than ____", so this is
> sort of a bug, sort of a feature request.
I don't think that's the solution here: the slackware handbook ps file is only 3MB. And some with many files it is not actually necessary to read the whole file - so the size is irrelevant. Probably what I should do is use the ulimit command inside every thumbnailer, so that they cannot use more than (say) 25% of the available RAM.
I should probably use,
ulimit -c 0 -f 25600 -m M_IN_KB -v V_IN_KB -t 5
where M_IN_KB should be e.g. 20% of available RAM,
and V_IN_KB should be 0 (don't want to let a thumbnailer use swap).
I am using Slackware 12.1 (with all applicable patches)
Version: ImageMagick 6.3.7 02/28/08 Q16 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2008 ImageMagick Studio LLC
The ulimit thing sounds nice. If I can help by testing out a patch for this, please let me know. Thanks!
Closing as thunar-thumbnailer is deprecated/unmaintained/replaced by tumbler.