From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: don@donarmstrong.com (Emacs bug Tracking System) Newsgroups: gmane.emacs.bugs Subject: bug#985: marked as done (23.0.60; emacsclient -c error on first time in new SSH sessions) Date: Tue, 7 Oct 2008 11:00:03 -0700 Message-ID: References: <87wsgkthsl.fsf@cyd.mit.edu> <20080916140427.31679AE46AE@mt-computer.local> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="----------=_1223402403-3808-0" X-Trace: ger.gmane.org 1223403119 15277 80.91.229.12 (7 Oct 2008 18:11:59 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 7 Oct 2008 18:11:59 +0000 (UTC) To: Chong Yidong Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Oct 07 20:12:57 2008 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 1KnH2L-0001dX-1X for geb-bug-gnu-emacs@m.gmane.org; Tue, 07 Oct 2008 20:11:57 +0200 Original-Received: from localhost ([127.0.0.1]:33308 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KnH1H-0000Sz-0J for geb-bug-gnu-emacs@m.gmane.org; Tue, 07 Oct 2008 14:10:51 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KnH0T-00009r-UC for bug-gnu-emacs@gnu.org; Tue, 07 Oct 2008 14:10:01 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KnH0S-00009Y-P2 for bug-gnu-emacs@gnu.org; Tue, 07 Oct 2008 14:10:01 -0400 Original-Received: from [199.232.76.173] (port=44614 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KnH0S-00009V-LB for bug-gnu-emacs@gnu.org; Tue, 07 Oct 2008 14:10:00 -0400 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:34873) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1KnH0S-0005Ml-1G for bug-gnu-emacs@gnu.org; Tue, 07 Oct 2008 14:10:00 -0400 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 m97I9vB0006896; Tue, 7 Oct 2008 11:09:57 -0700 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.13.8/8.13.8/Submit) id m97I034k003828; Tue, 7 Oct 2008 11:00:03 -0700 X-Mailer: MIME-tools 5.420 (Entity 5.420) X-Loop: don@donarmstrong.com X-Emacs-PR-Message: closed 985 X-Emacs-PR-Package: emacs X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) 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:21230 Archived-At: This is a multi-part message in MIME format... ------------=_1223402403-3808-0 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 Your message dated Tue, 07 Oct 2008 13:51:38 -0400 with message-id <87wsgkthsl.fsf@cyd.mit.edu> and subject line Re: 23.0.60; emacsclient -c error on first time in new SSH= sessions has caused the Emacs bug report #985, regarding 23.0.60; emacsclient -c error on first time in new SSH sessions to be marked as done. This means that you claim that the problem has been dealt with. If this is not the case it is now your responsibility to reopen the bug report if necessary, and/or fix the problem forthwith. (NB: If you are a system administrator and have no idea what this message is talking about, this may indicate a serious mail system misconfiguration somewhere. Please contact don@donarmstrong.com immediately.) --=20 985: http://emacsbugs.donarmstrong.com/cgi-bin/bugreport.cgi?bug=3D985 Emacs Bug Tracking System Contact don@donarmstrong.com with problems ------------=_1223402403-3808-0 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02 (2007-08-08) on rzlab.ucr.edu X-Spam-Level: X-Spam-Status: No, score=-6.5 required=4.0 tests=AWL,BAYES_00,FOURLA, RCVD_IN_DNSWL_MED autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at submit) by emacsbugs.donarmstrong.com; 16 Sep 2008 14:04:44 +0000 Received: from fencepost.gnu.org (fencepost.gnu.org [140.186.70.10]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m8GE4f7V012992 for ; Tue, 16 Sep 2008 07:04:42 -0700 Received: from mx10.gnu.org ([199.232.76.166]:58768) by fencepost.gnu.org with esmtp (Exim 4.67) (envelope-from ) id 1Kfb8f-0004lW-Q6 for emacs-pretest-bug@gnu.org; Tue, 16 Sep 2008 10:02:45 -0400 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1KfbAP-0007T8-31 for emacs-pretest-bug@gnu.org; Tue, 16 Sep 2008 10:04:38 -0400 Received: from mail.gmx.net ([213.165.64.20]:46189) by monty-python.gnu.org with smtp (Exim 4.60) (envelope-from ) id 1KfbAO-0007SC-I1 for emacs-pretest-bug@gnu.org; Tue, 16 Sep 2008 10:04:32 -0400 Received: (qmail invoked by alias); 16 Sep 2008 14:04:29 -0000 Received: from chello062178240212.3.14.tuwien.teleweb.at (EHLO mt-computer.local) [62.178.240.212] by mail.gmx.net (mp047) with SMTP; 16 Sep 2008 16:04:29 +0200 X-Authenticated: #4064391 X-Provags-ID: V01U2FsdGVkX19bxBIFcMdbcM1fxSnlupM+DnUG+RJMYaaNE9HG22 mSkiFOlq0Nr0sn Received: by mt-computer.local (Postfix, from userid 502) id 31679AE46AE; Tue, 16 Sep 2008 16:04:27 +0200 (CEST) From: Markus Triska To: emacs-pretest-bug@gnu.org Subject: 23.0.60; emacsclient -c error on first time in new SSH sessions Message-Id: <20080916140427.31679AE46AE@mt-computer.local> Date: Tue, 16 Sep 2008 16:04:27 +0200 (CEST) X-Y-GMX-Trusted: 0 X-FuHaFi: 0.51 X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. On machine A (Ubuntu Intrepid), I do: $ emacs -nw -Q -f server-start >From machine B (OSX 10.4 or Ubuntu Intrepid running in Virtualbox), I SSH to machine A: $ ssh -X -Y and then, in the SSH session, do: $ emacsclient -c As expected, I get an X frame on machine B. I then close that frame (C-x 5 0) and the SSH session (C-d) and, from B, SSH to A again: $ ssh -X -Y When I then do "emacsclient -c" in the SSH session, it says: Waiting for Emacs... *ERROR*: Connection lost to X server `localhost:10.0' When I then again do "emacsclient -c", it works without problems, and I get again an X frame on machine B every further time I do it. In GNU Emacs 23.0.60.4 (i386-apple-darwin8.11.1, GTK+ Version 2.12.9) of 2008-09-14 on mt-computer.local Windowing system distributor `The XFree86 Project, Inc', version 11.0.40400000 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.UTF-8 value of $XMODIFIERS: nil locale-coding-system: nil default-enable-multibyte-characters: t ------------=_1223402403-3808-0 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02 (2007-08-08) on rzlab.ucr.edu X-Spam-Level: X-Spam-Status: No, score=-3.8 required=4.0 tests=AWL,BAYES_00,FOURLA autolearn=no version=3.2.3-bugs.debian.org_2005_01_02 Received: (at 985-done) by emacsbugs.donarmstrong.com; 7 Oct 2008 17:50:06 +0000 Received: from cyd.mit.edu (CYD.MIT.EDU [18.115.2.24]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m97Ho3rl001368 for <985-done@emacsbugs.donarmstrong.com>; Tue, 7 Oct 2008 10:50:04 -0700 Received: by cyd.mit.edu (Postfix, from userid 1000) id 94D9C57E0BF; Tue, 7 Oct 2008 13:51:39 -0400 (EDT) From: Chong Yidong To: Markus Triska Cc: Stefan Monnier , 985-done@emacsbugs.donarmstrong.com, Jan =?utf-8?Q?Dj=C3=A4rv?= Subject: Re: 23.0.60; emacsclient -c error on first time in new SSH sessions Date: Tue, 07 Oct 2008 13:51:38 -0400 Message-ID: <87wsgkthsl.fsf@cyd.mit.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii > > On machine A, I do: > > $ emacs -nw -Q -f server-start > > From machine B, I SSH to machine A: > > $ ssh -X -Y > > $ emacsclient -c > > As expected, I get an X frame on machine B. I then close that frame > > (C-x 5 0) and the SSH session (C-d) and, from B, SSH to A again: > > $ ssh -X -Y > > When I then do "emacsclient -c" in the SSH session, it says: > > Waiting for Emacs... > > *ERROR*: Connection lost to X server `localhost:10.0' > > I think I know what's going on: even tho you've closed the frame, > Emacs did not close the X11 connection, so when you ssh in again and > try "emacsclient -c" a second time (and with the same > DISPLAY=localhost:10.0), Emacs tries to reuse the old connection, > which fails because that X11-proxy was killed along with your first > ssh session. At that point, Emacs throws away this stale connection, > so that the next attempt works again. > > I guess Emacs could/should disconnect from the X server as soon as the > last frame is closed. Emacs does attempt to close the connection: see x_delete_terminal in xterm.c:10634. With GTK support, this calls xg_display_close, which tries to keep a display open to avoid a GTK crash when no default display exists. This prevents the display from disconnecting properly. I've just installed a fix that allows Emacs to disconnect properly, while still avoiding the GTK crash. ------------=_1223402403-3808-0--