GNU bug report logs -
#13149
24.3.50; Emacs thinks file was changed outside Emacs, but it was not
Previous Next
Reported by: "Drew Adams" <drew.adams <at> oracle.com>
Date: Tue, 11 Dec 2012 21:53:02 UTC
Severity: normal
Tags: moreinfo, unreproducible
Found in version 24.3.50
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
Full log
Message #46 received at 13149 <at> debbugs.gnu.org (full text, mbox):
On 01/15/13 13:38, Dmitry Gutov wrote:
> If this is too bizarre, please wait until I re-confirm this on a new virtual machine with a different distro.
It's strange all right: it indicates that time stamps
are spontaneously jumping by 2 or more seconds, which I
can't explain by any file system bugs that I can think of.
Maybe it's a new class of bugs, but we'd need to know more
about them.
Could you please try instrumenting via this patch instead?
It should help diagnosis. Thanks.
=== modified file 'lib/stat-time.h'
--- lib/stat-time.h 2013-01-01 09:11:05 +0000
+++ lib/stat-time.h 2013-01-15 21:44:42 +0000
@@ -22,6 +22,7 @@
#include <sys/stat.h>
#include <time.h>
+#include <stdio.h>
_GL_INLINE_HEADER_BEGIN
#ifndef _GL_STAT_TIME_INLINE
@@ -134,18 +135,22 @@
/* Return *ST's data modification time. */
_GL_STAT_TIME_INLINE struct timespec
-get_stat_mtime (struct stat const *st)
+get_stat_mtime (struct stat const *st, char const *file, int line)
{
+ struct timespec t;
#ifdef STAT_TIMESPEC
- return STAT_TIMESPEC (st, st_mtim);
+ t = STAT_TIMESPEC (st, st_mtim);
#else
- struct timespec t;
t.tv_sec = st->st_mtime;
t.tv_nsec = get_stat_mtime_ns (st);
+#endif
+ fprintf (stderr, "%s:%d: stat_mtime=%ld.%09ld\n", file, line,
+ (long) t.tv_sec, (long) t.tv_nsec);
return t;
-#endif
}
+#define get_stat_mtime(st) get_stat_mtime (st, __FILE__, __LINE__)
+
/* Return *ST's birth time, if available; otherwise return a value
with tv_sec and tv_nsec both equal to -1. */
_GL_STAT_TIME_INLINE struct timespec
This bug report was last modified 11 years and 103 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.