[prev in list] [next in list] [prev in thread] [next in thread] 

List:       busybox
Subject:    Re: full tmpfs, but not much / nothing inside, syslogd
From:       Hin-Tak Leung <htl10 () users ! sourceforge ! net>
Date:       2012-07-16 10:21:58
Message-ID: 1342434118.18739.YahooMailClassic () web29402 ! mail ! ird ! yahoo ! com
[Download RAW message or body]

--- On Mon, 16/7/12, Bastian Bittorf <bittorf@bluebottle.com> wrote:

> > there is one known issue on Unix
> like systems which may lead to
> > the
> > case where a file system without file entries may
> report no
> > available
> > space. I do not know if this is the reason for your
> trouble, but
> > it
> > it's better to tell about, as this is not known to all
> Unix users.
> > 
> > On Unix like systems it is possible to create (or open
> a file) and
> > remove the directory entry (unlink) while holding the
> file still
> > open.
> > As long as you do not close all references to the same
> file
> > descriptor
> > the file continues to exist and claims space on the
> file system.
> > Nobody
> > else can see this file or reclaim the space. Only the
> process who
> > holds
> > the file open (or processes if forked and file
> descriptor
> > inherited)
> > can reclaim the space of such an file. As soon as all
> references of
> > the
> > file are closed (may be due to exiting/killing the
> holding process)
> > the
> > used space is reclaimed and everything is back fine.
> > 
> > Some years ago I had trouble on a RAM file system which
> got full
> > during
> > usage, but every time I tried to look into this, there
> was enough
> > free
> > space. The reason for this: Opening the telnet session
> closed the
> > process holding the open file. After a long time of
> debugging a
> 
> uh! a real heisenbug.
> 
> > misbehaved file rotating was localized for the bug. The
> process
> > rotated the file names but forgot to close the original
> file and
> > more
> > data got appended to the old (invisible) file, while
> the testing
> > loop
> > checked the new (empty) file for it's size to trigger
> next file
> > rotation ... a trigger which never occurred while the
> new file
> > stayed
> > empty as all new data still got appended to the old
> file ... until
> > file
> > system space exhausted :(
> > 
> > In case this helps to narrow down your trouble.
> > 
> > Harald
> 
> thank you very much for telling the story behind it.
> 
> bye, bastian

On the typical linux system, there is a utility called lsof, for opened files, which \
can list such opened but unlinked files (among other functionalities).

Google-chrome opens a lot of such files while it runs, just an interesting fact; and \
so does gnome terminal for its scrollback buffers.

_______________________________________________
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic