From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Michael Albinus Newsgroups: gmane.emacs.devel Subject: Tramp and timers Date: Fri, 11 Dec 2020 17:58:29 +0100 Message-ID: <87ft4c5lfu.fsf@gmx.de> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="7186"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Dec 11 18:06:40 2020 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1knlsO-0001ko-I5 for ged-emacs-devel@m.gmane-mx.org; Fri, 11 Dec 2020 18:06:40 +0100 Original-Received: from localhost ([::1]:50750 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1knlsN-0001A5-GX for ged-emacs-devel@m.gmane-mx.org; Fri, 11 Dec 2020 12:06:39 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:46894) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1knlka-0004r9-Kb for emacs-devel@gnu.org; Fri, 11 Dec 2020 11:58:38 -0500 Original-Received: from mout.gmx.net ([212.227.15.18]:48089) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1knlkW-0006Gw-Gf for emacs-devel@gnu.org; Fri, 11 Dec 2020 11:58:36 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1607705910; bh=+FpkRAbIHhSCOFJShILx74euRQC1FKbTB0/7Y9c80LU=; h=X-UI-Sender-Class:From:To:Subject:Date; b=EW+ITUYBXOXi/ZMpCn4DJLKeiuxHyR4LYrDeRNKIsefu7VBdflZWvHdLSbPdzgOjO Pq743HIyOctYZJu2wMDS8zEk68Qlwzx6WiirXOAmH0crJ/wgnwBG7XEIJMeEbd0kLE J3Q1Uttr9zgrVepR2fwFnf87S+gsqETAlORHtkS0= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Original-Received: from gandalf.gmx.de ([212.91.249.190]) by mail.gmx.com (mrgmx005 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MF3He-1kuMNZ3cVs-00FPfH for ; Fri, 11 Dec 2020 17:58:29 +0100 X-Provags-ID: V03:K1:tXEohpc46CLpeH1XRA4bIbnOUvUXB29YBF7geJ1vR29SpLU9Jo1 Gyn40LGKvjrc/Ismgs6yrdjnaJNcna0UsyxphN9W68VkiINfXsXWYQSNfjuD65xk4I+l1HK fh5lB/4R8NsV3rhODYPO2k0ESBWP6gigLiHIvfM7l5Rxs1ugk4pGic+uRK2MIymj/2hK8xV L2TawPuwBpOAoQui/NGeQ== X-UI-Out-Filterresults: notjunk:1;V03:K0:2wNUC9f5z94=:Ovs29v/ipY92kMGr2ZgnHW i9izMSMmwuRizy1hLBF+rKes1B5EoQi4GWLMIsShGk9CGYvWborHF4qg2CMFovXlwgoEeNMNY KtvRZXgssxGShc1Qym1OUJV5awWxuJ3Q++Mo7t5HZZEOb7vMtFMN/xoUxglV0D1r/vVtpQ7Cd ktKALRzvNOg8qyukni0TD4tLpoGIT+jwgzKNGORhz2HgNR6PAVvMoTHJQq7tTzm4wwrVo/G4m Cvi5F+HOyu8BuX8Hbh1kIdAuisaXuGtjTrjBQzYg24DwTlAxPhqjCDcIZbuTokvLvVl0PDKqA Qo3delpxSBI0DC5Th6z/Mk8zAYe5fWxzaVPqPs6wtVo8M1RYVM1BSs7elwvl49089xbYKJP/O XtIbNXmxgU01e3O0Dg4WL8G3AvYHPmiQiV3y9YvGyT10DWLdHHuZ7epsJ8HxvxOMhUBNsilt6 XRhEMcn+/7ZrEoovRflWjiq+eSkDNdkLIY3ZdhkG34zxif7AlPvVBawHF7U4SX92qjkdcCCRD M5f9InamjwIN36i/OjpBNLb6oXRph8wQqOlbwQh0uwhv1akDXD4Gjanyji8ITXCNg2E1eu4ZF 36NoPrG3GiT1rtrqO5hZF58FafIJNdo6nXagjKgN7PQDKLbV46xwPrm6HC2nDIZd3uhpytZ0i n3zWTxgkSWDKxJG9DIHp92E6sOXImK6IDR20udmiMt34QyUL864AupdxiHN0WlVaL7iEF69ji MqpXuSmVs8tDdVgaf4fGaK5MNM+KUBtOwk26eVKaPgvjUMSAcOtcG7gCG2rUoBICMCuravjr Received-SPF: pass client-ip=212.227.15.18; envelope-from=michael.albinus@gmx.de; helo=mout.gmx.net X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 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-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:260699 Archived-At: Hi, Tramp is plagued since ever with timers, which run while Tramp is performing accept-process-output. If such a timer runs an operation which includes also a remote file operation, it ruins Tramp's current process handling. See the discussion at for a recent problem. In order to fix this, I plan to push a patch, which let Tramp detect this kind of situation. If Tramp is performing an atomic process operation (process-send-string / accept-process-output sequence), it creates an internal lock. If another remote file operation tries to perform a similar atomic process operation, while Tramp is locked, an error will be raised. This should happen only for remote file operations called from timers. It does not worsen the current situation; instead of blocking whole Emacs we'll get an error which can be handled. The timer is cancelled, but the normal Emacs operations still continue. (Maybe there are similar problems with process sentinels, but I do not recall a respective bug report) People writing timer functions shall care, at least by wrapping such calls with ignore-errors. Currently, a file-error is raised, but we could also introduce a new error symbol. Comments? Best regards, Michael.