From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Nix Newsgroups: gmane.emacs.bugs Subject: bug#8750: 24.0.50; Crash in daemon mode when display goes away Date: Sat, 28 May 2011 11:40:48 +0100 Message-ID: <877h9bp0pb.fsf@spindle.srvr.nix> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1306579337 10591 80.91.229.12 (28 May 2011 10:42:17 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sat, 28 May 2011 10:42:17 +0000 (UTC) To: 8750@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat May 28 12:42:12 2011 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1QQGy9-0005tp-Vc for geb-bug-gnu-emacs@m.gmane.org; Sat, 28 May 2011 12:42:10 +0200 Original-Received: from localhost ([::1]:39773 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QQGy9-0005QU-K7 for geb-bug-gnu-emacs@m.gmane.org; Sat, 28 May 2011 06:42:09 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:33616) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QQGy4-0005QD-SN for bug-gnu-emacs@gnu.org; Sat, 28 May 2011 06:42:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QQGy3-0002ev-8c for bug-gnu-emacs@gnu.org; Sat, 28 May 2011 06:42:04 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:39075) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QQGy3-0002er-2w for bug-gnu-emacs@gnu.org; Sat, 28 May 2011 06:42:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1QQGy2-0003NX-B1; Sat, 28 May 2011 06:42:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Nix Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 28 May 2011 10:42:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 8750 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.130657926712923 (code B ref -1); Sat, 28 May 2011 10:42:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 28 May 2011 10:41:07 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QQGx7-0003MN-GR for submit@debbugs.gnu.org; Sat, 28 May 2011 06:41:06 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QQGx4-0003Lu-He for submit@debbugs.gnu.org; Sat, 28 May 2011 06:41:04 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QQGwx-0002YC-Q2 for submit@debbugs.gnu.org; Sat, 28 May 2011 06:40:57 -0400 Original-Received: from lists.gnu.org ([140.186.70.17]:48253) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QQGwx-0002Y8-OP for submit@debbugs.gnu.org; Sat, 28 May 2011 06:40:55 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:33351) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QQGww-0005Me-2o for bug-gnu-emacs@gnu.org; Sat, 28 May 2011 06:40:55 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QQGwt-0002XK-JG for bug-gnu-emacs@gnu.org; Sat, 28 May 2011 06:40:54 -0400 Original-Received: from icebox.esperi.org.uk ([81.187.191.129]:40426 helo=mail.esperi.org.uk) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QQGws-0002Wn-So for bug-gnu-emacs@gnu.org; Sat, 28 May 2011 06:40:51 -0400 Original-Received: from esperi.org.uk (nix@spindle.srvr.nix [192.168.14.15]) by mail.esperi.org.uk (8.14.4/8.14.3) with ESMTP id p4SAemaP011433 for ; Sat, 28 May 2011 11:40:48 +0100 Original-Received: (from nix@localhost) by esperi.org.uk (8.14.4/8.12.11/Submit) id p4SAemli002983; Sat, 28 May 2011 11:40:48 +0100 Emacs: ballast for RAM. User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) X-DCC-dcc1.aftenposten.no-Metrics: spindle 1215; Body=1 Fuz1=1 Fuz2=1 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Sat, 28 May 2011 06:42:02 -0400 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) 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:46749 Archived-At: I suspend my desktop box every night, to save power. My Emacs runs on a remote system in --daemon mode, and is never shut down. $DISPLAY on that system points directly to the desktop box: this is sometimes suspended, so the TCP/IP connection cannot be assumed to stay up. (Nonetheless, if it goes away, if it is re-established, the X session will be exactly as it was.) When this happens, Emacs's X error handler kicks in and kills it: #0 0x00007f3f639ea357 in kill () from /lib/libc.so.6 #1 0x00000000004fc26f in fatal_error_signal (sig=) at emacs.c:342 #2 #3 0x00007f3f639ea357 in kill () from /lib/libc.so.6 #4 0x00000000004fba85 in abort () at emacs.c:371 #5 0x0000000000446595 in redisplay_internal () at xdisp.c:11511 #6 0x0000000000446ab3 in redisplay_preserve_echo_area (from_where=) at xdisp.c:12163 #7 0x00000000005b2707 in Fdelete_process (process=71306213) at process.c:779 #8 0x00000000005b5b7d in kill_buffer_processes (buffer=11868546) at process.c:7003 #9 0x00000000004fbffa in shut_down_emacs (sig=0, no_x=, stuff=11868546) at emacs.c:2040 #10 0x00000000004b9489 in x_connection_closed (dpy=, error_message=) at xterm.c:7758 #11 0x00000000004b96b5 in x_io_error_quitter (display=0xde1ff0) at xterm.c:7866 #12 0x00007f3f6619346e in _XIOError (dpy=0xde1ff0) at XlibInt.c:1602 #13 0x00007f3f6619190e in _XReply (dpy=0xde1ff0, rep=0x7ffff7e82500, extra=, discard=) at xcb_io.c:632 #14 0x00007f3f661867a3 in XQueryColors (dpy=0xde1ff0, cmap=2, defs=0x7ffff7e825d0, ncolors=2) at QuColors.c:55 #15 0x00000000005d380c in xftfont_get_colors (f=0xfcc6f0, face=0xf0050d0, gc=, xftface_info=0x0, fg=0xd495c20, bg=0xd495c30) at xftfont.c:121 #16 0x00000000005d41e9 in xftfont_prepare_face (f=0xfcc6f0, face=0xf0050d0) at xftfont.c:533 #17 0x00000000004b1112 in prepare_face_for_display (f=0xfcc6f0, face=0xf0050d0) at xfaces.c:4165 #18 0x000000000042e14c in get_glyph_face_and_encoding (s=0x7ffff7e82960, face_id=12, start=, end=, overlaps=) at xdisp.c:20536 #19 fill_glyph_string (s=0x7ffff7e82960, face_id=12, start=, end=, overlaps=) at xdisp.c:20744 #20 0x000000000044d70f in draw_glyphs (w=0xfcc980, x=103, row=, area=TEXT_AREA, start=0, end=259, hl=DRAW_NORMAL_TEXT, overlaps=0) at xdisp.c:21359 #21 0x000000000045343d in x_write_glyphs (start=, len=259) at xdisp.c:23101 #22 0x000000000041706a in update_text_area (w=0xfcc980, vpos=100, mouse_face_overwritten_p=0x7ffff7e8310c) at dispnew.c:3808 #23 update_window_line (w=0xfcc980, vpos=100, mouse_face_overwritten_p=0x7ffff7e8310c) at dispnew.c:4049 #24 0x0000000000418b01 in update_window (w=0xfcc980, force_p=0) at dispnew.c:3611 #25 0x0000000000419c03 in update_window_tree (w=0xfcc980, force_p=0) at dispnew.c:3369 #26 0x000000000041ce56 in update_frame (f=0xfcc6f0, force_p=0, inhibit_hairy_id_p=0) at dispnew.c:3296 #27 0x0000000000445a01 in redisplay_internal () at xdisp.c:11949 #28 0x0000000000446ab3 in redisplay_preserve_echo_area (from_where=) at xdisp.c:12163 #29 0x0000000000507f90 in detect_input_pending_run_timers (do_display=1) at keyboard.c:10442 #30 0x00000000005b0b0e in wait_reading_process_output (time_limit=0, microsecs=0, read_kbd=, do_display=1, wait_for_cell=11868546, wait_proc=0x0, just_wait_proc=0) at process.c:4618 #31 0x0000000000508f8e in kbd_buffer_get_event (commandflag=1, nmaps=9, maps=0x7ffff7e853a0, prev_event=11868546, used_mouse_menu=0x7ffff7e855bc, end_time=0x0) at keyboard.c:3840 #32 read_char (commandflag=1, nmaps=9, maps=0x7ffff7e853a0, prev_event=11868546, used_mouse_menu=0x7ffff7e855bc, end_time=0x0) at keyboard.c:2786 #33 0x000000000050aefe in read_key_sequence (keybuf=0x7ffff7e85620, prompt=11868546, dont_downcase_last=0, can_return_switch_frame=1, fix_current_buffer=1, bufsize=30) at keyboard.c:9272 #34 0x000000000050cafb in command_loop_1 () at keyboard.c:1445 #35 0x00000000005709ae in internal_condition_case (bfun=0x50c920 , handlers=11920930, hfun=0x5020b0 ) at eval.c:1507 #36 0x0000000000500d6e in command_loop_2 (ignore=) at keyboard.c:1156 #37 0x0000000000570888 in internal_catch (tag=Cannot access memory at address 0x6dfc ) at eval.c:1261 #38 0x0000000000501b6a in command_loop () at keyboard.c:1135 #39 recursive_edit_1 () at keyboard.c:756 #40 0x0000000000501ea6 in Frecursive_edit () at keyboard.c:820 #41 0x00000000004fcd95 in main (argc=, argv=0x7ffff7e85e88) at emacs.c:1686 This seems an excessive reaction to the X connection going away, particularly in --daemon mode, where it might have a dozen connections to different X displays. At suspension time I have closed all the frames anyway, so what's it doing in read_key_sequence()? What frame is it updating? It shouldn't have any left! (If this is impossible, can anyone suggest a way to keep Emacs running while the X server is down? I've tried xpra, but its keyboard handling is too broken :( ) In GNU Emacs 24.0.50.2 (x86_64-unknown-linux-gnu, GTK+ Version 2.18.8) of 2011-05-26 on spindle Windowing system distributor `The X.Org Foundation', version 11.0.10903902 configured using `configure '--without-pop' '--without-kerberos' '--without-hesiod' '--without-mmdf' '--with-x-toolkit=gtk' 'NO_FAST_MATH=t'' Important settings: value of $LC_ALL: nil value of $LC_COLLATE: C 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_GB.UTF-8 value of $XMODIFIERS: nil locale-coding-system: utf-8-unix default enable-multibyte-characters: t Major mode: Group Minor modes in effect: gnus-topic-mode: t gnus-undo-mode: t iswitchb-mode: t show-paren-mode: t global-cwarn-mode: t global-semanticdb-minor-mode: t global-semantic-idle-completions-mode: t global-semantic-idle-scheduler-mode: t compile-bookmarks-mode: t semantic-mode: t type-break-mode-line-message-mode: t icomplete-mode: t recentf-mode: t mv-shell-mode: t which-function-mode: t desktop-save-mode: t display-time-mode: t tooltip-mode: t mouse-wheel-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t column-number-mode: t line-number-mode: t Recent input: i n i m e C-s C-s C-s C-s C-s C-s C-a C-s n n i m a p C-s C-s C-a C-x k C-x C-f d o g o n u m a i C-s C-s C-s C-a C-s n n i m a p C-s C-s C-s C-s C-s C-s C-s C-s C-s C-s C-s C-s C-s C-s C-s C-s C-s C-s C-s C-s C-s C-s C-s C-s C-s C-s C-s C-s C-s C-s C-s C-s C-s C-s C-s C-s C-s C-s C-s C-s C-s C-s C-a C-x k C-x C-f C-k a r C-s C-s C-s C-e ( n o t SPC ( n u l l SPC a n d SPC ( C-e g n u s - n e w s g r o u p - n a m e ) ) ) C-b C-x C-\ C-g C-x C-e C-x C-s x b y t e - r e f C-x b M-x r e p o r t - e m a C-g : C-e n i l M-x Recent messages: Auto-saving... Mark saved where search started [4 times] Quit (((or (string= "alt.sysadmin.recovery" gnus-newsgroup-name) (string= "alt.dev.null" gnus-newsgroup-name)) ("Approved" "foo")) ((message-news-p) (address "nix-razor-pit@esperi.org.uk") (Reply-To "Nix <$}xinix{$@esperi.org.uk>")) ((or (nix-at-work-p) (and ... ...)) (name "Nick Alcock") (address "nick.alcock@oracle.com"))) Saving file /home/nix/lisp/emacs/personal/dot-gnus-articles.el... Wrote /home/nix/lisp/emacs/personal/dot-gnus-articles.el Showing all blocks ... done Compiling /home/nix/lisp/emacs/personal/dot-gnus-articles.el...done Wrote /home/nix/lisp/emacs/personal/dot-gnus-articles.elc Quit nil Load-path shadows: /home/nix/lisp/defaults hides /usr/share/emacs/site-lisp/defaults /home/nix/lisp/emacs/site-wide/site-start hides /usr/share/emacs/site-lisp/site-start /home/nix/lisp/emacs/site-wide/default hides /usr/share/emacs/site-lisp/default /home/nix/lisp/emacs/site-wide/scroll-in-place hides /usr/share/emacs/site-lisp/scroll-in-place /usr/share/emacs/site-lisp/emms/tq hides /usr/share/emacs/24.0.50/lisp/emacs-lisp/tq Features: (shadow debug gnus-cite emacsbug multi-isearch gnus-topic url-cache url-http url-gw url-auth url-handlers nndraft nnrss xml gnus-agent gnus-srvr gnus-score score-mode nnvirtual gnus-msg utf-7 nnimap parse-time utf7 nnmh nnml nnfolder gnus-cache bbdb-gnus bbdb-snarf rot13 epa-file epa derived epg netrc gnus-demon nntp dot-gnus-mail dot-gnus-splits mm-url smtpmail gnus-art mm-uu mml2015 epg-config mm-view mml-smime smime dig dot-gnus-articles dot-gnus-sa background nnir gnus-sum nnoo gnus-group gnus-undo nnmail mail-source dot-gnus-bbdb dot-gnus-colourization tc mail-extr gnus-start gnus-spec gnus-int gnus-range gnus-win gnus gnus-ems nnheader jka-compr vc-git checkdoc thingatpt eldoc generic site-default dot-emacs dot-emacs-emacs iswitchb xemacs-compat add-log misc init-music network-stream starttls tls emms-volume emms-volume-amixer emms-history emms-bookmarks emms-metaplaylist-mode emms-browser sort emms-playlist-sort emms-last-played emms-playing-time emms-stream-info emms-streams emms-mode-line emms-cache emms-info later-do emms-playlist-limit emms-playlist-mode emms-player-mpd tq emms-player-simple emms-source-playlist emms-source-file dired emms emms-compat init-message-modes bbdb-expire bbdb-hooks bbdb-com silly-mail boxquote rect message sendmail rfc822 mml mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231 rfc2047 rfc2045 ietf-drums mailabbrev mail-utils gmm-utils mailheader init-time-tracking timeclock-visualize sgml-mode url url-proxy url-privacy url-expand url-methods url-history url-cookie url-util url-parse url-vars mailcap auto-edit-substitute init-prog-modes init-prog-modes-emacs filecache paren cwarn cc-mode cc-fonts cc-menus semantic/db-mode semantic/db eieio-base semantic/idle semantic/format ezimage semantic/tag-ls semantic/ctxt htmlfontify cus-edit cus-start cus-load compile-bookmarks font-latex latex easy-mmode edmacro kmacro tex-style tex semantic/util-modes semantic/util semantic semantic/tag semantic/lex semantic/fw mode-local cedet cc-cmds cc-styles cc-align cc-engine cc-vars cc-defs miniedit type-break icomplete site-start-load gawd-keys help-mode view gawd-keys-emacs gawd-mode-frobs gawd-mode-frobs-emacs windmove recentf tree-widget wid-edit mv-shell printing ps-print ps-def lpr uptimes pp bbdb timezone browse-kill-ring+ browse-kill-ring tempbuf timeclock igrep grep compile term disp-table ehelp electric comint tramp tramp-compat auth-source eieio assoc gnus-util time-date mm-util mail-prsvr password-cache format-spec tramp-loaddefs regexp-opt hideshow filladapt gawd-faces gawd-faces-emacs nix-dark-theme gawd-misc gawd-misc-emacs which-func imenu winner gawd-lists bbdb-autoloads desktop generic-x uniquify byte-opt warnings bytecomp byte-compile cconv macroexp time advice help-fns advice-preload scroll-in-place site-start-emacs site-autoloads auctex-autoloads tex-site info c-eldoc-autoloads compilation-recenter-end-autoloads compile-bookmarks-autoloads dictionary-autoloads diff-git-autoloads elk-test-autoloads fringe-helper-autoloads full-ack-autoloads htmlize-autoloads jump-autoloads inflections-autoloads findr-autoloads lua-mode-autoloads mv-shell-autoloads package tabulated-list emms-auto w3m-load apropos-toc cl ring filesets easymenu flash-paren saveplace redo+ 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) -- NULL && (void)