[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Resolved as far as possible, I think: was: Re: "Invisible" files on /tmp from Flash or Iceweasel?



Thanks to all who responded, including a few who responded offlist.

I haven't really resolved the problem, but I have learned a few things that 
I'll try to summarize in this.  Well, actually, Sven has done a pretty good 
job--I might add a few comments.

On Saturday 11 February 2012 11:28:21 am Sven Joachim wrote:
> On 2012-02-11 15:33 +0100, Randy Kramer wrote:
> > So, my questions:
> >    * is that possible (that Flash or Iceweasel are using unnamed inodes
> > to create invisible files on /tmp)
>
> Yes.  Well, the file needs to be given a name initially, but the name
> can be removed by calling unlink(2) after it has been opened.

I'm now sure that is what is happening--Flash is creating a cached file 
(associated with the URL of a video) on /tmp, and then immediately unlinking 
the file.  I assume it is sort of a piracy prevention measure, but then I 
don't understand why they put another copy of the cached file in the 
iceweasel / firefox cache on ~.  But, who am I to guess why they did that, or 
maybe that is something that iceweasel does and Flash can't prevent (easily)?

> >    * if so, are there some tools I can use to find those files
>
> Yes, lsof is helpful.

lsof sounded like a good idea, but doesn't actually find the files.  I guess 
it would find the files before the unlink occurred.

> > and delete them
> > to provide more space on /tmp (to free up the frozen videos)
>
> No, as long the browser keeps the file open, it is not possible to free
> the space occupied by it.  Restart Iceweasel to achieve that.

Yup, there seem to be only two ways to free up that space on /tmp: close the 
tab displaying the video (with or without viewing it to the end), or close 
iceweasel.

For now, what I'm doing if I plan to open a lot of tabs with videos is to run 
df /tmp regularly, and, if I approach 100% usage, I'll take steps to close 
some tabs.

One of the off list responses to my question referred me to:

http://www.linuxondesktop.in/2011/03/how-to-download-flash-files-no-flash.html

which touches on the subject and includes a bash script named findflash.  That 
didn't work directly, but after deconstructing it to understand how it should 
work (and why it didn't), I used some of the things I learned from it to dig 
deeper into the problem.

That is what has pretty much convinced me that I'm not going to find an easy 
solution, although I might explore some links that talk about undeleting 
files, because the problem sort of comes down to that--I'm guessing that if I 
learned the right things about undeleting files, I might also learn how to 
put a name on an unlinked file that hasn't yet been deleted (because the tab 
containing the video is still open), and then using that name really 
delete--oops, wait, that won't work either, because the open tab will 
maintain a link to that file and presumably prevent me from deleting it.

(Sorry, that's a pretty convoluted and not easy to understand paragraph.  I 
should rewrite it, but not today.)

So, I'll probably just stick with monitoring the space free / used on /tmp, 
and close tabs when necessary to avoid 100% usage.

Thanks!
Randy Kramer




Reply to: