From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Michael Albinus Newsgroups: gmane.emacs.devel Subject: Re: TRAMP VC optimization fails: non-TRAMP filenames handled incorrectly in async operations. Date: Fri, 29 Mar 2019 18:03:55 +0100 Message-ID: <87bm1tr4sk.fsf@gmx.de> References: <87bm1wmhw6.fsf@gmx.de> <8736n8i4wa.fsf@gmx.de> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="270003"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: emacs-devel To: Daniel Pittman Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Mar 29 18:05:50 2019 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1h9uwv-00186w-Lh for ged-emacs-devel@m.gmane.org; Fri, 29 Mar 2019 18:05:49 +0100 Original-Received: from localhost ([127.0.0.1]:33316 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h9uwu-00079w-Ic for ged-emacs-devel@m.gmane.org; Fri, 29 Mar 2019 13:05:48 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:39560) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h9uvQ-00077f-Qi for emacs-devel@gnu.org; Fri, 29 Mar 2019 13:04:17 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1h9uvH-0002T6-Mg for emacs-devel@gnu.org; Fri, 29 Mar 2019 13:04:09 -0400 Original-Received: from mout.gmx.net ([212.227.17.20]:57547) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1h9uvB-0002MW-Ua for emacs-devel@gnu.org; Fri, 29 Mar 2019 13:04:04 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1553879036; bh=CXqd4zc5ALDePsE5KMYuGvpkO5EZ8oqgYD7f2N7VLJY=; h=X-UI-Sender-Class:From:To:Cc:Subject:References:Date:In-Reply-To; b=H9V0OFGwxcDd5337ZjT2k6jcz+Wpf8L6HiE/sSlB5B39MeuwG9aA494ax4y4yGacv e5Gr3MG9MD/NWZgi5s0gRIx9hoV/NjdC53nVKJh3CzFIWE7ITjc0I1qYxeivsVb1A9 1D2qCBfxV4n2oMi/4QuhDB/aS2aBY4H+0PIytGm4= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Original-Received: from detlef.gmx.de ([212.86.37.206]) by mail.gmx.com (mrgmx103 [212.227.17.168]) with ESMTPSA (Nemesis) id 0LlV4F-1gZTRL0oJb-00bNaV; Fri, 29 Mar 2019 18:03:56 +0100 In-Reply-To: (Daniel Pittman's message of "Fri, 29 Mar 2019 12:36:21 +0000") X-Provags-ID: V03:K1:RGLEID1GZyufjkel8GghCB69ATRX5E4hH0v9wh1lQ/pM1SF1GE6 DoGTAkpLiWjjG4zlmIy1j+1KeoW8GDJG7coVoISdbzqP/NcflMDXbTQXoybba1i71cZm004 bqG9v0725O66shdxjAgryTx6stdWcTDjneymk56Hn2o6UUvuGADkysdeEu+VEyLB0vZ9b0H zdcbNPmgRlmELrWhmu+vw== X-UI-Out-Filterresults: notjunk:1;V03:K0:/P++ej9klNU=:sg4OtzANt2h3O+o/bx52ho Zmy9cvaB6U9gmG96tz2CsARVD9NO9xpefCYy4KSK4rZSWqaiBY8OmBqNqW0pd0oP+xpXply8u hXcZBDhnjvDA+DYIo5G70nhp4ktrdJkYyYCdhNZ228CXNlrE8eItZCJe1N746NiWhc1B/Vjj5 lxanLkLpFFS5YnMZuvro8zjwXxvQNdV1plt+h62mUq+lkGiDuJkPlPz8C5i+I8L1O4a9QBTDv Z1+PyTHi6eaoSNvv2F0Aub2c17d5L/I0OXSg7wUOlm+HyDsMTesvtNvTXCwlUKlsvso5bMt9y C5oyZIZMmtc9D9wxW2t5slbCnwFWeW2zysGwULQaivWxpKiqChUKEDIrk9eASEZj/IeB/tWHL JZe2jUWxHXv+uCrPZi/PrMwOzy2WLtB20fSO+sTfeFdk3moIcnrNWRN9by1C4OkMIwFi03qCd 7qyTgnx74fyyCcvedOCohQlZ7BfPu73T4bwyswnVx75qwp+e1NQXu2gWkk5dVDJZ74aNdTwwA 3sE684fEOoOSP0cpg40WRaREjtWSny+UyFXSOtjP2PLPSe/GM/xEFdXb7m+nVRxAhLGQ2atWH SUzKKlXfVx6QLRvZMr77E/eO3qUjuQHIGS5Ee/xJzDooUrqZWpTGOMkf8/TduV7jSG6oOaQlA doCogDpP51VlH4Wdi1hxlUzkFhgPzDM5JOsDFFWLXSD4Yf558Phj7FAFDCJo7adlD3F2JgkCE R4QjPDCFfOogZnLOQvDF5BHg6AQZiNTEfg5H4WYZPG1UXd7cGxdMl6QR+DJ82SahcD4Zp5QK X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 212.227.17.20 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:234814 Archived-At: --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Daniel Pittman writes: Hi Daniel, > Since I cannot reproduce the problem (yet), do you have a > backtrace? > > Sure, please see it follow. I have censored the content of a small > number of strings, but this is replacing a standard ASCII letter with > 'X' so should have no semantic effect. Sorry to have to do that. > Fair warning, it is ... long. Thanks! Could you pls send it next time as attachment? As text in the message body, line breaks are set randomly, which makes it hard to read. > The most interesting part is at the very start, where my `revert-file > ` operation on a remote file triggers a `vc-refresh-state`, which ends > up causing `tramp-send-string` to run `process-send-string`, and then > a timer fires that drives the "deferred" third party library [1] to > move on to running a background command, using the timeout(1) and p4 > (1) binaries to grab some state information. Yes. Tramp fights indeed with timers, and so I have disabled timers in tramp-accept-process-output already. Maybe we shall do the same in tramp-send-string? Would the following patch help? --=-=-= Content-Type: text/x-patch Content-Disposition: inline Content-Transfer-Encoding: quoted-printable *** /tmp/ediffDh3DJa 2019-03-29 18:01:12.059246938 +0100 =2D-- /home/albinus/src/tramp/lisp/tramp.el 2019-03-29 17:58:44.756196926 = +0100 *************** *** 4210,4216 **** the remote host use line-endings as defined in the variable `tramp-rsh-end-of-line'. The communication buffer is erased before send= ing." (let* ((p (tramp-get-connection-process vec)) ! (chunksize (tramp-get-connection-property p "chunksize" nil))) (unless p (tramp-error vec 'file-error "Can't send string to remote host -- not logged i= n")) =2D-- 4210,4219 ---- the remote host use line-endings as defined in the variable `tramp-rsh-end-of-line'. The communication buffer is erased before send= ing." (let* ((p (tramp-get-connection-process vec)) ! (chunksize (tramp-get-connection-property p "chunksize" nil)) ! ;; We do not want to run timers. ! (stimers (with-timeout-suspend)) ! timer-list timer-idle-list) (unless p (tramp-error vec 'file-error "Can't send string to remote host -- not logged i= n")) *************** *** 4238,4244 **** (process-send-string p (substring string pos (min (+ pos chunksize) end))) (setq pos (+ pos chunksize)))) ! (process-send-string p string))))) (defun tramp-get-inode (vec) "Returns the virtual inode number. =2D-- 4241,4249 ---- (process-send-string p (substring string pos (min (+ pos chunksize) end))) (setq pos (+ pos chunksize)))) ! (process-send-string p string)) ! ;; Reenable the timers. ! (with-timeout-unsuspend stimers)))) (defun tramp-get-inode (vec) "Returns the virtual inode number. --=-=-= Content-Type: text/plain Best regards, Michael. --=-=-=--