From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Bertrand Brelier Newsgroups: gmane.emacs.bugs Subject: bug#19607: issue with Emacs 24.4.1 but not with 24.3.1 : changed on disk; really edit the buffer Date: Thu, 22 Jan 2015 09:16:26 -0500 Message-ID: References: <54BE224E.80406@cs.ucla.edu> <54BEF122.60700@cs.ucla.edu> <54C05E6B.3070106@cs.ucla.edu> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001a113cf2b448f8f2050d3e5168 X-Trace: ger.gmane.org 1421936243 5597 80.91.229.3 (22 Jan 2015 14:17:23 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 22 Jan 2015 14:17:23 +0000 (UTC) Cc: 19607@debbugs.gnu.org To: Paul Eggert Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Jan 22 15:17:22 2015 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 1YEIZV-0007iX-7m for geb-bug-gnu-emacs@m.gmane.org; Thu, 22 Jan 2015 15:17:21 +0100 Original-Received: from localhost ([::1]:53482 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YEIZP-0008Uh-M4 for geb-bug-gnu-emacs@m.gmane.org; Thu, 22 Jan 2015 09:17:15 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:36223) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YEIZH-0008UR-FU for bug-gnu-emacs@gnu.org; Thu, 22 Jan 2015 09:17:11 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YEIZD-00064X-1T for bug-gnu-emacs@gnu.org; Thu, 22 Jan 2015 09:17:07 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:33801) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YEIZC-00064S-Tg for bug-gnu-emacs@gnu.org; Thu, 22 Jan 2015 09:17:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1YEIZC-0006LK-FL for bug-gnu-emacs@gnu.org; Thu, 22 Jan 2015 09:17:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Bertrand Brelier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 22 Jan 2015 14:17:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 19607 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 19607-submit@debbugs.gnu.org id=B19607.142193619524343 (code B ref 19607); Thu, 22 Jan 2015 14:17:02 +0000 Original-Received: (at 19607) by debbugs.gnu.org; 22 Jan 2015 14:16:35 +0000 Original-Received: from localhost ([127.0.0.1]:52493 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YEIYk-0006KY-Eo for submit@debbugs.gnu.org; Thu, 22 Jan 2015 09:16:35 -0500 Original-Received: from mail-ob0-f170.google.com ([209.85.214.170]:43857) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YEIYi-0006KG-67 for 19607@debbugs.gnu.org; Thu, 22 Jan 2015 09:16:33 -0500 Original-Received: by mail-ob0-f170.google.com with SMTP id wp4so1587494obc.1 for <19607@debbugs.gnu.org>; Thu, 22 Jan 2015 06:16:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=4kNlWMSWErz+b7YaWTLUlBUAItp/4E+x2IKvmM3ukDM=; b=IekK6SapzPfd7jeXRHoyMMmgyg6yEB9GIHOOvXTcPLhb8tJ+pEU65hwRwObVpAh1FK e0TBry+y+NvoVEbhzWNazI3+ZudG5z3NVt8Nws/Xu5BKmJa4f4/lI50U64QOaeEhcsxZ 9GWfH29y8f6NvzOlz6IDocGHo6iCwC/nhdibm89PxCVt50Y2bnmp5ILDb5S/3EJIy8eI vvVNFd/a/KYldMUWn6GCNtXtPFnew1F0nU0gAd8UyoZWTgkg7Ch1KR3imi9oL3fAvwF7 hy/gqqCO/P0D+svYsT9U2I225ysuJ4Zd3symulvI3ypN3/RolAt8xTHYqqz8/sWeW/qs MXjA== X-Received: by 10.202.172.197 with SMTP id v188mr1010575oie.48.1421936186422; Thu, 22 Jan 2015 06:16:26 -0800 (PST) Original-Received: by 10.202.98.136 with HTTP; Thu, 22 Jan 2015 06:16:26 -0800 (PST) In-Reply-To: <54C05E6B.3070106@cs.ucla.edu> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.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:98581 Archived-At: --001a113cf2b448f8f2050d3e5168 Content-Type: text/plain; charset=UTF-8 Hello Paul, I followed the steps but as soon as I try to edit the file when using gdb, the emacs windows freezes and I cannot do anything (I tried to open a local file, not on the network, with no encryption). Here is what I did : pwd /home/bertrand/Emacs/emacs-24.4/src gdb ./emacs GNU gdb (Ubuntu 7.7.1-0ubuntu5~14.04.2) 7.7.1 Copyright (C) 2014 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "x86_64-linux-gnu". Type "show configuration" for configuration details. For bug reporting instructions, please see: . Find the GDB manual and other documentation resources online at: . For help, type "help". Type "apropos word" to search for commands related to "word"... Reading symbols from ./emacs...done. warning: File "/home/bertrand/Emacs/emacs-24.4/src/.gdbinit" auto-loading has been declined by your `auto-load safe-path' set to "$debugdir:$datadir/auto-load". To enable execution of this file add add-auto-load-safe-path /home/bertrand/Emacs/emacs-24.4/src/.gdbinit line to your configuration file "/home/bertrand/.gdbinit". To completely disable this security protection add set auto-load safe-path / line to your configuration file "/home/bertrand/.gdbinit". For more information about this security protection see the "Auto-loading safe path" section in the GDB manual. E.g., run from the shell: info "(gdb)Auto-loading safe path" (gdb) source .gdbinit SIGINT is used by the debugger. Are you sure you want to change it? (y or n) [answered Y; input not from terminal] DISPLAY = localhost:10.0 TERM = xterm Breakpoint 1 at 0x5432ba: file emacs.c, line 351. Temporary breakpoint 2 at 0x56507f: file sysdep.c, line 850. (gdb) b fileio.c:5338 Breakpoint 3 at 0x58e027: file fileio.c, line 5338. (gdb) r Starting program: /home/bertrand/Emacs/emacs-24.4/src/emacs [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1". [New Thread 0x7fffea11c700 (LWP 2263)] ** (emacs:2259): WARNING **: Couldn't connect to accessibility bus: Failed to connect to socket /tmp/dbus-eho0AgRKqo: Connection refused [New Thread 0x7fffe928d700 (LWP 2265)] [New Thread 0x7fffe8a8c700 (LWP 2267)] [New Thread 0x7fffd80a7700 (LWP 2268)] [New Thread 0x7fffd78a6700 (LWP 2269)] [Thread 0x7fffd78a6700 (LWP 2269) exited] [New Thread 0x7fffd78a6700 (LWP 2270)] [Thread 0x7fffd80a7700 (LWP 2268) exited] [New Thread 0x7fffd80a7700 (LWP 2272)] [Thread 0x7fffd78a6700 (LWP 2270) exited] Breakpoint 3, Fverify_visited_file_modtime (buf=29001941) at fileio.c:5338 5338 if (timespec_cmp (mtime, b->modtime) == 0 (gdb) (gdb) quit A debugging session is active. Inferior 1 [process 2259] will be killed. Quit anyway? (y or n) y I had to quit the gdb session as the emacs windows froze (repeated the procedure 3 times and it froze each time). I thought the problem could come from the bus warning but without gdb I have the same warning but no issue to edit the same file : ./emacs ** (emacs:2275): WARNING **: Couldn't connect to accessibility bus: Failed to connect to socket /tmp/dbus-eho0AgRKqo: Connection refused Any suggestions ? Thank you for your help, Cheers, Bertrand On Wed, Jan 21, 2015 at 9:20 PM, Paul Eggert wrote: > Sorry, I'm still having trouble seeing what the bug is. strace doesn't > output full time stamps; it tells us their values only to the nearest > second. > Can you run Emacs under a debugger? Here's a recipe, if you have the time: > > $ wget ftp://ftp.gnu.org/gnu/emacs/emacs-24.4.tar.xz > $ tar xf emacs-24.4.tar.xz > $ cd emacs-24.4 > $ ./configure CFLAGS='-g3 -O0' > $ make > $ cd src > $ gdb emacs > (gdb) source .gdbinit > (gdb) b fileio.c:5338 > (gdb) r > [ Now edit the file in Emacs, until the breakpoint is hit. ] > (gdb) p mtime > (gdb) p b->modtime > > I just now tried all that and got: > > (gdb) p mtime > $5 = { > tv_sec = 1421893112, > tv_nsec = 705816459 > } > (gdb) p b->modtime > $6 = { > tv_sec = 1421893112, > tv_nsec = 705816459 > } > > which is what I'd expect: the last-modified time of the file (mtime) > equals the buffer's opinion of it (b->modtime). What do you get? > --001a113cf2b448f8f2050d3e5168 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Hello Paul,

I followed the step= s but as soon as I try to edit the file when using gdb, the emacs windows f= reezes and I cannot do anything (I tried to open a local file, not on the n= etwork, with no encryption).

Here is what I did :
pw= d
/home/bertrand/Emacs/emacs-24.4/src

gdb ./emacs
GNU gdb (Ubu= ntu 7.7.1-0ubuntu5~14.04.2) 7.7.1
Copyright (C) 2014 Free Software Found= ation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>This is free software: you are free to change and redistribute it.
Ther= e is NO WARRANTY, to the extent permitted by law.=C2=A0 Type "show cop= ying"
and "show warranty" for details.
This GDB was co= nfigured as "x86_64-linux-gnu".
Type "show configuration&= quot; for configuration details.
For bug reporting instructions, please = see:
<http://www.gn= u.org/software/gdb/bugs/>.
Find the GDB manual and other document= ation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.For help, type "help".
Type "apropos word" to sear= ch for commands related to "word"...
Reading symbols from ./em= acs...done.
warning: File "/home/bertrand/Emacs/emacs-24.4/src/.gdb= init" auto-loading has been declined by your `auto-load safe-path'= set to "$debugdir:$datadir/auto-load".
To enable execution of= this file add
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 add-auto-load-= safe-path /home/bertrand/Emacs/emacs-24.4/src/.gdbinit
line to your conf= iguration file "/home/bertrand/.gdbinit".
To completely disabl= e this security protection add
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0 set auto-load safe-path /
line to your configuration file "/hom= e/bertrand/.gdbinit".
For more information about this security prot= ection see the
"Auto-loading safe path" section in the GDB man= ual.=C2=A0 E.g., run from the shell:
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0 info "(gdb)Auto-loading safe path"
(gdb) source .gdb= init
SIGINT is used by the debugger.
Are you sure you want to change = it? (y or n) [answered Y; input not from terminal]
DISPLAY =3D localhost= :10.0
TERM =3D xterm
Breakpoint 1 at 0x5432ba: file emacs.c, line 351= .
Temporary breakpoint 2 at 0x56507f: file sysdep.c, line 850.
(gdb) = b fileio.c:5338
Breakpoint 3 at 0x58e027: file fileio.c, line 5338.
(= gdb) r
Starting program: /home/bertrand/Emacs/emacs-24.4/src/emacs
[= Thread debugging using libthread_db enabled]
Using host libthread_db lib= rary "/lib/x86_64-linux-gnu/libthread_db.so.1".
[New Thread 0x= 7fffea11c700 (LWP 2263)]

** (emacs:2259): WARNING **: Couldn't c= onnect to accessibility bus: Failed to connect to socket /tmp/dbus-eho0AgRK= qo: Connection refused
[New Thread 0x7fffe928d700 (LWP 2265)]
[New Th= read 0x7fffe8a8c700 (LWP 2267)]
[New Thread 0x7fffd80a7700 (LWP 2268)][New Thread 0x7fffd78a6700 (LWP 2269)]
[Thread 0x7fffd78a6700 (LWP 226= 9) exited]
[New Thread 0x7fffd78a6700 (LWP 2270)]
[Thread 0x7fffd80a7= 700 (LWP 2268) exited]
[New Thread 0x7fffd80a7700 (LWP 2272)]
[Thread= 0x7fffd78a6700 (LWP 2270) exited]

Breakpoint 3, Fverify_visited_fil= e_modtime (buf=3D29001941) at fileio.c:5338
5338=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0 if (timespec_cmp (mtime, b->modtime) =3D=3D 0
(gdb)
(gdb) = quit
A debugging session is active.

=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0 Inferior 1 [process 2259] will be killed.

Quit anywa= y? (y or n) y


I had to quit the gdb session as the emacs w= indows froze (repeated the procedure 3 times and it froze each time).
I thought the problem could come from the bus warning but without g= db I have the same warning but no issue to edit the same file :
./emacs<= br>
** (emacs:2275): WARNING **: Couldn't connect to accessibility b= us: Failed to connect to socket /tmp/dbus-eho0AgRKqo: Connection refused
Any suggestions ?

Thank you for your help,=

Cheers,

Bertrand


On Wed, Jan 2= 1, 2015 at 9:20 PM, Paul Eggert <eggert@cs.ucla.edu> wrote:=
Sorry, I'm still having trouble seei= ng what the bug is. strace doesn't output full time stamps; it tells us= their values only to the nearest second.
Can you run Emacs under a debugger?=C2=A0 Here's a recipe, if you have = the time:

$ wget ftp://ftp.gnu.org/gnu/emacs/emacs-24.4.tar.xz
$ tar xf emacs-24.4.tar.xz
$ cd emacs-24.4
$ ./configure CFLAGS=3D'-g3 -O0'
$ make
$ cd src
$ gdb emacs
(gdb) source .gdbinit
(gdb) b fileio.c:5338
(gdb) r
[ Now edit the file in Emacs, until the breakpoint is hit. ]
(gdb) p mtime
(gdb) p b->modtime

I just now tried all that and got:

(gdb) p mtime
$5 =3D {
=C2=A0 tv_sec =3D 1421893112,
=C2=A0 tv_nsec =3D 705816459
}
(gdb) p b->modtime
$6 =3D {
=C2=A0 tv_sec =3D 1421893112,
=C2=A0 tv_nsec =3D 705816459
}

which is what I'd expect: the last-modified time of the file (mtime) eq= uals the buffer's opinion of it (b->modtime). What do you get?

--001a113cf2b448f8f2050d3e5168--