From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Paul Eggert Newsgroups: gmane.emacs.bugs Subject: bug#13149: 24.3.50; Emacs thinks file was changed outside Emacs, but it was not Date: Fri, 18 Jan 2013 16:55:29 -0800 Organization: UCLA Computer Science Department Message-ID: <50F9EF01.5000703@cs.ucla.edu> References: <6CDE13E3BCAA4AFAAB8BCE105C6ABF12@us.oracle.com> <874njs19zb.fsf@yandex.ru> <50F3935A.2090003@yandex.ru> <50F41CE7.60306@gmail.com> <50F44E6B.8090007@cs.ucla.edu> <50F484CB.6010905@gmail.com> <50F4FB0B.5070003@cs.ucla.edu> <50F5192B.602@yandex.ru> <50F5928A.9010009@cs.ucla.edu> <50F5CC3D.5090802@yandex.ru> <50F5CE65.9030002@cs.ucla.edu> <50F5D3F5.6050604@yandex.ru> <50F5DA58.3020404@cs.ucla.edu> <50F5E1C1.2040301@yandex.ru> <50F5E9DB.1030309@gmail.com> <50F64149.6010704@cs.ucla.edu> <50F7D358.9030100@gmail.com> <50F86E12.3040707@cs.ucla.edu> <50F8D150.8030200@gmail.com> <50F8D731.5020001@cs.ucla.edu> <50F8D93B.1040901@yandex.ru> <50F8DCCB.1030602@cs.ucla.edu> <83a9s67wlr.fsf@gnu.org> <50F9C009.9060708@cs.ucla.edu> <50F9D213.3070901@yandex.ru> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1358556980 22798 80.91.229.3 (19 Jan 2013 00:56:20 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 19 Jan 2013 00:56:20 +0000 (UTC) Cc: 13149@debbugs.gnu.org To: Dmitry Gutov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Jan 19 01:56:39 2013 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1TwMjc-0006VE-Sy for geb-bug-gnu-emacs@m.gmane.org; Sat, 19 Jan 2013 01:56:37 +0100 Original-Received: from localhost ([::1]:57304 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TwMjM-0007jW-3s for geb-bug-gnu-emacs@m.gmane.org; Fri, 18 Jan 2013 19:56:20 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:50421) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TwMjH-0007jR-Q0 for bug-gnu-emacs@gnu.org; Fri, 18 Jan 2013 19:56:19 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TwMjG-0001RW-K3 for bug-gnu-emacs@gnu.org; Fri, 18 Jan 2013 19:56:15 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:33845) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TwMjG-0001RQ-H6 for bug-gnu-emacs@gnu.org; Fri, 18 Jan 2013 19:56:14 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1TwMk2-0003gd-F4 for bug-gnu-emacs@gnu.org; Fri, 18 Jan 2013 19:57:03 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Paul Eggert Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 19 Jan 2013 00:57:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 13149 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: unreproducible moreinfo Original-Received: via spool by 13149-submit@debbugs.gnu.org id=B13149.135855698914128 (code B ref 13149); Sat, 19 Jan 2013 00:57:02 +0000 Original-Received: (at 13149) by debbugs.gnu.org; 19 Jan 2013 00:56:29 +0000 Original-Received: from localhost ([127.0.0.1]:39309 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TwMjV-0003fp-B9 for submit@debbugs.gnu.org; Fri, 18 Jan 2013 19:56:29 -0500 Original-Received: from smtp.cs.ucla.edu ([131.179.128.62]:54028) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TwMjR-0003fe-Ae for 13149@debbugs.gnu.org; Fri, 18 Jan 2013 19:56:27 -0500 Original-Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp.cs.ucla.edu (Postfix) with ESMTP id DE0CF39E810E; Fri, 18 Jan 2013 16:55:34 -0800 (PST) X-Virus-Scanned: amavisd-new at smtp.cs.ucla.edu Original-Received: from smtp.cs.ucla.edu ([127.0.0.1]) by localhost (smtp.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id zmBMs1DBPN8X; Fri, 18 Jan 2013 16:55:34 -0800 (PST) Original-Received: from [192.168.1.9] (pool-71-189-154-249.lsanca.fios.verizon.net [71.189.154.249]) by smtp.cs.ucla.edu (Postfix) with ESMTPSA id 6016039E8106; Fri, 18 Jan 2013 16:55:34 -0800 (PST) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130106 Thunderbird/17.0.2 In-Reply-To: <50F9D213.3070901@yandex.ru> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:70006 Archived-At: On 01/18/2013 02:52 PM, Dmitry Gutov wrote: > Is is possible that the test is measuring something not directly relevant? > Like I mentioned, emacs-24 build seems to work fine on cifs in all observable respects I suspect the problem is that cifs mishandles fstat but works with stat/lstat. What does the following program do for you? #include #include #include #include #include static int report_times (int fd, char const *file) { struct stat fst, lst, st; if (0 <= fd && fstat (fd, &fst) != 0) return perror ("fstat"), -1; if (lstat (file, &lst) != 0) return perror ("lstat"), -1; if (stat (file, &st) != 0) return perror ("stat"), -1; if (0 <= fd) printf ("%ld.%09ld fstat\n", (long) fst.st_mtim.tv_sec, fst.st_mtim.tv_nsec); printf ("%ld.%09ld lstat\n", (long) lst.st_mtim.tv_sec, lst.st_mtim.tv_nsec); printf ("%ld.%09ld stat\n", (long) st.st_mtim.tv_sec, st.st_mtim.tv_nsec); printf ("\n"); return 0; } int main (void) { static char const file[] = "foo"; struct timespec interval; int fd; unlink (file); fd = open (file, O_CREAT | O_WRONLY, -1); if (fd < 0) return perror ("open O_CREAT"), 1; if (report_times (fd, file) != 0) return 1; interval.tv_sec = 0; interval.tv_nsec = 10000000; if (nanosleep (&interval, 0) != 0) return perror ("nanosleep"), 1; if (write (fd, file, sizeof file - 1) != sizeof file - 1) return perror ("write"), 1; if (report_times (fd, file) != 0) return 1; if (close (fd) != 0) return perror ("close"), 1; if (report_times (-1, file) != 0) return 1; fd = open (file, O_RDONLY, 0); if (fd < 0) return perror ("open O_RDONLY"), 1; if (report_times (fd, file) != 0) return 1; return 0; } It should output something like this: 1358556859.329948949 fstat 1358556859.329948949 lstat 1358556859.329948949 stat 1358556859.341948950 fstat 1358556859.341948950 lstat 1358556859.341948950 stat 1358556859.341948950 lstat 1358556859.341948950 stat 1358556859.341948950 fstat 1358556859.341948950 lstat 1358556859.341948950 stat That is, the first batch of times should differ from the other batches, all of which should be the same.