From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dan Nicolaescu Newsgroups: gmane.emacs.bugs Subject: bug#1310: 23.0.60; Emacs daemon behaves strangely if client loses X connection Date: Thu, 6 Nov 2008 21:08:06 -0800 (PST) Message-ID: <200811070508.mA75866Z012800@mothra.ics.uci.edu> References: <87vdv1sspi.fsf@demokritos.grumblesmurf.org> Reply-To: Dan Nicolaescu , 1310@emacsbugs.donarmstrong.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1226035841 16452 80.91.229.12 (7 Nov 2008 05:30:41 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 7 Nov 2008 05:30:41 +0000 (UTC) Cc: 1310@emacsbugs.donarmstrong.com To: Espen Wiborg Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Nov 07 06:31:43 2008 connect(): Connection refused Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1KyJwK-0004Ol-Ox for geb-bug-gnu-emacs@m.gmane.org; Fri, 07 Nov 2008 06:31:25 +0100 Original-Received: from localhost ([127.0.0.1]:45631 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KyJvD-0004aU-7i for geb-bug-gnu-emacs@m.gmane.org; Fri, 07 Nov 2008 00:30:15 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KyJv9-0004aO-V0 for bug-gnu-emacs@gnu.org; Fri, 07 Nov 2008 00:30:11 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KyJv8-0004aC-8b for bug-gnu-emacs@gnu.org; Fri, 07 Nov 2008 00:30:11 -0500 Original-Received: from [199.232.76.173] (port=36260 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KyJv8-0004a5-23 for bug-gnu-emacs@gnu.org; Fri, 07 Nov 2008 00:30:10 -0500 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:33755) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1KyJv7-0003n7-M1 for bug-gnu-emacs@gnu.org; Fri, 07 Nov 2008 00:30:09 -0500 Original-Received: from rzlab.ucr.edu (rzlab.ucr.edu [127.0.0.1]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id mA75U576004344; Thu, 6 Nov 2008 21:30:05 -0800 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.13.8/8.13.8/Submit) id mA75F3hV000581; Thu, 6 Nov 2008 21:15:03 -0800 X-Loop: don@donarmstrong.com Resent-From: Dan Nicolaescu Resent-To: bug-submit-list@donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Fri, 07 Nov 2008 05:15:02 +0000 Resent-Message-ID: Resent-Sender: don@donarmstrong.com X-Emacs-PR-Message: report 1310 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Original-Received: via spool by 1310-submit@emacsbugs.donarmstrong.com id=B1310.122603450531803 (code B ref 1310); Fri, 07 Nov 2008 05:15:02 +0000 Original-Received: (at 1310) by emacsbugs.donarmstrong.com; 7 Nov 2008 05:08:25 +0000 Original-Received: from sallyv2.ics.uci.edu (sallyv2.ics.uci.edu [128.195.1.120]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id mA758Mtt031797 for <1310@emacsbugs.donarmstrong.com>; Thu, 6 Nov 2008 21:08:23 -0800 Original-Received: from mothra.ics.uci.edu (mothra.ics.uci.edu [128.195.6.93]) by sallyv2.ics.uci.edu (8.13.7+Sun/8.13.7) with ESMTP id mA7587OF010312; Thu, 6 Nov 2008 21:08:11 -0800 (PST) Original-Received: (from dann@localhost) by mothra.ics.uci.edu (8.13.8+Sun/8.13.6/Submit) id mA75866Z012800; Thu, 6 Nov 2008 21:08:06 -0800 (PST) In-Reply-To: <87vdv1sspi.fsf@demokritos.grumblesmurf.org> (Espen Wiborg's message of "Wed, 05 Nov 2008 23:39:37 +0100") Original-Lines: 38 X-ICS-MailScanner-Information: Please contact the ISP for more information X-ICS-MailScanner-ID: mA7587OF010312 X-ICS-MailScanner: Found to be clean X-ICS-MailScanner-SpamCheck: not spam, SpamAssassin (score=-1.44, required 5, autolearn=disabled, ALL_TRUSTED -1.44) X-ICS-MailScanner-From: dann@mothra.ics.uci.edu X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) Resent-Date: Fri, 07 Nov 2008 00:30:11 -0500 X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:22201 Archived-At: Espen Wiborg writes: > 1. Start emacs with "emacs -Q -daemon" > > 2. Create an X frame (emacsclient -c) > > 3. Kill your X server (or make your window manager crash, which is how I > initially tickled this) > > 4. Restart X and try to create an X frame again. This time the frame is > blank and doesn't respond to anything; the only way to get rid of the > frame is by killing the daemon process. > > Attaching gdb to the daemon process when the frame creation hangs gives > the stacktrace below. > > It appears to be hanging on the yes-or-no-p at the top of server-start, > called because cmd_error_internal calls Fkill_emacs at keyboard.c:1274. Thanks for the detailed report! Can you please try this patch? I am not entirely convinced it's completely right, I can't kill my X server at the moment, and I could not reproduce the problem with Xnest. --- keyboard.c.~1.978.~ 2008-11-02 21:49:25.000000000 -0800 +++ keyboard.c 2008-11-06 21:04:55.000000000 -0800 @@ -1265,7 +1265,7 @@ cmd_error_internal (data, context) /* If the window system or terminal frame hasn't been initialized yet, or we're not interactive, write the message to stderr and exit. */ else if (!sf->glyphs_initialized_p - || FRAME_INITIAL_P (sf) + || (FRAME_INITIAL_P (sf) && !IS_DAEMON) || noninteractive) { print_error_message (data, Qexternal_debugging_output,