Subject: bug#12579: 24.1; Emacs 24.1 / 24.2 (daily) crashes

From: "Fabrice Niessen" <[email-masked]>
Date: Tue, 06 Nov 2012 10:42:37 +0100

Hello Eli,

Eli Zaretskii wrote:
>> (gdb) thread apply all backtrace
>
> This indicates you had 3 network streams that Emacs was reading from.
> Any idea which connections were those?

The "only" things I use Emacs for are:

- editing local files (found on my computer, not on a network share)
- reading and composing mails with Gnus

I'm not using W3M nor IRC nor ...

However, if process communications are seen as network streams, then some of
them could be used for talking to the "es.exe" process ("Everything", used by
Helm-for-files, as a replacement for the Unix "locate" command).

>> #10 0x0108d41e in sys_close (fd=9) at w32.c:5918
>> #11 0x011452a8 in emacs_close (fd=9) at sysdep.c:2082
>> #12 0x01029ce4 in deactivate_process (proc=117868261) at process.c:3924
>> #13 0x01022d92 in remove_process (proc=117868261) at process.c:735
>
> Same as before: Emacs waits for some subprocess to shut down.
>
> Next time, please type "xbacktrace" and show the Lisp backtrace it
> produces.  (You will need the .gdbinit file from the source
> repository, and you will need to type "source .gdbinit" before
> invoking "xbacktrace".)

I just downloaded the .gdbinit found in
http://ftp.gnu.org/gnu/emacs/emacs-24.2.tar.xz (from... 27-Aug-2012), as I
just had a similar problem (infloop when filling Helm-for-files pattern).

  QUESTION -- Is it therein I'm supposed to fetch the .gdbinit from?

However, it does not seem that I can do that as easily: this ain't compatible
with the GNU Emacs 24.2.50.1 (i386-mingw-nt5.1.2600) of 2012-10-22 on DANI-PC.

But I had to take a recently compiled Emacs from
https://www.dropbox.com/sh/7jr3vbv9tm1zod0/jPuvfrJAe8 (to be exact, the
version emacs-trunk-r110618-w32-i386.zip, on 22-Oct-2012), as there is no new
official version of Emacs for Windows since a while...

- On http://alpha.gnu.org/gnu/emacs/pretest/windows/
  Latest is from 26-Aug-2012, but STRIPPED

- On http://alpha.gnu.org/gnu/emacs/windows/
  Latest is from 17-Sep-2012, but does not contain the fixes for the often
  occurring crashes

- On ftp://ftp.gnu.org/gnu/emacs/windows/
  Latest is from 07-Oct-2012, but STRIPPED anyway

Here the trace... disappointing...

--8<---------------cut here---------------start------------->8---
$ gdb -p 6156
GNU gdb (GDB) 7.5.50.20120815-cvs (cygwin-special)
Copyright (C) 2012 Free Software Foundation, 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.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "i686-cygwin".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Attaching to process 6156
[New Thread 6156.0x5a4]
[New Thread 6156.0x2190]
[New Thread 6156.0x1ee0]
[New Thread 6156.0xef4]
[New Thread 6156.0x1028]
[New Thread 6156.0x2350]
[New Thread 6156.0x1ae0]
[New Thread 6156.0x17f8]
Reading symbols from /cygdrive/c/Program Files/Emacs-24.2/bin/emacs.exe...done.
warning: Expression is not an assignment (and might have no effect)
warning: Expression is not an assignment (and might have no effect)
Warning: /cygdrive/c/Program Files/Emacs-24.2/bin/../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]
.gdbinit:1273: Error in sourced command file:
No symbol "gdb_gctypebits" in current context.
(gdb) thread apply all backtrace

Thread 8 (Thread 6156.0x17f8):
#0  0x7c91120f in ntdll!DbgUiConnectToDbg () from /cygdrive/c/WINDOWS/system32/ntdll.dll
#1  0x7c962119 in ntdll!KiIntSystemCall () from /cygdrive/c/WINDOWS/system32/ntdll.dll
#2  0x00000005 in ?? ()
#3  0x00000004 in ?? ()
#4  0x00000001 in ?? ()
#5  0x5b05ffd0 in ?? ()
#6  0x00000000 in ?? ()

Lisp Backtrace:
(gdb) No symbol "gdb_use_union" in current context.

Thread 8 (Thread 6156.0x17f8):
#0  0x7c91120f in ntdll!DbgUiConnectToDbg () from /cygdrive/c/WINDOWS/system32/ntdll.dll
#1  0x7c962119 in ntdll!KiIntSystemCall () from /cygdrive/c/WINDOWS/system32/ntdll.dll
#2  0x00000005 in ?? ()
#3  0x00000004 in ?? ()
#4  0x00000001 in ?? ()
#5  0x5b05ffd0 in ?? ()
#6  0x00000000 in ?? ()

Lisp Backtrace:
(gdb) No symbol "gdb_use_union" in current context.
xbacktrace
(gdb) No symbol "gdb_use_union" in current context.

(gdb) No symbol "gdb_use_union" in current context.
q
A debugging session is active.

        Inferior 1 [process 6156] will be detached.

Quit anyway? (y or n) y
error return /netrel/src/gdb-7.5.50-1/gdb/windows-nat.c:1392 was 31
Quitting: Can't detach process 6156 (error 5)
--8<---------------cut here---------------end--------------->8---

>> I don't understand the 2 screen processes (I just see 1), but that must
>> explain the 2 zsh processes...
>
> I don't understand even the single screen.exe: what does that do?

GNU screen is a terminal multiplexer: it's like having multiple "zsh" windows
open, but there are here seen as kind of tabs. You have on screen process and
switch between different terminal windows.

It's a bit like StumpWM, if you know it, but for shell windows.

Best regards,
Fabrice Niessen