Subject: bug#11639: 24.0.95; Emacs daemon hangs when emacsclient was killed

From: Sanel Zukan <[email-masked]>
Date: Wed, 6 Jun 2012 14:56:58 +0200

When Emacs was run in daemon mode (emacs --daemon) and client is
connected from terminal
on it (via emacsclient), everything works as expected. However, when X
session is abruptly terminated
killing terminal application where emacsclient is run (like mrxvt or
xterm), emacs daemon is not
responsible any more.

Every further connection to it via emacsclient will hang client
itself. For now, the only solution is to
restart daemon and kill all hung clients.

On other hand, when there are no connections to daemon and X session
was killed, daemon is
working without any issues.

I'm running Emacs on Fedora 17. Below are gathered report from M-x
report-emacs-bug.

Thanks, Sanel

If Emacs crashed, and you have the Emacs process in the gdb debugger,
please include the output from the following gdb commands:
    `bt full' and `xbacktrace'.
For information about debugging Emacs, please read the file
/usr/share/emacs/24.0.95/etc/DEBUG.

In GNU Emacs 24.0.95.1 (i386-redhat-linux-gnu, GTK+ Version 2.24.10)
 of 2012-04-06 on x86-17.phx2.fedoraproject.org
Configured using:
 `configure '--build=i386-redhat-linux-gnu'
 '--host=i386-redhat-linux-gnu' '--program-prefix='
 '--disable-dependency-tracking' '--prefix=/usr' '--exec-prefix=/usr'
 '--bindir=/usr/bin' '--sbindir=/usr/sbin' '--sysconfdir=/etc'
 '--datadir=/usr/share' '--includedir=/usr/include' '--libdir=/usr/lib'
 '--libexecdir=/usr/libexec' '--localstatedir=/var'
 '--sharedstatedir=/var/lib' '--mandir=/usr/share/man'
 '--infodir=/usr/share/info' '--with-dbus' '--with-gif' '--with-jpeg'
 '--with-png' '--with-rsvg' '--with-tiff' '--with-xft' '--with-xpm'
 '--with-x-toolkit=gtk' '--with-gpm=no' '--with-wide-int'
 'build_alias=i386-redhat-linux-gnu' 'host_alias=i386-redhat-linux-gnu'
 'CFLAGS=-DMAIL_USE_LOCKF -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2
 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32
 -march=i686 -mtune=atom -fasynchronous-unwind-tables'
 'LDFLAGS=-Wl,-z,relro ''

Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: nil
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: en_US
  value of $XMODIFIERS: @im=none
  locale-coding-system: iso-latin-1-unix
  default enable-multibyte-characters: t

Major mode: Lisp Interaction

Minor modes in effect:
  evil-mode: t
  evil-local-mode: t
  global-undo-tree-mode: t
  undo-tree-mode: t
  tooltip-mode: t
  mouse-wheel-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  transient-mark-mode: t

Recent input:
ESC [ > 8 2 ; 0 . 5 . 3 ; 0 c ESC x r DEL b u g TAB
TAB DEL DEL DEL DEL DEL DEL DEL DEL DEL DEL DEL DEL
DEL DEL r e p o TAB TAB r TAB RET

Recent messages:
("emacs")
Loading /usr/share/emacs/site-lisp/site-start.d/emacs-color-theme-init.el
(source)...done
Loading /usr/share/emacs/site-lisp/site-start.d/focus-init.el (source)...done
Loading /usr/share/emacs/site-lisp/site-start.d/php-mode-init.el (source)...done
Loading /usr/share/emacs/site-lisp/site-start.d/rpm-spec-mode-init.el
(source)...done
Starting Emacs daemon.
When done with this frame, type C-x 5 0
Making completion list... [2 times]

Load-path shadows: