From debbugs-submit-bounces@debbugs.gnu.org Mon Jan 10 07:38:32 2011 Received: (at submit) by debbugs.gnu.org; 10 Jan 2011 12:38:33 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PcH15-0000Sc-7V for submit@debbugs.gnu.org; Mon, 10 Jan 2011 07:38:31 -0500 Received: from eggs.gnu.org ([140.186.70.92]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PcFg1-0006Hj-13 for submit@debbugs.gnu.org; Mon, 10 Jan 2011 06:12:41 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PcFnA-0005Dh-Ex for submit@debbugs.gnu.org; Mon, 10 Jan 2011 06:20:05 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_LOW, RFC_ABUSE_POST, T_DKIM_INVALID, T_TO_NO_BRKTS_FREEMAIL autolearn=unavailable version=3.3.1 Received: from lists.gnu.org ([199.232.76.165]:48281) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PcFnA-0005Dd-C2 for submit@debbugs.gnu.org; Mon, 10 Jan 2011 06:20:04 -0500 Received: from [140.186.70.92] (port=46687 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PcFn9-0002u8-2b for bug-coreutils@gnu.org; Mon, 10 Jan 2011 06:20:04 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PcFn7-0005Cf-TU for bug-coreutils@gnu.org; Mon, 10 Jan 2011 06:20:02 -0500 Received: from mail-qw0-f41.google.com ([209.85.216.41]:46181) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PcFn7-0005Bc-L1 for bug-coreutils@gnu.org; Mon, 10 Jan 2011 06:20:01 -0500 Received: by qwa26 with SMTP id 26so19165401qwa.0 for ; Mon, 10 Jan 2011 03:20:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:date:message-id :subject:from:to:content-type; bh=U7WKp73JVCCvEPqJWYGDj1PO94HGVd5o2eKyqnGXpQI=; b=kGeCyXh54LywY9FIeHwANWPuO2fi3QmRTsRGJgyISHKPLdap+qYXrxRd3fcxHwebDW 9bl+JZQ/etxjAG+/g1WyC7F/AXEfHhUJEpQXlnKlDA/g1NVhg3dBMZifcdnvdkYCTN19 VHMfEZ0W7P2q34mjBTE+tzUdCRZg16vvgpzFM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=me9MIxGuWxfe0h8tpnCn4Ad7b661nkC7Oojx3S5ziQKX9aoNh5fPMSxQiz/EskDZ3r N9mgB4I/IUzTXM4BPBupjrACSYHRMeJplnFm8520CLe5bTgl/9lQulf4n3f5Yxg+uL7P CICOaej8aG4Cc8WdRHj4MlioIJStMjGJO9508= MIME-Version: 1.0 Received: by 10.229.250.9 with SMTP id mm9mr24632671qcb.264.1294658400729; Mon, 10 Jan 2011 03:20:00 -0800 (PST) Received: by 10.229.40.1 with HTTP; Mon, 10 Jan 2011 03:20:00 -0800 (PST) Date: Mon, 10 Jan 2011 12:20:00 +0100 Message-ID: Subject: tail -f gives misleading error message when inotify limit is reached From: Bram Neijt To: bug-coreutils@gnu.org Content-Type: text/plain; charset=ISO-8859-1 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Spam-Score: -5.9 (-----) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Mon, 10 Jan 2011 07:38:30 -0500 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -5.9 (-----) Dear developers, When tail -f has inotify enabled and hits the max_user_watches limit of inotify, the resulting error message is very misleading. To reproduce: 1) Make sure you will hit the limit if you try another inotify request sudo sh -c 'echo 10 > /proc/sys/fs/inotify/max_user_watches' 2) Create a file: touch /tmp/hello 3) Follow it: tail -f /tmp/hello Result: tail: cannot watch `/tmp/hello': No space left on device Expected result: tail: cannot watch '/tmp/hello' because inotify reported: No space left on device It can be verified by using strace tail -f /tmp/hello: inotify_add_watch(4, "/tmp/hello", IN_MODIFY|IN_ATTRIB|IN_DELETE_SELF|IN_MOVE_SELF) = -1 ENOSPC (No space left on device) I've also submitted this bug to launchpad for easier tracking at https://bugs.launchpad.net/ubuntu/+source/coreutils/+bug/700958 Greetings, Bram Neijt From debbugs-submit-bounces@debbugs.gnu.org Mon Jan 10 09:42:49 2011 Received: (at 7813) by debbugs.gnu.org; 10 Jan 2011 14:42:49 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PcIxN-00039F-Bg for submit@debbugs.gnu.org; Mon, 10 Jan 2011 09:42:49 -0500 Received: from mx.meyering.net ([82.230.74.64]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PcIxK-000392-Ih for 7813@debbugs.gnu.org; Mon, 10 Jan 2011 09:42:48 -0500 Received: by rho.meyering.net (Acme Bit-Twister, from userid 1000) id A0BB560296; Mon, 10 Jan 2011 15:50:10 +0100 (CET) From: Jim Meyering To: 7813@debbugs.gnu.org Subject: Re: [Bug 700958] Re: tail -f gives misleading error message when inotify limit is reached In-Reply-To: <20110110143125.11752.13343.malone@wampee.canonical.com> (A. Bram Neijt's message of "Mon, 10 Jan 2011 14:31:24 -0000") References: <20110110094949.27543.88934.malonedeb@wampee.canonical.com> <20110110143125.11752.13343.malone@wampee.canonical.com> Date: Mon, 10 Jan 2011 15:50:10 +0100 Message-ID: <87mxn8q0d9.fsf@meyering.net> Lines: 44 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -5.7 (-----) X-Debbugs-Envelope-To: 7813 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -5.7 (-----) A. Bram Neijt wrote: > http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D7813 > > ** Bug watch added: Email to bug-coreutils@gnu # > mailto:bug-coreutils@gnu.org > > ** Also affects: coreutils via > mailto:bug-coreutils@gnu.org > Importance: Undecided > Status: New Thanks for the report. This was fixed for 8.6: commit 61b77891c2d9af299063850a0c4d1d721340cfff Author: P=C3=A1draig Brady Date: Tue Oct 12 01:39:58 2010 +0100 tail: fix checking of currently unavailable directories * src/tail.c (tail_forever_inotify): Handle the case where tail --follow=3Dname with inotify, is not able to add a watch on a specified directory. This may happen due to inotify resource limits or if the directory is currently missing or inaccessible. In all these cases, revert to polling which will try to reopen the file later. Note inotify returns ENOSPC when it runs out of resources, and instead we report a particular error message, lest users think one of their file systems is full. (main): Document another caveat with using inotify, where we currently don't recheck directories recreated after the initial watch is setup. * tests/tail-2/F-vs-rename: Fix the endless loop triggered by the above issue. * tests/tail-2/inotify-hash-abuse: Likewise. * tests/tail-2/wait: Don't fail in the resource exhaustion case. * tests/tail-2/F-vs-missing: A new test for this failure mode which was until now just triggered on older buggy linux kernels which returned ENOSPC constantly from inotify_add_watch(). * NEWS: Mention the fix. With coreutils-8.6 and newer, you'd see this: tail: inotify resources exhausted tail: inotify cannot be used, reverting to polling From debbugs-submit-bounces@debbugs.gnu.org Tue May 08 06:39:00 2012 Received: (at 7813-done) by debbugs.gnu.org; 8 May 2012 10:39:00 +0000 Received: from localhost ([127.0.0.1]:40532 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SRhoq-0002OB-1U for submit@debbugs.gnu.org; Tue, 08 May 2012 06:39:00 -0400 Received: from mx.meyering.net ([88.168.87.75]:49406) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SRhon-0002O3-Ly for 7813-done@debbugs.gnu.org; Tue, 08 May 2012 06:38:58 -0400 Received: from rho.meyering.net (localhost.localdomain [127.0.0.1]) by rho.meyering.net (Acme Bit-Twister) with ESMTP id CA75A6004B for <7813-done@debbugs.gnu.org>; Tue, 8 May 2012 12:36:49 +0200 (CEST) From: Jim Meyering To: 7813-done@debbugs.gnu.org Subject: Re: bug#7813: [Bug 700958] Re: tail -f gives misleading error message when inotify limit is reached In-Reply-To: <87mxn8q0d9.fsf@meyering.net> (Jim Meyering's message of "Mon, 10 Jan 2011 15:50:10 +0100") References: <20110110094949.27543.88934.malonedeb@wampee.canonical.com> <20110110143125.11752.13343.malone@wampee.canonical.com> <87mxn8q0d9.fsf@meyering.net> Date: Tue, 08 May 2012 12:36:49 +0200 Message-ID: <877gwn7yda.fsf@rho.meyering.net> Lines: 19 MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -1.9 (-) X-Debbugs-Envelope-To: 7813-done X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.9 (-) Jim Meyering wrote: > A. Bram Neijt wrote: >> http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D7813 ... > Thanks for the report. > This was fixed for 8.6: > > commit 61b77891c2d9af299063850a0c4d1d721340cfff > Author: P=E1draig Brady > Date: Tue Oct 12 01:39:58 2010 +0100 > > tail: fix checking of currently unavailable directories ... > With coreutils-8.6 and newer, you'd see this: > > tail: inotify resources exhausted > tail: inotify cannot be used, reverting to polling Marked as done. From unknown Sat Jun 14 18:46:12 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Tue, 05 Jun 2012 11:24:03 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator