This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Emacs 64-bit ahead of its time: clock skew


Hi,

once in a while make complains that some of my files have timestamps in the future. I've investigated a little, and it seems that this affecs only files which I save from Emacs. The following script reproduces the problem (run it in an empty directory, especially sample.txt must not exist):

#!/bin/sh
emacs -batch sample.txt -f save-buffer
touch sample2.txt
date
ls -al --full-time
uname -a

The emacs command simply creates an empty buffer and writes it to disk. This is comparable to what touch does if the file does not exist.
I get the following output:

$ ./clockskewtest.sh
Wrote /home/markus.hoenicka/workspace/emacs-bug/20140731clockskew/sample.txt
Thu, Jul 31, 2014  2:21:06 PM
total 18
drwxr-xr-x+ 1 markus.hoenicka DomÃnen-Benutzer 0 2014-07-31 14:21:34.333524000 +0200 . drwxr-xr-x+ 1 markus.hoenicka DomÃnen-Benutzer 0 2014-07-31 14:15:24.354636000 +0200 .. -rwxr--r--+ 1 markus.hoenicka DomÃnen-Benutzer 101 2014-07-31 14:21:25.918416000 +0200 clockskewtest.sh -rwxr--r--+ 1 markus.hoenicka DomÃnen-Benutzer 92 2014-07-31 14:18:39.592771000 +0200 clockskewtest.sh~ -rw-r--r--+ 1 markus.hoenicka DomÃnen-Benutzer 0 2014-07-31 14:21:34.265547000 +0200 sample.txt -rw-r--r--+ 1 markus.hoenicka DomÃnen-Benutzer 0 2014-07-31 14:21:06.315410800 +0200 sample2.txt
CYGWIN_NT-6.1 SBHC123 1.7.31s(0.273/5/3) 20140709 12:14:54 x86_64 Cygwin

Please note that the file created by Emacs is about 28 seconds in the future. These 28 s seem to be reproducible in consecutive runs of this script. I wonder if this is related in some way to the random and quite rare crashes which I reported previously, see this thread:

https://groups.google.com/forum/#!topic/gnu.emacs.bug/cR3wgNDxVzA

In many of those backtraces references to some function run_timers() in atime.c pop up. Just wondering.

regards,
Markus

--
Markus Hoenicka
http://www.mhoenicka.de
AQ score 38


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]