From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Vincent =?UTF-8?Q?Bela=C3=AFche?= Newsgroups: gmane.emacs.bugs Subject: bug#12774: 24.2.50; EMACS 24.2.50.1 crashing Date: Sun, 04 Nov 2012 20:50:10 +0100 Message-ID: <80hap5no5p.fsf@gmail.com> References: <807gq5sxq9.fsf@gmail.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: ger.gmane.org 1352058667 24380 80.91.229.3 (4 Nov 2012 19:51:07 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 4 Nov 2012 19:51:07 +0000 (UTC) Cc: 12774@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Nov 04 20:51:16 2012 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 1TV6Dz-0006V9-Lo for geb-bug-gnu-emacs@m.gmane.org; Sun, 04 Nov 2012 20:51:15 +0100 Original-Received: from localhost ([::1]:52891 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TV6Dr-0006nT-0l for geb-bug-gnu-emacs@m.gmane.org; Sun, 04 Nov 2012 14:51:07 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:51145) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TV6Dm-0006n5-W9 for bug-gnu-emacs@gnu.org; Sun, 04 Nov 2012 14:51:04 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TV6Dl-0003ej-4g for bug-gnu-emacs@gnu.org; Sun, 04 Nov 2012 14:51:02 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:39052) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TV6Dl-0003ec-0j for bug-gnu-emacs@gnu.org; Sun, 04 Nov 2012 14:51:01 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1TV6Gf-0006lt-Uq for bug-gnu-emacs@gnu.org; Sun, 04 Nov 2012 14:54:01 -0500 X-Loop: help-debbugs@gnu.org In-Reply-To: <807gq5sxq9.fsf@gmail.com> Resent-From: Vincent =?UTF-8?Q?Bela=C3=AFche?= Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 04 Nov 2012 19:54:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 12774 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 12774-submit@debbugs.gnu.org id=B12774.135205878625952 (code B ref 12774); Sun, 04 Nov 2012 19:54:01 +0000 Original-Received: (at 12774) by debbugs.gnu.org; 4 Nov 2012 19:53:06 +0000 Original-Received: from localhost ([127.0.0.1]:49293 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TV6Fk-0006kR-Hf for submit@debbugs.gnu.org; Sun, 04 Nov 2012 14:53:05 -0500 Original-Received: from smtp08.smtpout.orange.fr ([80.12.242.130]:39680 helo=smtp.smtpout.orange.fr) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TV6Fg-0006jv-3X for 12774@debbugs.gnu.org; Sun, 04 Nov 2012 14:53:02 -0500 Original-Received: from CHOUNEK ([92.139.226.115]) by mwinf5d15 with ME id KXpw1k00C2W12xY03XpwDm; Sun, 04 Nov 2012 20:49:57 +0100 X-Antivirus: avast! (VPS 121104-0, 04/11/2012), Outbound message X-Antivirus-Status: Clean 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:66444 Archived-At: --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable > Date: Sun, 4 Nov 2012 18:44:51 +0200 > From: eliz@gnu.org > Subject: Re: bug#12774: 24.2.50; EMACS 24.2.50.1 crashing=E2=80=8F > To: vincent.b.1@hotmail.fr > CC: 12774@debbugs.gnu.org >=20 > > From: Vincent Bela=C3=AFche > > Date: Sat, 3 Nov 2012 23:24:15 +0100 > >=20 > > The crash can happen without my doing anything special previously > > except opening that attached file USING_CEDET_FROM_BZR which causes > > loading orgmode. Also it seems that it has to do with the size of my > > init.el file --- and not only to its content. >=20 > OK. Here's what I'm asking you to do. Start Emacs under GDB, like > this: >=20 > c:\Documents and Settings\Vincent>gdb C:/Programme/GNU/Emacs/bin/emacs.exe >=20 > (Note: do NOT invoke Emacs via the --exec=3D switch, since that does not > load the symbol table and other debugging info from emacs.exe.) >=20 > Once GDB shows its prompt, type these commands: >=20 > (gdb) break ralloc.c:353 > (gdb) break w32heap.c:141 > (gdb) break w32heap.c:155 > (gdb) run >=20 > Please verify that the 3 source lines where you set breakpoints are > the ones marked below: >=20 My ralloc.c is Bzr-110429 and the breakpoint line is 352 instead of 353 > ralloc.c: >=20 > if ((*real_morecore) (- excess) =3D=3D 0) > { > /* If the system didn't want that much memory back, adjust > the end of the last heap to reflect that. This can occur > if break_value is still within the original data segment. */ > >>>>>>> last_heap->end =3D (char *) last_heap->end + excess; > /* Make sure that the result of the adjustment is accurate. > It should be, for the else clause above; the other case, > which returns the entire last heap to the system, seems > unlikely to trigger this mode of failure. */ > if (last_heap->end !=3D (*real_morecore) (0)) > emacs_abort (); > } >=20 My w32heap.c is Bzr-110429, and the breakpoint lines are 194 instead of 141, and 208 instead of 155. > w32heap.c: >=20 > /* Sanity checks. */ > if ((data_region_end - size) < data_region_base) > >>>>> return NULL; >=20 > /* We can only decommit full pages, so allow for > partial deallocation [cga]. */ > new_data_region_end =3D (data_region_end - size); > new_data_region_end =3D (unsigned char *) > ((DWORD_PTR) (new_data_region_end + syspage_mask) & ~syspage_mask); > new_size =3D real_data_region_end - new_data_region_end; > real_data_region_end =3D new_data_region_end; > if (new_size > 0) > { > /* Decommit size bytes from the end of the heap. */ > if (using_dynamic_heap > && !VirtualFree (real_data_region_end, new_size, MEM_DECOMMIT)) > >>>>> return NULL; > } >=20 > If your sources are different, adjust the line numbers in the "break" > commands accordingly. >=20 > Now do whatever you usually do to get Emacs to crash, and wait for one > of the breakpoints to break (they will break before the crash, so > don't expect the abort dialog). >=20 > Then please tell which of the breakpoints on the 2 "return NULL" in > w32heap.c breaks. If it's the second one, the one after the call to > VirtualFree, please type this command: >=20 > (gdb) print w32_last-error() >=20 The break occurred in the 3rd breakpoint (second one in w32heap.c), i.e. *NOT* the one after the call to VirtualFree, but one the previous one in the same file. > (note the parentheses: they are important) and tell what it prints. >=20 > Then please type "continue", which should stop at the breakpoint in > ralloc.c, and tell what do the following commands produce: >=20 > (gdb) print last_heap->end > (gdb) print last_heap->bloc_start > (gdb) print excess > (gdb) print sbrk(0) >=20 > Also, please type "xbacktrace" and post the Lisp-level backtrace this > produces. If you don't invoke GDB from the src directory, you may > need to type "source /path/to/emacs/src/.gdbinit" to make "xbacktrace" > work. > Please find attached the log which I got. Please note the following: - at line 83 the message `Undefined command: "xbacktrace". Try "help".' occurs again because I typed RET a second time. - at line 89 `Are you sure you want to change it? (y or n) [answered Y; input not from terminal]' the answered was autnomously produced by EMACS which I am was using as a terminal --- because that makes it easier to save the log to a file and to recall past commands --- I don't know why EMACS used with `M-x shell' does not always behave well when you are asked interactive questions, but that is a completely different issue. - At line 109 I tried print w32_last-error() to see what happens, even though that is not the 2nd breakpoint (1st in w32heap.c) - At lines 111 & 112 I typed RET twice, and this is why you get the same error messages again `No symbol "w32_last" in current context.' >=20 > Thanks. All thanks are to you for your kind support. Vincent. --=-=-= Content-Type: text/plain Content-Disposition: inline; filename=gdb_log.txt c:\msys\1.0\temp>gdb C:/Programme/GNU/Emacs/bin/emacs.exe gdb C:/Programme/GNU/Emacs/bin/emacs.exe GNU gdb (GDB) 7.4 Copyright (C) 2012 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 "i686-pc-mingw32". For bug reporting instructions, please see: ... Reading symbols from C:\Programme\GNU\Emacs\bin\emacs.exe...done. (gdb) break ralloc.c:352 Breakpoint 1 at 0x1172ef9: file ralloc.c, line 352. (gdb) break w32heap.c:194 Breakpoint 2 at 0x10a4035: file w32heap.c, line 194. (gdb) break w32heap.c:208 Breakpoint 3 at 0x10a407f: file w32heap.c, line 208. (gdb) run Starting program: C:\Programme\GNU\Emacs\bin\emacs.exe [New Thread 4520.0x11d0] [New Thread 4520.0x344] [New Thread 4520.0x14b8] Breakpoint 2, sbrk (increment=-892928) at w32heap.c:200 (gdb) 200 w32heap.c: No such file or directory. continue Continuing. Breakpoint 3, sbrk (increment=-892928) at w32heap.c:211 211 in w32heap.c (gdb) continue Continuing. Breakpoint 2, sbrk (increment=-77824) at w32heap.c:200 200 in w32heap.c (gdb) continue Continuing. Breakpoint 3, sbrk (increment=-77824) at w32heap.c:211 211 in w32heap.c (gdb) continue Continuing. Breakpoint 2, sbrk (increment=-77824) at w32heap.c:200 200 in w32heap.c (gdb) continue Continuing. Breakpoint 3, sbrk (increment=-77824) at w32heap.c:211 211 in w32heap.c (gdb) continue Continuing. Breakpoint 2, sbrk (increment=-53248) at w32heap.c:200 200 in w32heap.c (gdb) continue Continuing. Breakpoint 3, sbrk (increment=-53248) at w32heap.c:211 211 in w32heap.c (gdb) continue Continuing. [New Thread 4520.0xf18] Breakpoint 2, sbrk (increment=-782336) at w32heap.c:200 200 in w32heap.c (gdb) print last_heap->end $1 = (POINTER) 0x3ea2000 (gdb) print last_heap->bloc_start $2 = (POINTER) 0x3e8c000 (gdb) print excess (gdb) No symbol "excess" in current context. (gdb) No symbol "excess" in current context. print sbrk(0) $3 = (void *) 0x3f61000 (gdb) xbacktrace (gdb) Undefined command: "xbacktrace". Try "help". (gdb) Undefined command: "xbacktrace". Try "help". print xbacktrace (gdb) No symbol "xbacktrace" in current context. source c:/Programme/GNU/installation/emacs-install/trunk.old2/src/.gdbinit Warning: c:\msys\1.0\temp/../lwlib: No such file or directory. SIGINT is used by the debugger. Are you sure you want to change it? (y or n) [answered Y; input not from terminal] DISPLAY = TERM = emacs Breakpoint 4 at 0x1001d29: file emacs.c, line 292. Temporary breakpoint 5 at 0x10c76ca: file sysdep.c, line 790. (gdb) xbacktrace "kill-buffer" (0x82e2b8) "byte-code" (0x82e3b8) "load-with-code-conversion" (0x82e610) "org-mode" (0x82ebe8) "set-auto-mode-0" (0x82ed58) "byte-code" (0x82ee68) "set-auto-mode" (0x82f070) "normal-mode" (0x82f398) "after-find-file" (0x82f518) "find-file-noselect-1" (0x82f688) "find-file-noselect" (0x82f818) "find-file" (0x82f998) "dired-find-file" (0x82fb24) "call-interactively" (0x82fc54) (gdb) print w32_last-error() (gdb) No symbol "w32_last" in current context. (gdb) No symbol "w32_last" in current context. (gdb) No symbol "w32_last" in current context. quit A debugging session is active. Inferior 1 [process 4520] will be killed. Quit anyway? (y or n) [answered Y; input not from terminal] c:\msys\1.0\temp> Process shell<2> finished --=-=-=--