Subject: bug#54016: 29.0.50; TRAMP + sshfs says constantly that file changed

From: Ergus <[email-masked]>
Date: Tue, 15 Feb 2022 21:17:12 +0100

Hi:

Using tramp+sshfs it works pretty much fine at the beginning but after
some minutes it interrupts constantly saying that the file changed on
disk and asks for edit confirmation.

By constantly I mean every time a new edit is attempt I get this (even
several times consecutive).

```
Saving file /sshfs:XXX:XXXX
benchmarks_ompss.h has changed since visited or saved.  Save anyway? (y or n) y
benchmarks_ompss.h changed on disk; really edit the buffer? (y, n, r or C-h) y
File on disk now will become a backup file if you save these changes.
Wrote /sshfs:XXX:XXXX
```

I have enabled auto revert with this variables since ever:

auto-revert-verbose nil
auto-revert-avoid-polling t

but this is the first time I experiment such issue.

I use /scp or /ssh protocols every single day and I don't have this
issue.

Best,
Ergus

In GNU Emacs 29.0.50 (build 69, x86_64-pc-linux-gnu, GTK+ Version 3.24.31, cairo version 1.17.4)
 of 2022-02-15 built on Ergus
Repository revision: 2d573afecb69c7638991c49dad39e414585db13f
Repository branch: master
System Description: Arch Linux

Configured using:
 'configure --prefix=/home/ergo/.local/ --with-mailutils --with-json
 --with-x-toolkit=gtk3 --with-xft --with-wide-int --with-modules
 --with-cairo --with-harfbuzz --with-native-compilation --with-pgtk'

Configured features:
ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ JPEG
JSON LCMS2 LIBSYSTEMD LIBXML2 MODULES NATIVE_COMP NOTIFY INOTIFY PDUMPER
PGTK PNG RSVG SECCOMP SOUND SQLITE3 THREADS TIFF TOOLKIT_SCROLL_BARS
WEBP XIM GTK3 ZLIB

Important settings:
  value of $LANG: en_US.UTF-8
  locale-coding-system: utf-8-unix

Major mode: Lisp Interaction

Minor modes in effect:
  global-auto-revert-mode: t
  xclip-mode: t
  electric-pair-mode: t
  flyspell-mode: t
  company-mode: t
  flycheck-mode: t
  diff-hl-margin-mode: t
  counsel-mode: t
  ivy-mode: t
  composable-mark-mode: t
  composable-mode: t
  repeat-mode: t
  xterm-mouse-mode: t
  minibuffer-depth-indicate-mode: t
  winner-mode: t
  save-place-mode: t
  delete-selection-mode: t
  savehist-mode: t
  global-display-fill-column-indicator-mode: t
  display-fill-column-indicator-mode: t
  global-display-line-numbers-mode: t
  display-line-numbers-mode: t
  which-key-mode: t
  override-global-mode: t
  eldoc-mode: t
  show-paren-mode: t
  mouse-wheel-mode: t
  file-name-shadow-mode: t
  context-menu-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  size-indication-mode: t
  column-number-mode: t
  line-number-mode: t
  indent-tabs-mode: t
  transient-mark-mode: t

Load-path shadows:
~/gits/emacs_clones/composable/composable-mark hides /home/ergo/.config/emacs/elpa/composable-20201024.1458/composable-mark
~/gits/emacs_clones/composable/composable hides /home/ergo/.config/emacs/elpa/composable-20201024.1458/composable
/home/ergo/.config/emacs/elpa/transient-20220130.1941/transient hides /home/ergo/.local/share/emacs/29.0.50/lisp/transient

Features:
(shadow sort mail-extr emacsbug sendmail misearch multi-isearch
mm-archive message yank-media rfc822 mml mml-sec epa derived epg rfc6068
epg-config gnus-util time-date mailabbrev gmm-utils mailheader
mail-utils gnutls network-stream url-cache crm debbugs-gnu add-log
debbugs soap-client mm-decode mm-bodies mm-encode url-http url-auth
mail-parse rfc2231 rfc2047 rfc2045 mm-util ietf-drums mail-prsvr url-gw
nsm rmc puny url url-proxy url-privacy url-expand url-methods
url-history url-cookie url-domsuf url-util url-parse auth-source
password-cache url-vars mailcap rng-xsd rng-dt rng-util xsd-regexp xml
autorevert filenotify xclip elec-pair flyspell-correct-ivy
flyspell-correct flyspell ispell company-semantic company-template
company-capf company flycheck json map find-func dash pcase
diff-hl-margin diff-hl-dired diff-hl log-view pcvs-util vc-dir ewoc vc
vc-dispatcher diff-mode thingatpt amx comp comp-cstr warnings s cape
counsel xdg advice xref project dired dired-loaddefs compile
text-property-search comint ansi-color swiper ivy-avy avy ivy flx
ivy-faces ivy-overlay colir color term/tmux term/xterm xterm init
composable composable-mark repeat xt-mouse edmacro kmacro mb-depth
simple-16-theme winner ring saveplace delsel savehist
display-fill-column-indicator display-line-numbers diminish which-key
cl-extra help-mode use-package use-package-ensure use-package-delight
use-package-diminish use-package-bind-key bind-key easy-mmode
use-package-core disp-table info ede/auto eieio-base cl-seq eieio seq
subr-x byte-opt bytecomp byte-compile cconv eieio-core cl-macs gv
eieio-loaddefs cl-loaddefs cl-lib tex-site rx slime-autoloads early-init
iso-transl tooltip eldoc paren electric uniquify ediff-hook vc-hooks
lisp-float-type elisp-mode mwheel term/pgtk-win pgtk-win term/common-win
tool-bar dnd fontset image regexp-opt fringe tabulated-list replace
newcomment text-mode lisp-mode prog-mode register page tab-bar menu-bar
rfn-eshadow isearch easymenu timer select scroll-bar mouse jit-lock
font-lock syntax font-core term/tty-colors frame minibuffer cl-generic
cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao
korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech
european ethiopic indian cyrillic chinese composite emoji-zwj charscript
charprop case-table epa-hook jka-cmpr-hook help simple abbrev obarray
cl-preloaded nadvice button loaddefs faces cus-face macroexp files
window text-properties overlay sha1 md5 base64 format env code-pages
mule custom widget keymap hashtable-print-readable backquote threads
dbusbind inotify dynamic-setting system-font-setting font-render-setting
cairo gtk pgtk lcms2 multi-tty make-network-process native-compile
emacs)

Memory information:
((conses 16 485623 57217)
 (symbols 48 20041 0)
 (strings 32 94957 25726)
 (string-bytes 1 2793996)
 (vectors 16 34589)
 (vector-slots 8 660977 133169)
 (floats 8 2581 578)
 (intervals 56 13070 1354)
 (buffers 992 12))