From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Harald Hanche-Olsen Newsgroups: gmane.emacs.devel,gmane.emacs.pretest.bugs Subject: Re: 23.0.60; Emacs should survive a lost X connection Date: Sun, 10 Feb 2008 09:27:44 +0100 (CET) Message-ID: <20080210.092744.229156635.hanche@math.ntnu.no> References: <200802062007.m16K7r78005498@sallyv1.ics.uci.edu> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1202632536 15533 80.91.229.12 (10 Feb 2008 08:35:36 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 10 Feb 2008 08:35:36 +0000 (UTC) Cc: dann@ics.uci.edu To: emacs-pretest-bug@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Feb 10 09:35:58 2008 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1JO7fE-0006mY-AK for ged-emacs-devel@m.gmane.org; Sun, 10 Feb 2008 09:35:52 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JO7el-0004Jp-50 for ged-emacs-devel@m.gmane.org; Sun, 10 Feb 2008 03:35:23 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JO7e0-0003pW-Em for emacs-devel@gnu.org; Sun, 10 Feb 2008 03:34:36 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JO7dz-0003of-ID for emacs-devel@gnu.org; Sun, 10 Feb 2008 03:34:35 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JO7dz-0003oa-AA for emacs-devel@gnu.org; Sun, 10 Feb 2008 03:34:35 -0500 Original-Received: from fencepost.gnu.org ([140.186.70.10]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JO7dy-0006Lq-WC for emacs-devel@gnu.org; Sun, 10 Feb 2008 03:34:35 -0500 Original-Received: from mx10.gnu.org ([199.232.76.166]) by fencepost.gnu.org with esmtp (Exim 4.67) (envelope-from ) id 1JO7dy-0005Oi-LW for emacs-pretest-bug@gnu.org; Sun, 10 Feb 2008 03:34:34 -0500 Original-Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1JO7dv-0006L2-26 for emacs-pretest-bug@gnu.org; Sun, 10 Feb 2008 03:34:34 -0500 Original-Received: from abel.math.ntnu.no ([129.241.15.50]) by monty-python.gnu.org with smtp (Exim 4.60) (envelope-from ) id 1JO7du-0006KV-I2 for emacs-pretest-bug@gnu.org; Sun, 10 Feb 2008 03:34:30 -0500 Original-Received: (qmail 4572 invoked from network); 10 Feb 2008 08:27:46 -0000 Original-Received: from euler1.math.ntnu.no (HELO localhost) (hanche@129.241.15.151) by abel.math.ntnu.no with ESMTPA; 10 Feb 2008 08:27:46 -0000 In-Reply-To: X-URL: http://www.math.ntnu.no/~hanche/ X-Mailer: Mew version 5.2.51 on Emacs 23.0.0 / Mule 6.0 (HANACHIRUSATO) X-detected-kernel: by monty-python.gnu.org: Solaris 8 (1) X-detected-kernel: by monty-python.gnu.org: Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:88618 gmane.emacs.pretest.bugs:20979 Archived-At: For some reason, rms is sending out his messages on this thread with Reply-to: rms@gnu.org. So I had sent the reply below to him only. By the lack of any response I don't think he has received it; so here it is again, with more recpipients this time. Exececutive summary: The problem is not gone away, unless I run emacs under gdb (!), + Richard Stallman : > The crash is caused by the code in Fdelete_frame > to call the hook `delete-frame-functions'. > I don't think that should be done while handling a disconnect > in a signal handler. So I changed it so that FORCE inhibits that. > > Are there any more crashes due to that error check? Fascinating. Now, when I first repeated my experiment (that is: emacs -nw, M-x make-frame-display RET :1 RET, then kill display :1) I got an infinite stream of this message: (emacs:74399): GLib-WARNING **: g_main_context_check() called recursively from within a source's check() or prepare() member. No idea what came before this gazillion of identical messages. Unfortunately I am unable to reproduce it. But I had perhaps obfuscated the test by failing to use the -q flag. So I tried again, this time running emacs -nw -q. Now it just aborted (after I had done M-x make-frame-on-display RET :1 RET and killed display :1): Program terminated with signal 6, Aborted. #0 0x88cb9ecb in kill () from /lib/libc.so.6 #1 0x0811ea96 in fatal_error_signal (sig=-1077959328) at emacs.c:399 #2 0x88a6af5d in sigaction () from /lib/libpthread.so.2 #3 0xbfbfff94 in ?? () #4 0x00000006 in ?? () #5 0xbfbfa930 in ?? () #6 0xbfbfa670 in ?? () #7 0x00000000 in ?? () #8 0x88a6aa24 in sigaction () from /lib/libpthread.so.2 #9 0x08180e2f in internal_condition_case (bfun=0x812ceb4 , handlers=137829497, hfun=0x8126584 ) at eval.c:1469 #10 0x08120736 in command_loop_2 () at keyboard.c:1370 #11 0x08180b3d in internal_catch (tag=0, func=0x8120718 , arg=137779201) at eval.c:1230 #12 0x08120548 in command_loop () at keyboard.c:1349 #13 0x081205e4 in recursive_edit_1 () at keyboard.c:958 #14 0x08120703 in Frecursive_edit () at keyboard.c:1020 #15 0x0811f9ba in main (argc=3, argv=0xbfbfac3c) at emacs.c:1794 The above is from gdb run on the core file. So I tried yet again, this time starting emacs -nw -q and attaching gdb to the live process before running the experiment yet again. This time, gdb caught a SIGPIPE that I just continued from, after which these messages appeared: Xlib: connection to ":1.0" refused by server Xlib: No protocol specified (emacs:3242): Gdk-CRITICAL **: gdk_screen_get_display: assertion `GDK_IS_SCREEN (screen)' failed (emacs:3242): GLib-GObject-CRITICAL **: g_object_get_data: assertion `G_IS_OBJECT (object)' failed (emacs:3242): Gdk-CRITICAL **: gdk_screen_get_display: assertion `GDK_IS_SCREEN (screen)' failed (emacs:3242): GLib-GObject-CRITICAL **: g_object_get_data: assertion `G_IS_OBJECT (object)' failed (emacs:3242): Gdk-CRITICAL **: gdk_screen_get_display: assertion `GDK_IS_SCREEN (screen)' failed (emacs:3242): GLib-GObject-CRITICAL **: g_object_get_data: assertion `G_IS_OBJECT (object)' failed (emacs:3242): Gdk-CRITICAL **: gdk_screen_get_display: assertion `GDK_IS_SCREEN (screen)' failed (emacs:3242): GLib-GObject-CRITICAL **: g_object_get_data: assertion `G_IS_OBJECT (object)' failed Connection lost to X server `:1.0' But then emacs acted normally again. So behaviour seems to differ depending on whether or not I run under gdb. - Harald