bug-coreutils
[Top][All Lists]
Advanced

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

Re: tail.c: 836: recheck: Assertion `valid_file_spec (f)' failed (linux,


From: Paul Eggert
Subject: Re: tail.c: 836: recheck: Assertion `valid_file_spec (f)' failed (linux, kernel 2.4.x, coreutils 5.2.1)
Date: Fri, 03 Dec 2004 23:10:48 -0800
User-agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (gnu/linux)

Roberto Nibali <address@hidden> writes:

> if I run those commands on a DRDB mounted partition, I get a
> EX_IOERR for normal tail and this assertion failed for a tail -f
> plus an EX_IOERR.

Thanks for reporting the problem.  Part of the problem is that your
DRDB mounted partition is returning I/O errors on large files for some
reason.  This is not a bug in "tail"; it is a bug or other problem
with your file system.  You can investigate this further by using
"strace tail -f file" and looking at the system calls it executes.

But the other problem is a bug in "tail": it should not report
an assertion failure, even if there is an I/O error when reading
its input data.  I installed this patch to CVS coreutils:

2004-12-03  Paul Eggert  <address@hidden>

        * src/tail.c (tail_file): Set errnum to -1 if the initial "tail"
        failed.  This works around an assertion failure reported by
        Roberto Nibali in:
        http://lists.gnu.org/archive/html/bug-coreutils/2004-12/msg00012.html

--- src/tail.c  28 Sep 2004 06:34:22 -0000      1.230
+++ src/tail.c  4 Dec 2004 07:02:35 -0000       1.231
@@ -1317,7 +1317,7 @@ tail_file (struct File_spec *f, uintmax_
             call made the window big enough to exercise the problem.  */
          sleep (1);
 #endif
-         f->errnum = 0;
+         f->errnum = ok - 1;
          if (fstat (fd, &stats) < 0)
            {
              ok = false;




reply via email to

[Prev in Thread] Current Thread [Next in Thread]