GNU bug report logs - #11741
24.1; Daemon Dies When X Exits

Previous Next

Package: emacs;

Reported by: woddfellow2 <woddfellow2 <at> gmail.com>

Date: Tue, 19 Jun 2012 16:06:01 UTC

Severity: normal

Merged with 1493, 4078, 5802, 8750

Found in versions 24.0.50, 24.1

Done: Chong Yidong <cyd <at> gnu.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 11741 in the body.
You can then email your comments to 11741 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#11741; Package emacs. (Tue, 19 Jun 2012 16:06:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to woddfellow2 <woddfellow2 <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Tue, 19 Jun 2012 16:06:01 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: woddfellow2 <woddfellow2 <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 24.1; Daemon Dies When X Exits
Date: Tue, 19 Jun 2012 08:13:49 -0500
If I start an Emacs daemon, even outside of X, then open an emacsclient
frame in X, then C-x 5 0, then exit X, the daemon dies. This happens
even with emacs -Q. This appears to e a regression, as Emacs 23 did not
have this problem:

Connection lost to X server `:0'
When compiled with GTK, Emacs cannot recover from X disconnects.
This is a GTK bug: https://bugzilla.gnome.org/show_bug.cgi?id=85715
For details, see etc/PROBLEMS.

(emacs:21992): GLib-WARNING **: g_main_context_prepare() called recursively from within a source's check() or prepare() member.

(emacs:21992): GLib-WARNING **: g_main_context_check() called recursively from within a source's check() or prepare() member.
Fatal error (6)Aborted

bt full:
#0  0xb7fdd424 in __kernel_vsyscall ()
No symbol table info available.
#1  0xb6ad4596 in kill () from /lib/libc.so.6
No symbol table info available.
#2  0x08139678 in abort ()
No symbol table info available.
#3  0x080f8e28 in ?? ()
No symbol table info available.
#4  0x080f906d in ?? ()
No symbol table info available.
#5  0xb74d8fc4 in _XIOError () from /usr/lib/libX11.so.6
No symbol table info available.
#6  0xb74d681f in _XEventsQueued () from /usr/lib/libX11.so.6
No symbol table info available.
#7  0xb74c73f8 in XPending () from /usr/lib/libX11.so.6
No symbol table info available.
#8  0xb7b0c8ae in ?? () from /usr/lib/libgdk-x11-2.0.so.0
No symbol table info available.
#9  0xb777f232 in g_main_context_prepare () from
/usr/lib/libglib-2.0.so.0
No symbol table info available.
#10 0xb777f96f in ?? () from /usr/lib/libglib-2.0.so.0
No symbol table info available.
#11 0xb777fb5f in g_main_context_pending () from
/usr/lib/libglib-2.0.so.0
No symbol table info available.
#12 0xb7c99c70 in gtk_events_pending () from
/usr/lib/libgtk-x11-2.0.so.0
No symbol table info available.
#13 0x080f90d5 in ?? ()
No symbol table info available.
#14 0x08141477 in ?? ()
No symbol table info available.
#15 0x081415a2 in ?? ()
No symbol table info available.
#16 0x08140e58 in ?? ()
No symbol table info available.
#17 0x081e7e25 in ?? ()
No symbol table info available.
#18 0x0806277f in ?? ()
No symbol table info available.
#19 0x08145f7c in ?? ()
No symbol table info available.
#20 0x08146c14 in ?? ()
No symbol table info available.
#21 0x08148667 in ?? ()
No symbol table info available.
#22 0x081a9f80 in ?? ()
No symbol table info available.
#23 0x0813d435 in ?? ()
No symbol table info available.
#24 0x081a9eab in ?? ()
No symbol table info available.
#25 0x0813e08a in ?? ()
No symbol table info available.
#26 0x0813e37d in ?? ()
No symbol table info available.
#27 0x08057ea0 in ?? ()
No symbol table info available.
#28 0xb6abf3d5 in __libc_start_main () from /lib/libc.so.6
No symbol table info available.
#29 0x08058c35 in ?? ()
No symbol table info available.

It said xbacktrace wasn't a command.

In GNU Emacs 24.1.1 (i686-pc-linux-gnu, GTK+ Version 2.24.10)
 of 2012-06-11 on shirley.hoetzel.info
Configured using:
 `configure '--prefix=/usr' '--sysconfdir=/etc' '--libexecdir=/usr/lib'
 '--localstatedir=/var' '--with-x-toolkit=gtk' '--with-xft'
 'CFLAGS=-march=i686 -mtune=generic -O2 -pipe -fstack-protector
 --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2'
 'LDFLAGS=-Wl,-O1,--sort-common,--as-needed,-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.UTF-8
  value of $XMODIFIERS: nil
  locale-coding-system: utf-8-unix
  default enable-multibyte-characters: t

Major mode: Lisp Interaction

Minor modes in effect:
  erc-services-mode: t
  erc-networks-mode: t
  display-time-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
  column-number-mode: t
  line-number-mode: t
  transient-mark-mode: t

Recent input:
ESC x r e p o r t - e m a c s - g u b DEL DEL b u g 
f DEL DEL DEL DEL DEL b u g RET

Recent messages:
("emacs")
Loading /home/woddf2/.erc/config...
Loading /home/woddf2/.erc/pass...done
Loading /home/woddf2/.erc/config...done
Loading /home/woddf2/.emms-cache...done
Loading term/xterm...done
goto-history-element: Beginning of history; no preceding item

Load-path shadows:
~/.emacs.d/lisp/mediawiki hides /usr/share/emacs/site-lisp/mediawiki
/usr/share/emacs/site-lisp/flim/hex-util hides /usr/share/emacs/24.1/lisp/hex-util
/usr/share/emacs/site-lisp/flim/md4 hides /usr/share/emacs/24.1/lisp/md4
/usr/share/emacs/site-lisp/flim/sasl-ntlm hides /usr/share/emacs/24.1/lisp/net/sasl-ntlm
/usr/share/emacs/site-lisp/flim/sasl hides /usr/share/emacs/24.1/lisp/net/sasl
/usr/share/emacs/site-lisp/flim/sasl-digest hides /usr/share/emacs/24.1/lisp/net/sasl-digest
/usr/share/emacs/site-lisp/flim/hmac-md5 hides /usr/share/emacs/24.1/lisp/net/hmac-md5
/usr/share/emacs/site-lisp/flim/hmac-def hides /usr/share/emacs/24.1/lisp/net/hmac-def
/usr/share/emacs/site-lisp/flim/ntlm hides /usr/share/emacs/24.1/lisp/net/ntlm
/usr/share/emacs/site-lisp/flim/sasl-cram hides /usr/share/emacs/24.1/lisp/net/sasl-cram
/usr/share/emacs/site-lisp/wl/utf7 hides /usr/share/emacs/24.1/lisp/gnus/utf7
/usr/share/emacs/site-lisp/semi/smime hides /usr/share/emacs/24.1/lisp/gnus/smime
/usr/share/emacs/site-lisp/emms/tq hides /usr/share/emacs/24.1/lisp/emacs-lisp/tq
/usr/share/emacs/site-lisp/semi/pgg-pgp hides /usr/share/emacs/24.1/lisp/obsolete/pgg-pgp
/usr/share/emacs/site-lisp/semi/pgg-pgp5 hides /usr/share/emacs/24.1/lisp/obsolete/pgg-pgp5
/usr/share/emacs/site-lisp/semi/pgg hides /usr/share/emacs/24.1/lisp/obsolete/pgg
/usr/share/emacs/site-lisp/semi/pgg-parse hides /usr/share/emacs/24.1/lisp/obsolete/pgg-parse
/usr/share/emacs/site-lisp/semi/pgg-gpg hides /usr/share/emacs/24.1/lisp/obsolete/pgg-gpg
/usr/share/emacs/site-lisp/semi/pgg-def hides /usr/share/emacs/24.1/lisp/obsolete/pgg-def

Features:
(shadow sort mail-extr gnus-msg gnus-art mm-uu mml2015 mm-view mml-smime
smime mel mime-def alist mcharset mcs-20 mcs-e20 pces pces-e20 pces-20
broken pcustom path-util poe pym static apel-ver product gnus-sum
gnus-group gnus-undo gnus-start gnus-spec gnus-win emacsbug sendmail
preview-latex tex-site auto-loads weblogger ring xml-rpc timezone
url-http url-auth url-gw ratpoison ratpoisonrc-mode generic generic-x
fvwm-mode emms-playing-time emms-mode-line emms-cache emms-info-ogginfo
emms-info-mp3info emms-info later-do emms-playlist-mode
emms-player-mplayer emms-player-simple emms-source-playlist
emms-source-file dired regexp-opt emms-setup emms emms-compat znc
erc-services erc-networks erc-goodies erc erc-backend erc-compat
thingatpt pp warnings nnrss mm-url nnmail gnus-int gnus-range
mail-source message idna format-spec rfc822 mml easymenu mml-sec
mm-decode mm-bodies mm-encode mail-parse rfc2231 rfc2047 rfc2045
ietf-drums mailabbrev gmm-utils mailheader nnoo gnus gnus-ems nnheader
mail-utils wid-edit epa-file twittering-mode advice help-fns
advice-preload epa derived epg epg-config tls url url-proxy url-privacy
url-expand url-methods url-history url-cookie url-util url-parse
auth-source eieio byte-opt bytecomp byte-compile cconv macroexp assoc
gnus-util time-date password-cache url-vars mm-util mail-prsvr mailcap
xml cl nyan-mode easy-mmode w3m-load edmacro kmacro time tooltip
ediff-hook vc-hooks lisp-float-type mwheel x-win x-dnd tool-bar dnd
fontset image fringe lisp-mode register page menu-bar rfn-eshadow timer
select scroll-bar mouse jit-lock font-lock syntax facemenu font-core
frame cham georgian utf-8-lang misc-lang vietnamese tibetan thai
tai-viet lao korean japanese hebrew greek romanian slovak czech european
ethiopic indian cyrillic chinese case-table epa-hook jka-cmpr-hook help
simple abbrev minibuffer loaddefs button faces cus-face files
text-properties overlay sha1 md5 base64 format env code-pages mule
custom widget hashtable-print-readable backquote make-network-process
dbusbind dynamic-setting system-font-setting font-render-setting
move-toolbar gtk x-toolkit x multi-tty emacs)

-- 
woddfellow2 <http://wlair.us.to/>

()  ascii ribbon campaign - against html e-mail 
/\  www.asciiribbon.org   - against proprietary attachments




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#11741; Package emacs. (Tue, 19 Jun 2012 16:22:01 GMT) Full text and rfc822 format available.

Message #8 received at 11741 <at> debbugs.gnu.org (full text, mbox):

From: Glenn Morris <rgm <at> gnu.org>
To: woddfellow2 <woddfellow2 <at> gmail.com>
Cc: 11741 <at> debbugs.gnu.org
Subject: Re: bug#11741: 24.1; Daemon Dies When X Exits
Date: Tue, 19 Jun 2012 12:18:01 -0400
woddfellow2 wrote:

> If I start an Emacs daemon, even outside of X, then open an emacsclient
> frame in X, then C-x 5 0, then exit X, the daemon dies. This happens
> even with emacs -Q. This appears to e a regression, as Emacs 23 did not
> have this problem:
>
>   Connection lost to X server `:0'
>   When compiled with GTK, Emacs cannot recover from X disconnects.
>   This is a GTK bug: https://bugzilla.gnome.org/show_bug.cgi?id=85715
>   For details, see etc/PROBLEMS.

The above message seems pretty clear to me.

Here's what the etc/PROBLEMS entry says:

    ** When Emacs is compiled with Gtk+, closing a display kills Emacs.

    There is a long-standing bug in GTK that prevents it from recovering
    from disconnects: http://bugzilla.gnome.org/show_bug.cgi?id=85715.

    Thus, for instance, when Emacs is run as a server on a text terminal,
    and an X frame is created, and the X server for that frame crashes or
    exits unexpectedly, Emacs must exit to prevent a GTK error that would
    result in an endless loop.

    If you need Emacs to be able to recover from closing displays, compile
    it with the Lucid toolkit instead of GTK.




bug closed, send any further explanations to 11741 <at> debbugs.gnu.org and woddfellow2 <woddfellow2 <at> gmail.com> Request was from Chong Yidong <cyd <at> gnu.org> to control <at> debbugs.gnu.org. (Wed, 20 Jun 2012 17:03:02 GMT) Full text and rfc822 format available.

Merged 1493 4078 5802 8750 11741. Request was from Glenn Morris <rgm <at> gnu.org> to control <at> debbugs.gnu.org. (Wed, 20 Jun 2012 17:15:03 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Thu, 19 Jul 2012 11:24:03 GMT) Full text and rfc822 format available.

bug unarchived. Request was from Alejandro Benitez <benitezalejandrogm <at> gmail.com> to control <at> debbugs.gnu.org. (Mon, 23 Jul 2012 04:07:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#11741; Package emacs. (Mon, 23 Jul 2012 04:15:01 GMT) Full text and rfc822 format available.

Message #19 received at 11741 <at> debbugs.gnu.org (full text, mbox):

From: Alejandro Benitez <benitezalejandrogm <at> gmail.com>
To: 11741 <at> debbugs.gnu.org
Cc: Glenn Morris <rgm <at> gnu.org>, woddfellow2 <at> gmail.com
Date: Mon, 23 Jul 2012 01:08:21 -0300
Glenn Morris <rgm <at> gnu.org> writes:

> woddfellow2 wrote:
>
>> If I start an Emacs daemon, even outside of X, then open an emacsclient
>> frame in X, then C-x 5 0, then exit X, the daemon dies. This happens
>> even with emacs -Q. This appears to e a regression, as Emacs 23 did not
>> have this problem:
>>
>>   Connection lost to X server `:0'
>>   When compiled with GTK, Emacs cannot recover from X disconnects.
>>   This is a GTK bug: https://bugzilla.gnome.org/show_bug.cgi?id=85715
>>   For details, see etc/PROBLEMS.
>
> The above message seems pretty clear to me.
>
> Here's what the etc/PROBLEMS entry says:
>
>     ** When Emacs is compiled with Gtk+, closing a display kills Emacs.
>
>     There is a long-standing bug in GTK that prevents it from recovering
>     from disconnects: http://bugzilla.gnome.org/show_bug.cgi?id=85715.
>
>     Thus, for instance, when Emacs is run as a server on a text terminal,
>     and an X frame is created, and the X server for that frame crashes or
>     exits unexpectedly, Emacs must exit to prevent a GTK error that would
>     result in an endless loop.
>
>     If you need Emacs to be able to recover from closing displays, compile
>     it with the Lucid toolkit instead of GTK.

Hi,

Looks like this actually is a regression as the steps to reproduce
that described the OP are not the the same as the know problem.

1. I start an Emacs daemon, even outside of X
2. then open an emacsclient frame in X
3. then C-x 5 0
4. then exit X
5. the daemon dies

Step 3 means that the frame should be deleted before the X server for
that frame would supposedly crash or exit unexpectedly. The actual
problem is that the frame is not successfully deleted before exiting X,
although it looks like it does. Emacs 23.4.1 does delete the frame
successfully, so when I exit the X server I don't get a "there is
currently 1 client connected" message that when I get with Emacs 24.1.

I was able to reproduce this in Emacs 24.1 i686-pc-cygwin, GTK+.
Emacs 23.4.1 i686-pc-cygwin, GTK+ does not die after performing the
4 steps above.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#11741; Package emacs. (Fri, 03 Aug 2012 17:36:02 GMT) Full text and rfc822 format available.

Message #22 received at 11741 <at> debbugs.gnu.org (full text, mbox):

From: Alejandro Benitez <benitezalejandrogm <at> gmail.com>
To: 11741 <at> debbugs.gnu.org
Subject: 24.1; Daemon Dies When X Exits
Date: Fri, 3 Aug 2012 14:28:15 -0300
I'm posting this because the original message did not containt a subject.

Glenn Morris <rgm <at> gnu.org> writes:

> woddfellow2 wrote:
>
>> If I start an Emacs daemon, even outside of X, then open an emacsclient
>> frame in X, then C-x 5 0, then exit X, the daemon dies. This happens
>> even with emacs -Q. This appears to e a regression, as Emacs 23 did not
>> have this problem:
>>
>>   Connection lost to X server `:0'
>>   When compiled with GTK, Emacs cannot recover from X disconnects.
>>   This is a GTK bug: https://bugzilla.gnome.org/show_bug.cgi?id=85715
>>   For details, see etc/PROBLEMS.
>
> The above message seems pretty clear to me.
>
> Here's what the etc/PROBLEMS entry says:
>
>     ** When Emacs is compiled with Gtk+, closing a display kills Emacs.
>
>     There is a long-standing bug in GTK that prevents it from recovering
>     from disconnects: http://bugzilla.gnome.org/show_bug.cgi?id=85715.
>
>     Thus, for instance, when Emacs is run as a server on a text terminal,
>     and an X frame is created, and the X server for that frame crashes or
>     exits unexpectedly, Emacs must exit to prevent a GTK error that would
>     result in an endless loop.
>
>     If you need Emacs to be able to recover from closing displays, compile
>     it with the Lucid toolkit instead of GTK.

Hi,

Looks like this actually is a regression as the steps to reproduce
that described the OP are not the the same as the know problem.

1. I start an Emacs daemon, even outside of X
2. then open an emacsclient frame in X
3. then C-x 5 0
4. then exit X
5. the daemon dies

Step 3 means that the frame should be deleted before the X server
would supposedly crash or exit unexpectedly. The actual
problem is that the frame is not successfully deleted before exiting X,
although it looks like it does. Emacs 23.4.1 does delete the frame
successfully, so when I exit the X server I don't get a "there is
currently 1 client connected" message that when I get with Emacs 24.1.

I was able to reproduce this in Emacs 24.1 i686-pc-cygwin, GTK+.
Emacs 23.4.1 i686-pc-cygwin, GTK+ does not die after performing the
4 steps above.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#11741; Package emacs. (Mon, 20 Aug 2012 02:58:01 GMT) Full text and rfc822 format available.

Message #25 received at 11741 <at> debbugs.gnu.org (full text, mbox):

From: Alejandro Benitez <benitezalejandrogm <at> gmail.com>
To: 11741 <at> debbugs.gnu.org
Subject: 24.1; Daemon Dies When X Exits
Date: Sun, 19 Aug 2012 23:57:22 -0300
Looks like this bug is not going to be reopened, but I'd like to leave
things clear just in case:

The long-standing bug in GTK+ that prevents Emacs from recovering from
X disconnects

http://bugzilla.gnome.org/show_bug.cgi?id=85715

used *not* to get triggered by the following use case scenario in
Emacs 23.4 (GTK+ version):

1. Start an Emacs daemon, even outside of X
2. then open an emacsclient frame in X
3. then C-x 5 0
4. then exit X

But in Emacs version 24.1 the daemon started to crash in the above use
case, due to the GTK+ bug.
What I would like to stress is: The GTK+ bug used *not* to get
triggered if you were careful to follow the 4 steps above, until
version 24.1.

The last Emacs (GTK+ version) that I was able to use the daemon was
GNU Emacs 23.4.1 (i686-pc-cygwin, GTK+ Version 2.24.10) of 2012-05-16.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Mon, 17 Sep 2012 11:24:03 GMT) Full text and rfc822 format available.

This bug report was last modified 12 years and 275 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.