[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: tail is reading already rotated file.
From: |
Pádraig Brady |
Subject: |
Re: tail is reading already rotated file. |
Date: |
Thu, 05 Feb 2015 01:22:41 +0000 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 |
On 05/02/15 00:45, Bernhard Voelker wrote:
> On 02/04/2015 11:09 AM, 최종우 wrote:
>> To reproduce the problem, you can run this script. It exhausted inotify
>> watches. (in order to get the result more
>> quickly, decrease the value of max_user_watches.)
>>
>> let count=0; echo $count>>a.log; ./tail -F a.log & while true; do mv a.log
>> a.log.$count; let count=count+1; echo
>> $count>>a.log; done
>
> The following incomplete quick-shot patch releases the old inotify
> resource, and reverts to polling if tail really hits ENOSPC (rather
> than a strange "no space left on device" message).
> Not tested much - at least it passes the existing tests.
> Currently, I've no idea how to test that properly.
I've a test and more complete patch here which I'll send tomorrow.
> I've not looked closer at the other tail bug reported yesterday;
> does that interfere with this one?
Not really. I'm testing a patch for that too.
thanks,
Pádraig.