GEGL created a huge swap file on my SSD drive and then ran out of space
Submitted by Elle Stone
Link to original bug (#794243)
Description
Recently I noticed that free space had steadily been dwindling on the SSD drive where my operating system and $HOME partition are located. Last I checked I was down to 45 GB free space on the SSD drive, which seems like a reasonable amount of free space, though I was puzzled as to exactly what was taking up so much space.
Today I was editing an XCF file and GIMP (and my entire computer) froze. A GEGL message did pop up when I hit the "Esc" key, so I wrote the contents down on a piece of paper:
GEGL Message: unable to write tile data to self: No space left on device (-1/20480 bytes written).
The message was repeated again, this time with (-1/131072 bytes written).
None of the keys on the keyboard elicited a response from the computer. So I shut the computer down using the "Off" button on the front of the case.
When I restarted the computer, there was only a few megabytes of free space on the SSD drive. So I moved some stuff to another drive and deleted some other stuff (that I would have greatly preferred to not move and not delete). But this only freed up a relatively small amount of space.
So I started looking for where the missing space might have gone, and it turned out to be $HOME/.cache/gegl-0.3/swap/32340-shared.swap, which was (and is, because I haven't deleted it yet) occupying 145.8 GiB of space in a 187GB partition.
Well, mystery solved. That's where all the missing space had gone.
It would be nice if there were a timely error message that would tell the user to save her work and close her files "now" because GEGL is running out of disk space.
It would be nice if the GEGL error message would specify that GEGL itself ate all the space, and where the GEGL space-eating file is located.
It would be super nice if GEGL would periodically release used disk space, or at least let the user have a way to monitor how close GEGL is to eating up the entire free space of whatever drive it decides to write to.
It seems imperative that the user have a way to limit how much disk space GEGL is using. I lost work, fortunately not too much, or at least I think I can still open the file I was working on.
It also seems imperative that the user be told up front where GEGL is writing to. This should be put prominently in the appropriate "environment" section of GIMP Preferences.
I have 32GB RAM on my computer and 16GB swap space on one of my hard drives. I think maybe GEGL/GIMP need better memory management.
Version: git master