On 08/07/2019, Allan Streib <astr...@indiana.edu> wrote:
> I have recently encountered another issue with firefox, that is it will
> fill up my /tmp partition with "ghost" files. Meaning, df(1) (and other
> applications) will tell me that my 4GB /tmp is full, but I don't see any
> files there and du(1) will say that /tmp only has 18KB used. If I kill
> firefox, the /tmp space becomes available again.
>
> Have not yet identified which site is triggering this behavior, but I
> suspect it's one of Gmail, Google Sheets, etc which I tend to have open
> for long periods of time.
>
> OpenBSD 6.5 GENERIC.MP#1 amd64
>
> Landry's FF build (67.0.4) with uBlock Origin.
>
> Allan

When you say, "ghost" files, you're not referring to mere dot-files, right?

I wonder if the following observations I made even a few years back
are sort of relevant here:

It used to be that when Firefox's Flash plugin (remember that?) for
Unix-likes used to buffer content like a video for example, that
content was saved as a file in /tmp, and it used to be possible to
easily find such files and e.g. pipe them to vlc or swfdec if the
corresponding online Flash media player was too decrepit. I'm not sure
when those files ultimately used to get deleted back then; maybe on
tab close or on browser restart, certainly on reboot.

However, later on, Firefox changed things so that it would unlink any
such files about as soon as it created them, even while still
appending data to them, by keeping (just) the file descriptor in
memory. On Linux, people could do lsof(8) and grep(1) shenanigans to
copy/recreate the file descriptor out of /dev, and thus resurrect the
file, so long as it was still open. OpenBSD uses fstat(1) instead of lsof,
and I never got those shenanigans to work on OpenBSD.

Similarly, when Firefox used to download files and downloads got
interrupted, Firefox used to always keep those partially downloaded
files, but I've now seen it at least on some recent versions that
those too are deleted, at least as soon as a download fails. At that
point I think the files are fully closed; I don't think I've been able
to recover anything there, not even with lsof on Linux.

Why am I telling you all this?

1. I think the same behaviour may be what's going on with your
so-called "ghost" files.
I.e.: Files and file descriptors get created, the files get unlinked,
but Firefox still has them open and *is still growing* them, which
continues until it actually fclose(3)s them.

2. I do seem to observe a bit of an anti-usability trend here, because
of course prematurely unlinking the files DOESN'T save any disk space,
but it DOES make it harder for users, sysadmins and add-on authors to
manage (pipe, copy, script-process, download-resume and reuse) such
files themselves.
This may be reflective of a wider struggle for control of computers
that we, ostensibly, own -- and ought to control. It jibes with the
increasing trend towards the point where, like Michael Sims put it, if
the desires of remote corporations "conflict with the desires of you,
the owner of the computer, their desires win."[1]
IMNSHO, Mozilla, and others, have largely fallen prey to regulatory
capture,[2] i.e. they're the "regulators", and they've been *captured*
by corporations paying their employees to help out FOSS for
free^W^W^W^W^W inject their desires, corporate philosophy and bad
ideas until their desires win -- possibly without the people pushing
such changed agendas and bad ideas onto the FOSSverse even realising
what they're doing, which is the ultimate in plausible deniability.
Because seriously, why would you unlink files prematurely? Files that
you're continuing to grow? Is there any reason other than you want to
keep things hidden from, and out of the hands of dirty, dirty, pleb
users who had better pay a tax to you every time they click play?[3]

Remember, DRM and DRM-like designs exist to stop you from doing things
that are ALLOWED by copyright. On this, also *vide* Sims.

Sorry for the sermon. I felt it was at least relevant.

Ian

PS: Firefox also has increasingly taken to turning things that used to
be more easily understandable and discoverable files into databases.
I'm sure they had only excellent reasons and no obscurantist agenda...

PPS: Of course, it's not just Firefox/Mozilla; it's just that it's
particularly noticeable with those, because you would expect better
from them -- or maybe *you* wouldn't, but I used to.

[1] https://www.youtube.com/watch?v=VAR42TMIhoU&t=14m20s
[2] https://en.wikipedia.org/wiki/Regulatory_capture
[3] https://en.wikipedia.org/wiki/Rent-seeking

Reply via email to