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.bugs Subject: bug#54126: 29.0.50; C-x x g doesn't always correctly revert SSHFS files Date: Wed, 23 Feb 2022 16:14:33 +0100 Message-ID: <87v8x5mx7q.fsf@gmx.de> References: Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="3110"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) Cc: 54126@debbugs.gnu.org To: Philipp Stephani Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Feb 23 16:15:24 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1nMtMS-0000Uh-Ap for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 23 Feb 2022 16:15:24 +0100 Original-Received: from localhost ([::1]:36120 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nMtMR-0001DB-4g for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 23 Feb 2022 10:15:23 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:34764) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nMtMD-0001CV-Qo for bug-gnu-emacs@gnu.org; Wed, 23 Feb 2022 10:15:15 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:52093) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nMtM6-0004Fe-M3 for bug-gnu-emacs@gnu.org; Wed, 23 Feb 2022 10:15:05 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nMtM6-00016w-B1 for bug-gnu-emacs@gnu.org; Wed, 23 Feb 2022 10:15:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Michael Albinus Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 23 Feb 2022 15:15:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 54126 X-GNU-PR-Package: emacs Original-Received: via spool by 54126-submit@debbugs.gnu.org id=B54126.16456292834230 (code B ref 54126); Wed, 23 Feb 2022 15:15:02 +0000 Original-Received: (at 54126) by debbugs.gnu.org; 23 Feb 2022 15:14:43 +0000 Original-Received: from localhost ([127.0.0.1]:45990 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nMtLn-00016A-61 for submit@debbugs.gnu.org; Wed, 23 Feb 2022 10:14:43 -0500 Original-Received: from mout.gmx.net ([212.227.17.22]:40943) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nMtLl-00015u-BC for 54126@debbugs.gnu.org; Wed, 23 Feb 2022 10:14:41 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1645629274; bh=C4ji5M9T/Z6IDKF/sya/ATKucmajnnJ0W5WZAmCAGuI=; h=X-UI-Sender-Class:From:To:Cc:Subject:References:Date:In-Reply-To; b=CRv0gZGkT50uGIJ+d94iAIM0TDV/jDbIZy5rTml1VBfHrfjmGqFy+AF5p9Op9C5Dw Ogu+ZhJtpZDCWRj0JGlpSfTVD2RHNm20PBHM5/LH+N5YlIsWRD8ThHVyxO20lTUcMv wXuFkK823u0eYzflecuErgGqQ4FaNffYJVbwNpI8= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Original-Received: from gandalf.gmx.de ([212.91.249.160]) by mail.gmx.net (mrgmx105 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MWASY-1nkVo830yA-00Xf2x; Wed, 23 Feb 2022 16:14:34 +0100 In-Reply-To: (Philipp Stephani's message of "Wed, 23 Feb 2022 14:43:45 +0100") X-Provags-ID: V03:K1:KF5N8XampqfIWDVypWO10eBBhxN7j0AM4+lilsOZHpxajTWVRdo hUocug9IPi/pKpwlHerpJQrQoBxTi8RK3asViGLnaHif2bWWLwO0ZZwfBD5kT4wu8Q5LcIC w2nuYtyFwv3UlpIwXhpwJksFcxD3trbzVXDASAQujX34aqijq3KT7aqP7d+Ief2OdNDVXf4 R58dPXUES+3A7SwVyjw7g== X-UI-Out-Filterresults: notjunk:1;V03:K0:PusBaTbQB30=:keKYngGgp4FoZdLNHQdrOq gLU3QZ8hqjr47SemLDTJlWxdGkZot3ACcb7pKCtHu19RZmMDu25OKv1Hm2GCM5B1BWuToM3L2 XESebcyvjNl6WB3ZnQYWjxCilI31c/uKkWveYt6GZ6Dh4mxqEbwtO2zt6yGEDgfNFlOZE0Chj b+e4H49hrx0xbi+VhXfYNmbwu6VRMI2ktGs5otiRi71GWMk1gPSnG2wBsaygoWckoAo2EdFJ3 JrWy30gSSCtd3iAgeIz4w+M72CqmHEtTqRe55UcAsYM0LHbIc1AZGAYzVStvbAxYIJnu3ICGh CVKqSMiLorRjeOeI1aPHcfK5O6nkA2YoI/KjpZsl4ZkuEiCFwtkWAVYPYKa3G9R6NNCCEaH4C 0bvPukL9SR4324V7NvbkXmY+fvJe+9WqxzfzTVaIKi8d0TuCkJ8mZr6ISn/zsRWcHYjrGZzZu Er9+IpO1CDmkPU5tCP/TfCBlAxvhJgCM33fsueYyF+HByYziFLwpHTGLppC7gb3Scj9lQmPKS tWd1cTgECNpF6x2Z8f0XHi7zfnfSnhZ2ivj4FQOwn51AgViQ+Vkns4c3Mffc8MfImkObqI8TH H3Ur5xTqyebGZelmwyonHZleMW3QwkeTsFihjYmNNUa0IDPD8wSNLeftu82J5/EdzPu+zUZH+ XsuXqhNvirx62T+Kn6RgAdDqandemhTzX34AH5S8p9lhYkjyLgceTcagQrzpe5t8tSgtla9nU 0hUTpkJ2MTDRIsFuTz9FIdVXffKatlF8c/aFxLsPr+2F8kmPbSfbPXNkv+g9/XGWd4yS6DLn X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:227518 Archived-At: Philipp Stephani writes: Hi Philipp, > At least on my system the following happens often, but not always: > > Create some file whose contents don't really matter. In my case: > > $ cat /tmp/a.c > int main(void) { > return 0; > } > > Visit the file over SSHFS: > > $ emacs -Q /sshfs:localhost:/tmp/a.c > > Now, outside of Emacs, append something to the file: > > $ echo aaaaa >> /tmp/a.c > > Immediately after that, back in Emacs, hit C-x x g. The new content > isn't there. Only after reverting the buffer a second time it appears. > First I thought this was a timing/cache coherency issue, but even > waiting for 10 seconds doesn't fix it in most cases. Somewhat > surprisingly, switching to a different buffer in between appears to make > the problem go away (in some cases at least). Looks like you are plagued by caching. revert-buffer reverts a file only, if it is modified on disk. Tramps caches file attributes by default for 10 seconds (see remote-file-name-inhibit-cache). Set this value to t in order to test, whether it makes a difference. However, you have said you did wait for 10 seconds, so maybe this isn't the reason. Another cache might come from sshfs itself. Tramp calls sshfs like "sshfs localhost:/ /tmp/tramp.sshfs.localhost -C -o idmap=user,reconnect". See tramp-mount-args settings in tramp-sshfs.el, line 33-34. You might try to add other options, like "-o no_readahead" or "-o sync_readdir", see sshfs(1). Don't forget to unmount the sshfs mount point, before you start a new Emacs session with changed options. Best regards, Michael.