Subject: Re: [Boost-bugs] [Boost C++ Libraries] #11016: Boost file logging misbehaves when file system is full
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2015-02-24 08:32:47
#11016: Boost file logging misbehaves when file system is full
-------------------------------+---------------------
Reporter: michi@⦠| Owner: andysem
Type: Bugs | Status: closed
Milestone: To Be Determined | Component: log
Version: Boost 1.55.0 | Severity: Problem
Resolution: fixed | Keywords:
-------------------------------+---------------------
Comment (by Michi Henning <michi.henning@â¦>):
Replying to [comment:27 andysem]:
> This is not a leak. Empty files, as well as non-empty ones are accounted
for and deleted when threshold is reached. See the docs
http://www.boost.org/doc/libs/release/libs/log/doc/html/log/detailed/sink_backends.html#log.detailed.sink_backends.text_file.managing_rotated_files,
especially take note about the min_free_space parameter.
>
> I don't see the reason to change the behavior wrt empty files. They are
not special and will be processed just like any other log file.
Andy, the point is that the threshold isn't reached while the file system
is full. Therefore, while the "file system full" condition persists, a
potentially unbounded number of inodes is used up, making a bad situation
worse. If the file system free space falls below the threshold then, yes,
eventually the empty inodes are reclaimed. But that doesn't happen until
the threshold *is* reached enough times for all the logs to rotate through
until we get to the empty ones. In effect, this means that the empty files
can keep kicking around for potentially weeks or months.
I'll have a look at min_free_space, thanks for the tip! But, as far as I
can see, it would have to be at least as large max_size to have any
effect?
Is it really that hard to check whether a write failed and, if so, stat
the file and unlink it if empty? It seems like a simple fix, and it would
get rid of the empty files. We'd have a more robust system that way.
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/11016#comment:28> Boost C++ Libraries <http://www.boost.org/> Boost provides free peer-reviewed portable C++ source libraries.
This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:17 UTC