GNU bug report logs - #9256
Erroneous output from "verify-visited-file-modtime" (fileio.c)

Previous Next

Package: emacs;

Reported by: Vivien Mallet <Vivien.Mallet <at> inria.fr>

Date: Sat, 6 Aug 2011 16:57:02 UTC

Severity: normal

Done: Paul Eggert <eggert <at> cs.ucla.edu>

Bug is archived. No further changes may be made.

Full log


Message #10 received at 9256 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Vivien Mallet <Vivien.Mallet <at> inria.fr>
Cc: 9256 <at> debbugs.gnu.org
Subject: Re: bug#9256: Erroneous output from "verify-visited-file-modtime"
 (fileio.c)
Date: Sat, 23 Nov 2019 14:44:04 +0100
Vivien Mallet <Vivien.Mallet <at> inria.fr> writes:

> One reason is that stat can return an EINTR error. I am running
> Linux. According to the manpages, stat is not supposed to fail with
> EINTR under a Posix system (contrary to SVr4), but this is what I
> observe. I checked with a call to printf right after the error, and I
> got errno == 4 which is EINTR here. After exposing this on IRC #emacs, I
> was told it could be due to the NFS mount (with option "intr") as the
> files are on a network NFS volume.

(There was unfortunately no response to this bug report when it was
reported eight years ago.)

Hm.  I'm not sure you can expect things to work with a setup like that,
really: I'd expect things to bug out pretty regularly across the board,
since you'd have to check for EINTR in every single call to a bunch of
system calls, and basically do what you do here everywhere:

>    filename = ENCODE_FILE (BVAR (b, filename));
 
> -  if (stat (SSDATA (filename), &st) < 0)
> +  while ((stat_status = stat (SSDATA (filename), &st)) < 0 && errno == EINTR);
> +
> +  /* if (stat (SSDATA (filename), &st) < 0) */
> +  if (stat_status < 0)

> This solved only part of the problem. I still get a lot of false 'nil'
> from "(verify-visited-file-modtime (current-buffer))" because stat
> returns ENOENT. One may argue this comes from my network, but the
> problem appears only inside Emacs.

Indeed.  Does anybody have an opinion on whether this is a configuration
Emacs supports?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




This bug report was last modified 5 years and 201 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.