GNU bug report logs - #42706
27.0.50; commands breaking on unreachable remote directory

Previous Next

Package: emacs;

Reported by: Ken Raeburn <raeburn <at> redhat.com>

Date: Tue, 4 Aug 2020 13:57:02 UTC

Severity: normal

Found in version 27.0.50

To reply to this bug, email your comments to 42706 AT debbugs.gnu.org.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#42706; Package emacs. (Tue, 04 Aug 2020 13:57:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Ken Raeburn <raeburn <at> redhat.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Tue, 04 Aug 2020 13:57:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Ken Raeburn <raeburn <at> redhat.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 27.0.50; commands breaking on unreachable remote directory
Date: Tue, 04 Aug 2020 09:55:04 -0400
A couple commands I've tried have failed if the default directory for a
buffer is remote and the server is unreachable. One was list-buffers
when one of my buffers (not the current one) was visiting a remote file
on a server that was down.  The other was cd, when the current default
directory was remote. In both cases, the file-error error ("Timeout
reached") was raised and not trapped. The cd command did not get to the
point of prompting me for a new directory. Stack traces are below. Looks
like a common failure point is calling abbreviate-file-name, which calls
file-name-case-insensitive-p, which under tramp/scp runs remote
commands, or tries to.

While file-name-case-insensitive-p can't guarantee a reasonable answer
in the case of a failed connection, it looks to me like
abbreviate-file-name could probably fail safe by assuming case
sensitivity and continuing on.

I haven't noticed these problems before trying Emacs 27 pretests, but I
may have just gotten lucky.

Debugger entered--Lisp error: (file-error "Timeout reached, see buffer ‘*tramp/scp root <at> thomp...")
  signal(file-error ("Timeout reached, see buffer ‘*tramp/scp root <at> thomp..."))
  tramp-signal-hook-function(file-error ("Timeout reached, see buffer ‘*tramp/scp root <at> thomp..."))
  signal(file-error ("Timeout reached, see buffer ‘*tramp/scp root <at> thomp..."))
  tramp-maybe-open-connection((tramp-file-name "scp" "root" nil "[host]" nil "[path]..." nil))
  tramp-send-command((tramp-file-name "scp" "root" nil "[host]" nil "[path]..." nil) "test 0 2>/dev/null; echo tramp_exit_status $?")
  tramp-send-command-and-check((tramp-file-name "scp" "root" nil "[host]" nil "[path]..." nil) "test 0")
  tramp-get-test-command((tramp-file-name "scp" "root" nil "[host]" nil "[path]..." nil))
  tramp-run-test("-d" "[scp-path]")
  tramp-sh-handle-file-directory-p("[scp-path]")
  apply(tramp-sh-handle-file-directory-p "[scp-path]")
  tramp-sh-file-name-handler(file-directory-p "[scp-path]")
  apply(tramp-sh-file-name-handler file-directory-p "[scp-path]")
  tramp-file-name-handler(file-directory-p "[scp-path]")
  file-directory-p("[scp-path]")
  apply(file-directory-p "[scp-path]")
  tramp-archive-run-real-handler(file-directory-p ("[scp-path]"))
  tramp-archive-file-name-handler(file-name-case-insensitive-p "[scp-path]")
  file-name-case-insensitive-p("[scp-path]")
  abbreviate-file-name("[scp-path]")
  Buffer-menu--pretty-file-name("[scp-path]")
  list-buffers--refresh(nil #<buffer *scratch*>)
  list-buffers-noselect(nil)
  list-buffers(nil)
  funcall-interactively(list-buffers nil)
  call-interactively(list-buffers nil nil)
  command-execute(list-buffers)

Debugger entered--Lisp error: (file-error "Timeout reached, see buffer ‘*tramp/scp root <at> thomp...")
  signal(file-error ("Timeout reached, see buffer ‘*tramp/scp root <at> thomp..."))
  tramp-signal-hook-function(file-error ("Timeout reached, see buffer ‘*tramp/scp root <at> thomp..."))
  signal(file-error ("Timeout reached, see buffer ‘*tramp/scp root <at> thomp..."))
  tramp-maybe-open-connection((tramp-file-name "scp" "root" nil "[host]" nil "[path]..." nil))
  tramp-send-command((tramp-file-name "scp" "root" nil "[host]" nil "[path]..." nil) "test 0 2>/dev/null; echo tramp_exit_status $?")
  tramp-send-command-and-check((tramp-file-name "scp" "root" nil "[host]" nil "[path]..." nil) "test 0")
  tramp-get-test-command((tramp-file-name "scp" "root" nil "[host]" nil "[path]..." nil))
  tramp-run-test("-d" "[scp-path]")
  tramp-sh-handle-file-directory-p("[scp-path]")
  apply(tramp-sh-handle-file-directory-p "[scp-path]")
  tramp-sh-file-name-handler(file-directory-p "[scp-path]")
  apply(tramp-sh-file-name-handler file-directory-p "[scp-path]")
  tramp-file-name-handler(file-directory-p "[scp-path]")
  file-directory-p("[scp-path]")
  apply(file-directory-p "[scp-path]")
  tramp-archive-run-real-handler(file-directory-p ("[scp-path]"))
  tramp-archive-file-name-handler(file-name-case-insensitive-p "[scp-path]")
  file-name-case-insensitive-p("[scp-path]")
  abbreviate-file-name("[scp-path]")
  read-file-name-default("Change default directory: " "[scp-path]" "[scp-path]" t nil file-directory-p)
  read-file-name("Change default directory: " "[scp-path]" "[scp-path]" t nil file-directory-p)
  read-directory-name("Change default directory: " "[scp-path]" "[scp-path]" t)
  byte-code(... [cd-path default-directory #f(compiled-function () #<bytecode 0x1fd5f0c2e0f3>) nil make-byte-code 0 ... vconcat vector [remove-hook minibuffer-setup-hook] 3 ... [remove-hook minibuffer-setup-hook] add-hook minibuffer-setup-hook parse-colon-path getenv "CDPATH" "./" read-directory-name "Change default directory: " t] 10)
  call-interactively(cd record nil)
  command-execute(cd record)
  execute-extended-command(nil "cd" "cd")
  funcall-interactively(execute-extended-command nil "cd" "cd")
  call-interactively(execute-extended-command nil nil)
  command-execute(execute-extended-command)



In GNU Emacs 27.0.50 (build 1, x86_64-pc-linux-gnu, X toolkit, Xaw scroll bars)
 of 2019-11-18 built on crash
Repository revision: ed52618e707682e812002c98b99efe4baf43e1ca
Repository branch: master
Windowing system distributor 'Fedora Project', version 11.0.12006000
System Description: Fedora 31 (Workstation Edition)

Recent messages:
Timeout reached, see buffer ‘*tramp/scp root <at> thompson-01.permabit.lab.eng.bos.redhat.com*’ for details
Tramp: Waiting for prompts from remote shell...failed
Tramp: Opening connection for root <at> thompson-01.permabit.lab.eng.bos.redhat.com using scp...failed
Entering debugger...
Mark set [4 times]
Back to top level
Entering debugger...
Back to top level
uncompressing files.el.gz...done
GNU Emacs 27.0.50 (build 1, x86_64-pc-linux-gnu, X toolkit, Xaw scroll bars) of 2019-11-18
Quit
Configured using:
 'configure --prefix=/home/raeburn/dev/emacs/Install-20191118T1638'

Configured features:
XPM JPEG TIFF GIF PNG RSVG SOUND GPM DBUS GSETTINGS GLIB NOTIFY INOTIFY
LIBSELINUX GNUTLS LIBXML2 FREETYPE HARFBUZZ XFT ZLIB TOOLKIT_SCROLL_BARS
LUCID X11 XDBE XIM MODULES THREADS LIBSYSTEMD JSON PDUMPER LCMS2 GMP

Important settings:
  value of $LANG: en_US.UTF-8
  value of $XMODIFIERS: @im=ibus
  locale-coding-system: utf-8-unix

Major mode: Lisp Interaction

Minor modes in effect:
  async-bytecomp-package-mode: t
  shell-dirtrack-mode: t
  rcirc-track-minor-mode: t
  display-time-mode: t
  desktop-save-mode: t
  global-edit-server-edit-mode: t
  which-function-mode: t
  icomplete-mode: t
  global-hi-lock-mode: t
  hi-lock-mode: t
  tooltip-mode: t
  global-eldoc-mode: t
  eldoc-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  tab-bar-mode: t
  file-name-shadow-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
  line-number-mode: t
  transient-mark-mode: t

Load-path shadows:
/home/raeburn/elisp/with-editor hides /home/raeburn/.emacs.d/elpa/with-editor-20181113.1845/with-editor

Features:
(shadow emacsbug debug backtrace thai-util thai-word lao-util enriched
view tramp-archive tramp-gvfs zeroconf dbus org-table eww mm-url
url-queue ansible-doc ansible poly-ansible poly-ansible-jinja2-filters
polymode poly-lock polymode-base polymode-weave polymode-export
polymode-compat polymode-methods polymode-core polymode-classes
eieio-custom color term/xterm xterm vc vc-dispatcher eieio-opt speedbar
sb-image ezimage dframe mh-compat mh-buffers mh-loaddefs gnus-registry
registry eieio-base gnus-salt gnus-topic gnus-uu yenc gnus-vm ispell
tramp-cmds f s vagrant-tramp dash autoload lisp-mnt tar-mode arc-mode
archive-mode url-http url-gw url-cache url-auth mm-archive smiley
gnus-cite gnus-async gnus-bcklg qp gnus-ml mailalias smtpmail sendmail
sort grep mail-extr tabify cus-edit help-fns radix-tree cl-print ielm pp
misearch multi-isearch with-editor async-bytecomp async thingatpt
tramp-cache nndraft nnmh nnfolder utf-7 gnutls gnus-agent gnus-srvr
gnus-score score-mode nnvirtual gnus-msg nntp gnus-cache network-stream
nsm add-log mule-util cl-extra help-mode rst compile sh-script
executable face-remap conf-mode adaptive-wrap systemtap-mode cc-langs
cc-awk cperl-mode perl-mode python tramp-sh tramp tramp-loaddefs
trampver tramp-integration files-x tramp-compat ls-lisp smerge-mode diff
make-mode org-rmail org-mhe org-irc org-info org-gnus nnir org-docview
doc-view jka-compr image-mode exif org-bibtex bibtex org-bbdb org-w3m
org-element avl-tree generator org org-macro org-footnote org-pcomplete
org-list org-faces org-entities noutline outline org-version ob-shell
shell pcomplete ob-emacs-lisp ob ob-tangle org-src ob-ref ob-lob
ob-table ob-keys ob-exp ob-comint ob-core ob-eval org-compat org-macs
org-loaddefs find-func cal-menu calendar cal-loaddefs ruby-mode smie
vc-git diff-mode cc-mode cc-fonts cc-guess cc-menus cc-cmds cc-styles
cc-align cc-engine cc-vars cc-defs yaml-mode rcirc gnus-art mm-uu
mml2015 mm-view mml-smime smime dig gnus-sum url url-proxy url-privacy
url-expand url-methods url-history mailcap shr url-cookie url-domsuf
url-util svg xml dom gnus-group gnus-undo gnus-start gnus-cloud nnimap
nnmail mail-source utf7 netrc nnoo parse-time iso8601 gnus-spec gnus-int
gnus-range message rmc puny dired dired-loaddefs format-spec rfc822 mml
mml-sec epa derived epg epg-config mm-decode mm-bodies mm-encode
mail-parse rfc2231 mailabbrev gmm-utils mailheader gnus-win gnus
nnheader gnus-util rmail rmail-loaddefs rfc2047 rfc2045 ietf-drums
text-property-search time-date mail-utils mm-util mail-prsvr wid-edit
time desktop frameset cus-start cus-load kr-init edit-server iso-transl
advice smart-quotes easy-mmode which-func imenu icomplete server term
disp-table comint ansi-color ehelp ring hi-lock finder-inf info package
easymenu browse-url url-handlers url-parse auth-source cl-seq eieio
eieio-core cl-macs eieio-loaddefs password-cache json subr-x map
url-vars seq byte-opt gv bytecomp byte-compile cconv cl-loaddefs cl-lib
tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type
mwheel term/x-win x-win term/common-win x-dnd tool-bar dnd fontset image
regexp-opt fringe tabulated-list replace newcomment text-mode elisp-mode
lisp-mode prog-mode register page tab-bar menu-bar rfn-eshadow isearch
timer select scroll-bar mouse jit-lock font-lock syntax facemenu
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 charscript charprop
case-table epa-hook jka-cmpr-hook help simple abbrev obarray
cl-preloaded nadvice loaddefs button faces cus-face macroexp files
text-properties overlay sha1 md5 base64 format env code-pages mule
custom widget hashtable-print-readable backquote threads dbusbind
inotify lcms2 dynamic-setting system-font-setting font-render-setting
x-toolkit x multi-tty make-network-process emacs)

Memory information:
((conses 16 12331780 1040220)
 (symbols 48 58354 53)
 (strings 32 582500 68903)
 (string-bytes 1 19352387)
 (vectors 16 94302)
 (vector-slots 8 1829418 441520)
 (floats 8 634 525)
 (intervals 56 1342629 27544)
 (buffers 1000 1630))





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#42706; Package emacs. (Sun, 13 Mar 2022 09:31:02 GMT) Full text and rfc822 format available.

Message #8 received at 42706 <at> debbugs.gnu.org (full text, mbox):

From: Michael Albinus <michael.albinus <at> gmx.de>
To: Jim Porter <jporterbugs <at> gmail.com>
Cc: Ken Raeburn <raeburn <at> redhat.com>, 42706 <at> debbugs.gnu.org
Subject: bug#42706: 27.0.50; commands breaking on unreachable remote
 directory [was: Re: master 3e4d4f472d: Rework `abbreviate-file-name' in
 Tramp]
Date: Sun, 13 Mar 2022 10:30:34 +0100
[Changing subject and adding 42706 <at> debbugs.gnu.org to Cc]

Jim Porter <jporterbugs <at> gmail.com> writes:

Hi Jim,

> On Fri, Mar 11, 2022 at 12:45 AM Michael Albinus <michael.albinus <at> gmx.de> wrote:
>> Btw, while you're at this: could you have a look on bug#42706? It is
>> related to abbreviate-file-name and Tramp. When it was reported,
>> abbreviate-file-name wasn't handled by Tramp, so nobody did any action
>> :-( But now we have tramp-handle-abbreviate-file-name and could do
>> something, perhaps.
>
> I tried, but wasn't able to reproduce that issue on Emacs 27.2, so
> it's hard to say if things are any better in Emacs 29. I tried by
> starting "emacs -Q", opening a file over Tramp, and then turning off
> my remote device. While I couldn't connect to the remote host anymore
> (as you'd expect), `list-buffers' seemed to work fine, and `cd' showed
> the prompt correctly. Actually trying to change the directory timed
> out, but that's normal.

Well I've tried to reproduce the scenario of the OP with Emacs 27.2,
which wasn't trivial due to missing information. However, the backtraces
show invocation of tramp-archive-file-name-handler, which gave me the
idea, that the OP has applied a remote file name archive, and from
within that the problems happened.

Remote file name archives, handled by Tramp, are possible only on a
local GNU/Linux machine. See the Tramp manual for a description.

In order to reproduce the problem, I have opened a file archive 123.tar
on a remote machine, like

emacs -Q /scp:user <at> host:tmp/123.tar/

The trailing slash is important. Afterwards, I have disabled the
LAN/WLAN connection of my machine. Then I have called "M-x cd" in that
buffer.

With both Emacs 27.2 and Emacs 29 (from git master) I've got the same
backtrace as reported by the OP. So I guess we have to dig somewhere
else.

> - Jim

Thanks for your investigation, and best regards, Michael.




This bug report was last modified 3 years and 94 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.