From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Alexander Shukaev Newsgroups: gmane.emacs.devel Subject: Re: Emacs Hangs on Filesystem Operations on Stale NFS Date: Mon, 11 Jun 2018 14:46:35 +0200 Message-ID: References: <1727545582523435cab149c2bc857b40@alexander.shukaev.name> <7466e2d177e79983436af2425ceb5b54@alexander.shukaev.name> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit X-Trace: blaine.gmane.org 1528721086 16455 195.159.176.226 (11 Jun 2018 12:44:46 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 11 Jun 2018 12:44:46 +0000 (UTC) User-Agent: Roundcube Webmail/1.1.2 Cc: Emacs-devel , Noam Postavsky , Emacs developers To: Andreas Schwab Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Jun 11 14:44:42 2018 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fSMBd-0004Cu-Iz for ged-emacs-devel@m.gmane.org; Mon, 11 Jun 2018 14:44:41 +0200 Original-Received: from localhost ([::1]:48598 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fSMDk-0006XA-Ib for ged-emacs-devel@m.gmane.org; Mon, 11 Jun 2018 08:46:52 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:57811) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fSMDd-0006VN-9L for emacs-devel@gnu.org; Mon, 11 Jun 2018 08:46:46 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fSMDc-0002Nd-Eb for emacs-devel@gnu.org; Mon, 11 Jun 2018 08:46:45 -0400 Original-Received: from relay7-d.mail.gandi.net ([217.70.183.200]:33655) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1fSMDW-0002Gf-5t; Mon, 11 Jun 2018 08:46:38 -0400 Original-Received: from webmail.gandi.net (unknown [10.200.201.13]) (Authenticated sender: forum@alexander.shukaev.name) by relay7-d.mail.gandi.net (Postfix) with ESMTPA id D748320009; Mon, 11 Jun 2018 12:46:42 +0000 (UTC) In-Reply-To: X-Sender: emacs@alexander.shukaev.name X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 217.70.183.200 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:226204 Archived-At: On 2018-06-11 14:40, Andreas Schwab wrote: > On Jun 11 2018, Alexander Shukaev wrote: > >> signal.signal(signal.SIGALRM, alarm_handler) >> signal.alarm(3) >> try: >> proc = subprocess.call('stat ' + path, >> shell=True, >> stderr=subprocess.PIPE, >> stdout=subprocess.PIPE) >> stdoutdata, stderrdata = proc.communicate() >> signal.alarm(0) >> except Alarm: >> print "Timed out after 3 seconds..." > > How do you know that 3 seconds is enough? > > Andreas. You don't know. You just decide that it's maximum tolerable for you/your setup/hardware/connection/preferences/whatever, otherwise you are 99.(9)% sure that something is wrong somewhere with your system, but you don't give up your Emacs instance for that and rather get indicated that there might be a potential problem. P.S. How did people know that 2 hours would be enough for TCP keepalive?