From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Michael Albinus Newsgroups: gmane.emacs.help Subject: Re: Killing a hung ssh process in a TRAMP session Date: Sun, 17 Jan 2010 13:23:44 +0100 Message-ID: <87bpgsncmn.fsf@gmx.de> References: <4B458C2F.9010709@gmail.com> <877hrufgsn.fsf@gmx.de> <4B45FDF7.9080008@gmail.com> <87skahex3w.fsf@gmx.de> <4B4EB86B.2020907@gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1263731065 5376 80.91.229.12 (17 Jan 2010 12:24:25 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 17 Jan 2010 12:24:25 +0000 (UTC) Cc: Emacs mailing list To: Suvayu Ali Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun Jan 17 13:24:18 2010 Return-path: Envelope-to: geh-help-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 1NWUAz-000675-7I for geh-help-gnu-emacs@m.gmane.org; Sun, 17 Jan 2010 13:24:17 +0100 Original-Received: from localhost ([127.0.0.1]:38536 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NWUB0-0006NG-2L for geh-help-gnu-emacs@m.gmane.org; Sun, 17 Jan 2010 07:24:18 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NWUAd-0006NB-J6 for help-gnu-emacs@gnu.org; Sun, 17 Jan 2010 07:23:55 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NWUAX-0006Mz-U6 for help-gnu-emacs@gnu.org; Sun, 17 Jan 2010 07:23:54 -0500 Original-Received: from [199.232.76.173] (port=55943 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NWUAX-0006Mw-Nd for help-gnu-emacs@gnu.org; Sun, 17 Jan 2010 07:23:49 -0500 Original-Received: from mail.gmx.net ([213.165.64.20]:51128) by monty-python.gnu.org with smtp (Exim 4.60) (envelope-from ) id 1NWUAX-0003Zr-6e for help-gnu-emacs@gnu.org; Sun, 17 Jan 2010 07:23:49 -0500 Original-Received: (qmail invoked by alias); 17 Jan 2010 12:23:46 -0000 Original-Received: from p4FC008F2.dip0.t-ipconnect.de (EHLO detlef.local) [79.192.8.242] by mail.gmx.net (mp006) with SMTP; 17 Jan 2010 13:23:46 +0100 X-Authenticated: #3708877 X-Provags-ID: V01U2FsdGVkX1+2WqZC2U62gumeV2Cbmv7xcBlI5RuEsrGx/Zo8u/ 2pKooNDJAXln/b In-Reply-To: <4B4EB86B.2020907@gmail.com> (Suvayu Ali's message of "Wed, 13 Jan 2010 22:23:39 -0800") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.91 (gnu/linux) X-Y-GMX-Trusted: 0 X-FuHaFi: 0.66000000000000003 X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:71270 Archived-At: Suvayu Ali writes: > Hi Michael, Hi, > These are the steps I took to generate the backtrace, after setting > the variables as you requested. > > * Opened a remote file and edited it. > * Disconnected my network connection. > * Tried to save the file with `C-x C-s' > * After emacs hung, I took a screenshot > * Killed emacs with `kill -FPE ' > * Copied the backtrace to a buffer, saved it as raw-text. > * Executed the kill command again (as emacs was still unresponsive) > > I have attached the screenshot and the text file with the backtrace. > > Hope this will help. And as always, thanks for the help. I could reproduce it. Unfortunately, there is no simple way to solve it inside Tramp (but I will continue to investigate). Therefore, I have added the following item to Tramp's Frequently Asked Questions, HTH: * TRAMP does not recognize hung `ssh' sessions When your network connection is down, `ssh' sessions might hang. TRAMP cannot detect it safely, because it still sees a running `ssh' process. Timeouts cannot be used as well, because it cannot be predicted, how long a remote command will last, for example when copying very large files. Therefore, you must configure the `ssh' process to die in such a case. The following entry in `~/.ssh/config' would do the job: Host * ServerAliveInterval 5 Best regards, Michael.