From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Philipp Stephani Newsgroups: gmane.emacs.bugs Subject: bug#41333: 27.0.91; Spurious errors using TRAMP and auto-save-visited-mode Date: Sat, 16 May 2020 19:48:05 +0200 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="21807"; mail-complaints-to="usenet@ciao.gmane.io" To: 41333@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat May 16 19:59:59 2020 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 1ja16M-0005Xx-7X for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 16 May 2020 19:59:58 +0200 Original-Received: from localhost ([::1]:37204 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ja16L-0007St-AZ for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 16 May 2020 13:59:57 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:52398) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ja0vm-0007zT-RF for bug-gnu-emacs@gnu.org; Sat, 16 May 2020 13:49:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:58405) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ja0vm-0000G1-Hg for bug-gnu-emacs@gnu.org; Sat, 16 May 2020 13:49:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ja0vm-0001WQ-Ez for bug-gnu-emacs@gnu.org; Sat, 16 May 2020 13:49:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Philipp Stephani Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 16 May 2020 17:49:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 41333 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.15896512965796 (code B ref -1); Sat, 16 May 2020 17:49:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 16 May 2020 17:48:16 +0000 Original-Received: from localhost ([127.0.0.1]:41718 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ja0v1-0001VP-9x for submit@debbugs.gnu.org; Sat, 16 May 2020 13:48:16 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:52306) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ja0uy-0001VH-TN for submit@debbugs.gnu.org; Sat, 16 May 2020 13:48:13 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:52322) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ja0uy-0006Ni-Ip for bug-gnu-emacs@gnu.org; Sat, 16 May 2020 13:48:12 -0400 Original-Received: from mail-wr1-x42c.google.com ([2a00:1450:4864:20::42c]:40161) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ja0uw-00009C-EN for bug-gnu-emacs@gnu.org; Sat, 16 May 2020 13:48:12 -0400 Original-Received: by mail-wr1-x42c.google.com with SMTP id e16so7058307wra.7 for ; Sat, 16 May 2020 10:48:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=F0Or75CgHx/A1IL3plxzXzqj1FVDWgQ0hRIY56PooeA=; b=mNPoj4GoKVSEy7NjdwDazpjKZCHS0ZIBzIprzoATHPDrCME+gJXaTvyEkQngBDZQHW iqNZSyQE7+ikmSoDLxVuUjI6ytnQ/AysWofCIshu9BkaMqqEjiytoxYUiiW6qC7u3UI4 u7Xm3HSE4xA9KxMsPf0QW11PwoqL4Nzv9wa/g/LRT/RW8s6RS1Rp1ry8+ScePYBLyADt QEAd2NQ0fa5f4rzmYq/HP2D003CJAgbv6C+39ojSMKs2B35D9tKw6b4/YGs1pVG8U/Bk zmd7YqXSgrhTzC7m2zi6ezu3GBsyh5/oUa70RbKyaECpRf5PGvOeBoEN+/FSImjFKaj7 B/DQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=F0Or75CgHx/A1IL3plxzXzqj1FVDWgQ0hRIY56PooeA=; b=A1P4JN/CQG+cVUxYPADyfMEFxWK9oAP+I8Qeu3a21V2ljLVADKq8SnKKXIUH4herfb ICeVIdpNqMfEhKSoFe3Fv2ysxDl1I3WOHyreoHBLfQN+WR+VtY7aD+Y3HiLDgRidMpgo F/xu2X4Czi7KM/ea5ljfoLCPkRGaILeCTvpi8JxnJrv7u8N/5aQWVrs2HQIshil4HATB SFSGsKkaHtulkBUNeYqXSEQBZA7ZVx4LyjpAmzaLe3xZ2d2b5YrfTgSpBgLOtbiiHY0c N+Mt53fMOpmYagSMq+k7lqnybQuNzJdVhSQ+z3g5Z1rUgwf55jyipNY0okHbm1HgACAW tx+Q== X-Gm-Message-State: AOAM5315zg6Gk6h2CvhnM0qfvj8rwCE7gkNSNoMNGMbWYutuxuBQiXvh clBSqyzIrsHgBalZ0VomeOgxk3DJ X-Google-Smtp-Source: ABdhPJyDbvnEKO/2YJEuXgDvCPZjM/KKw+qBUTpzkLWqKRB4YrJHnruAkxV9okbcmuGI2uSZJPbuoQ== X-Received: by 2002:adf:e784:: with SMTP id n4mr11137765wrm.170.1589651288017; Sat, 16 May 2020 10:48:08 -0700 (PDT) Original-Received: from phst1 ([2a02:2455:2a2:100:c351:ffcc:5d8e:4288]) by smtp.gmail.com with ESMTPSA id l12sm9919832wrh.20.2020.05.16.10.48.06 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 16 May 2020 10:48:07 -0700 (PDT) Received-SPF: pass client-ip=2a00:1450:4864:20::42c; envelope-from=p.stephani2@gmail.com; helo=mail-wr1-x42c.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -17 X-Spam_score: -1.8 X-Spam_bar: - X-Spam_report: (-1.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action 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:180406 Archived-At: Unfortunately I don't have good reproduction steps; it seems this issue is somewhat subtle and requires a certain interaction between auto-save-visited-mode, and TRAMP, and various private customizations and before-save-hooks. When using auto-save-visited-mode for a file visited using TRAMP's SSH backend, I frequently get prompts that the file has changed outside of Emacs, even though that's not the case. The issue isn't easily reproducible. It doesn't happen for local files or for manual saving. Advising 'file-attributes' I noticed that 'file-attributes' for the file being saved would occasionally return wrong values (newer than visited-file-modtime) that actually can't come from TRAMP because they would contain fractional seconds (TRAMP only returns whole seconds for the modification time). I've never encountered this issue in Emacs 26, so it appears to be a regression. To help debugging, I've added the following advice: (define-advice file-attributes (:around (oldfun filename &optional id-forma= t)) (let ((attr (funcall oldfun filename id-format))) (message "ATTR (%s %s) =3D %s (%s)" filename id-format attr (find-file-name-handler filename 'file-attributes)) attr)) I've slightly redacted the output and replaced the hostname with HOSTNAME (assuming the exact host name doesn't matter): ATTR (/ssh:HOSTNAME:/tmp/aaa.txt nil) =3D (nil 1 145471 89939 (24256 6885 0= 0) (24256 7214 0 0) (24256 7214 0 0) 29 -rwx------ nil 19141457 (-1 . 2)) = (tramp-file-name-handler) Auto-saving... Saving file /ssh:HOSTNAME:/tmp/aaa.txt... ATTR (/ssh:HOSTNAME:/tmp/aaa.txt nil) =3D nil (tramp-file-name-handler) ATTR (/ssh:HOSTNAME:/tmp/aaa.txt string) =3D nil (tramp-file-name-handler) ATTR (/ssh:HOSTNAME:/tmp/ string) =3D (nil 1 phst group (24256 6885 0 0) (2= 4256 7214 0 0) (24256 7214 0 0) 29 -rwx------ nil 19141457 (-1 . 2)) (tramp= -file-name-handler) ATTR (/ssh:HOSTNAME:/tmp/ integer) =3D (t 45 root root (24256 8484 0 0) (24= 256 8583 0 0) (24256 8583 0 0) 258048 drwxrwxrwt t 19136513 (-1 . 2)) (tram= p-file-name-handler) ATTR (/ssh:HOSTNAME:/tmp/aaa.txt integer) =3D (nil 1 145471 89939 (24256 68= 85 0 0) (24256 7214 0 0) (24256 7214 0 0) 29 -rwx------ nil 19141457 (-1 . = 2)) (tramp-file-name-handler) [2 times] ATTR (/ssh:HOSTNAME:/tmp/aaa.txt nil) =3D (nil 1 145471 89939 (24256 6885 0= 0) (24256 7214 0 0) (24256 7214 0 0) 29 -rwx------ nil 19141457 (-1 . 2)) = (tramp-file-name-handler) ATTR (/ssh:HOSTNAME:(("=E2=80=98/tmp/=E2=80=99") 45 0 0 1589649700 15896497= 99 1589649799 258048 "drwxrwxrwt" t 19136513 -1) nil) =3D nil (tramp-file-n= ame-handler) ATTR (/tmp/tramp.arEAuT.txt nil) =3D (nil 1 145471 89939 (24256 8985 410615= 843000) (24256 8985 410615 843000) (24256 8985 410615 843000) 30 -rw-r----= - t 3151576 65025) (nil) Tramp: Encoding local file =E2=80=98/tmp/tramp.arEAuT.txt=E2=80=99 using = =E2=80=98base64-encode-region=E2=80=99...done Tramp: Decoding remote file =E2=80=98/ssh:HOSTNAME:/tmp/aaa.txt=E2=80=99 us= ing =E2=80=98base64 -d -i >%s=E2=80=99...failed Error running timer =E2=80=98save-some-buffers=E2=80=99: (file-error "Could= n=E2=80=99t find exit status of =E2=80=98nil=E2=80=99") In all cases, the file /tmp/aaa.txt on the remote machine already existed before. Some observations: - Several file-attributes invocations incorrectly return nil. (Or does TRAMP temporarily remove files to be written?) - Requesting attributes for the bogus file /ssh:HOSTNAME:(("=E2=80=98/tmp/= =E2=80=99") 45 0 0 1589649700 1589649799 1589649799 258048 "drwxrwxrwt" t 19136513 -1); i.e., TRAMP doesn't correctly parse the results to extract the filename. I've also captured debug output at TRAMP verbosity level 6 (for a different instance of the same problem, so the times are off): 19:00:18.033151 tramp-do-file-attributes-with-stat (5) # file attributes wi= th stat: /tmp/aaa.txt 19:00:18.034235 tramp-send-command (6) # echo are you awake 19:00:18.072182 tramp-wait-for-regexp (6) #=20 are you awake ///3fd45ca7347e13bbff44df1dfec2da79#$ 19:00:18.072847 tramp-send-command (6) # ( (test -e /tmp/aaa.txt || test -h= /tmp/aaa.txt) && (env QUOTING_STYLE=3Dlocale \stat -c '((/////%N/////) %h = %u %g %X %Y %Z %s /////%A///// t %i -1)' /tmp/aaa.txt | sed -e 's/"/\\"/g' = -e 's/\/\/\/\/\//"/g') || echo nil) 2>/dev/null; echo tramp_exit_status $? 19:00:18.119306 tramp-wait-for-regexp (6) #=20 (("=E2=80=98/tmp/aaa.txt=E2=80=99") 1 145471 89939 1589648101 1589648202 15= 89648202 28 "-rwx------" t 19141457 -1) tramp_exit_status 0 ///3fd45ca7347e13bbff44df1dfec2da79#$ 19:00:23.172867 tramp-sh-handle-file-truename (4) # Finding true name for = =E2=80=98/ssh:HOSTNAME:/tmp/aaa.txt=E2=80=99 19:00:23.173701 tramp-send-command (6) # \readlink --canonicalize-missing /= tmp/aaa.txt 2>/dev/null; echo tramp_exit_status $? 19:00:23.181083 tramp-do-file-attributes-with-stat (5) # file attributes wi= th stat: /tmp/aaa.txt 19:00:23.182313 tramp-send-command (6) # ( (test -e /tmp/aaa.txt || test -h= /tmp/aaa.txt) && (env QUOTING_STYLE=3Dlocale \stat -c '((/////%N/////) %h = %u %g %X %Y %Z %s /////%A///// t %i -1)' /tmp/aaa.txt | sed -e 's/"/\\"/g' = -e 's/\/\/\/\/\//"/g') || echo nil) 2>/dev/null; echo tramp_exit_status $? 19:00:23.215904 tramp-wait-for-regexp (6) #=20 /tmp/aaa.txt tramp_exit_status 0 ///3fd45ca7347e13bbff44df1dfec2da79#$ 19:00:23.216710 tramp-convert-file-attributes (1) # Wrong type argument: "W= rong type argument", "listp /tmp/aaa.txt" /tmp/aaa.txt 19:00:24.221875 tramp-send-command (6) # test -e /tmp/ 2>/dev/null; echo tr= amp_exit_status $? 19:00:24.223171 tramp-wait-for-regexp (6) #=20 (("=E2=80=98/tmp/aaa.txt=E2=80=99") 1 145471 89939 1589648101 1589648202 15= 89648202 28 "-rwx------" t 19141457 -1) tramp_exit_status 0 ///3fd45ca7347e13bbff44df1dfec2da79#$ 19:00:24.228612 tramp-do-file-attributes-with-stat (5) # file attributes wi= th stat: /tmp/aaa.txt 19:00:24.229313 tramp-send-command (6) # ( (test -e /tmp/aaa.txt || test -h= /tmp/aaa.txt) && (env QUOTING_STYLE=3Dlocale \stat -c '((/////%N/////) %h = /////%U///// /////%G///// %X %Y %Z %s /////%A///// t %i -1)' /tmp/aaa.txt |= sed -e 's/"/\\"/g' -e 's/\/\/\/\/\//"/g') || echo nil) 2>/dev/null; echo t= ramp_exit_status $? 19:00:24.260094 tramp-wait-for-regexp (6) #=20 tramp_exit_status 0 ///3fd45ca7347e13bbff44df1dfec2da79#$ 19:00:24.260662 tramp-send-command-and-read (1) # End of file during parsin= g: End of file during parsing,=20 19:00:24.260947 tramp-send-command-and-read (1) # File error: =E2=80=98( (t= est -e /tmp/aaa.txt || test -h /tmp/aaa.txt) && (env QUOTING_STYLE=3Dlocale= \stat -c '((/////%N/////) %h /////%U///// /////%G///// %X %Y %Z %s /////%A= ///// t %i -1)' /tmp/aaa.txt | sed -e 's/"/\\"/g' -e 's/\/\/\/\/\//"/g') ||= echo nil)=E2=80=99 does not return a valid Lisp expression: =E2=80=98=E2= =80=99 19:00:24.264439 tramp-do-file-attributes-with-stat (5) # file attributes wi= th stat: /tmp/ 19:00:24.264845 tramp-send-command (6) # ( (test -e /tmp/ || test -h /tmp/)= && (env QUOTING_STYLE=3Dlocale \stat -c '((/////%N/////) %h /////%U///// /= ////%G///// %X %Y %Z %s /////%A///// t %i -1)' /tmp/ | sed -e 's/"/\\"/g' -= e 's/\/\/\/\/\//"/g') || echo nil) 2>/dev/null; echo tramp_exit_status $? 19:00:24.275420 tramp-wait-for-regexp (6) #=20 (("=E2=80=98/tmp/aaa.txt=E2=80=99") 1 "phst" "group" 1589648101 1589648202 = 1589648202 28 "-rwx------" t 19141457 -1) tramp_exit_status 0 ///3fd45ca7347e13bbff44df1dfec2da79#$ 19:00:24.278446 tramp-do-file-attributes-with-stat (5) # file attributes wi= th stat: /tmp/ 19:00:24.278720 tramp-send-command (6) # ( (test -e /tmp/ || test -h /tmp/)= && (env QUOTING_STYLE=3Dlocale \stat -c '((/////%N/////) %h %u %g %X %Y %Z= %s /////%A///// t %i -1)' /tmp/ | sed -e 's/"/\\"/g' -e 's/\/\/\/\/\//"/g'= ) || echo nil) 2>/dev/null; echo tramp_exit_status $? 19:00:24.318651 tramp-wait-for-regexp (6) #=20 (("=E2=80=98/tmp/=E2=80=99") 45 "root" "root" 1589647900 1589648202 1589648= 202 258048 "drwxrwxrwt" t 19136513 -1) tramp_exit_status 0 ///3fd45ca7347e13bbff44df1dfec2da79#$ 19:00:24.332659 tramp-sh-handle-file-truename (4) # Finding true name for = =E2=80=98/ssh:HOSTNAME:/tmp/aaa.txt=E2=80=99 19:00:24.332978 tramp-send-command (6) # \readlink --canonicalize-missing /= tmp/aaa.txt 2>/dev/null; echo tramp_exit_status $? 19:00:24.333462 tramp-wait-for-regexp (6) #=20 (("=E2=80=98/tmp/=E2=80=99") 45 0 0 1589647900 1589648202 1589648202 258048= "drwxrwxrwt" t 19136513 -1) tramp_exit_status 0 ///3fd45ca7347e13bbff44df1dfec2da79#$ 19:00:24.335735 tramp-sh-handle-file-truename (4) # True name of =E2=80=98/= tmp/aaa.txt=E2=80=99 is =E2=80=98(("=E2=80=98/tmp/=E2=80=99") 45 0 0 158964= 7900 1589648202 1589648202 258048 "drwxrwxrwt" t 19136513 -1)=E2=80=99 19:00:24.336918 tramp-do-file-attributes-with-stat (5) # file attributes wi= th stat: /home/phst/(("=E2=80=98/tmp/=E2=80=99") 45 0 0 1589647900 15896482= 02 1589648202 258048 "drwxrwxrwt" t 19136513 -1) 19:00:24.337678 tramp-send-command (6) # ( (test -e /home/phst/\(\(\"\=E2= =80=98/tmp/\=E2=80=99\"\)\ 45\ 0\ 0\ 1589647900\ 1589648202\ 1589648202\ 25= 8048\ \"drwxrwxrwt\"\ t\ 19136513\ -1\) || test -h /home/phst/\(\(\"\=E2=80= =98/tmp/\=E2=80=99\"\)\ 45\ 0\ 0\ 1589647900\ 1589648202\ 1589648202\ 25804= 8\ \"drwxrwxrwt\"\ t\ 19136513\ -1\)) && (env QUOTING_STYLE=3Dlocale \stat = -c '((/////%N/////) %h %u %g %X %Y %Z %s /////%A///// t %i -1)' /home/phst/= \(\(\"\=E2=80=98/tmp/\=E2=80=99\"\)\ 45\ 0\ 0\ 1589647900\ 1589648202\ 1589= 648202\ 258048\ \"drwxrwxrwt\"\ t\ 19136513\ -1\) | sed -e 's/"/\\"/g' -e '= s/\/\/\/\/\//"/g') || echo nil) 2>/dev/null; echo tramp_exit_status $? 19:00:24.371208 tramp-wait-for-regexp (6) #=20 /tmp/aaa.txt tramp_exit_status 0 ///3fd45ca7347e13bbff44df1dfec2da79#$ 19:00:24.371743 tramp-convert-file-attributes (1) # Wrong type argument: "W= rong type argument", "listp /tmp/aaa.txt" /tmp/aaa.txt 19:00:24.374570 tramp-sh-handle-write-region (3) # Encoding local file =E2= =80=98/tmp/tramp.2D3sJJ.txt=E2=80=99 using =E2=80=98base64-encode-region=E2= =80=99... 19:00:24.375639 tramp-sh-handle-write-region (3) # Encoding local file =E2= =80=98/tmp/tramp.2D3sJJ.txt=E2=80=99 using =E2=80=98base64-encode-region=E2= =80=99...done 19:00:24.376356 tramp-sh-handle-write-region (3) # Decoding remote file =E2= =80=98/ssh:HOSTNAME:/tmp/aaa.txt=E2=80=99 using =E2=80=98base64 -d -i >%s= =E2=80=99... 19:00:24.376923 tramp-send-command (6) # base64 -d -i >/tmp/aaa.txt <<'3849= 061d8d7701c21894129e56a7abdb' ICAgICBhIGEgYSBhCmEgIGFhCiggKQoKICAgYQo=3D 3849061d8d7701c21894129e56a7abdb 19:00:24.377966 tramp-wait-for-regexp (6) #=20 nil tramp_exit_status 0 ///3fd45ca7347e13bbff44df1dfec2da79#$ 19:00:24.378571 tramp-send-command (6) # echo tramp_exit_status $? 19:00:24.417274 tramp-wait-for-regexp (6) #=20 ///3fd45ca7347e13bbff44df1dfec2da79#$ 19:00:24.417459 tramp-send-command-and-check (1) # File error: Couldn=E2=80= =99t find exit status of =E2=80=98nil=E2=80=99 19:00:24.417918 tramp-sh-handle-write-region (3) # Decoding remote file =E2= =80=98/ssh:HOSTNAME:/tmp/aaa.txt=E2=80=99 using =E2=80=98base64 -d -i >%s= =E2=80=99...failed 19:00:24.430936 tramp-wait-for-regexp (6) #=20 tramp_exit_status 0 ///3fd45ca7347e13bbff44df1dfec2da79#$ 19:00:24.433067 tramp-sh-handle-file-truename (4) # True name of =E2=80=98/= tmp/aaa.txt=E2=80=99 is =E2=80=98=E2=80=99 19:00:24.434035 tramp-do-file-attributes-with-stat (5) # file attributes wi= th stat: /home/phst/ 19:00:24.434340 tramp-send-command (6) # ( (test -e /home/phst/ || test -h = /home/phst/) && (env QUOTING_STYLE=3Dlocale \stat -c '((/////%N/////) %h %u= %g %X %Y %Z %s /////%A///// t %i -1)' /home/phst/ | sed -e 's/"/\\"/g' -e = 's/\/\/\/\/\//"/g') || echo nil) 2>/dev/null; echo tramp_exit_status $? 19:00:24.481437 tramp-wait-for-regexp (6) #=20 (("=E2=80=98/home/phst/=E2=80=99") 120 145471 89939 1589647041 1589647848 1= 589647848 16384 "drwx------" t 25958919 -1) tramp_exit_status 0 ///3fd45ca7347e13bbff44df1dfec2da79#$ Again some observations: > Wrong type argument: "Wrong type argument", "listp /tmp/aaa.txt" Apparently TRAMP doesn't correctly wait for the stat result and seems to parse the output of readlink here? > End of file during parsing: End of file during parsing, Similary, TRAMP doesn't wait for the stat output and tries to parse an empty string. > True name of =E2=80=98/tmp/aaa.txt=E2=80=99 is =E2=80=98(("=E2=80=98/tmp/= =E2=80=99") 45 0 0 1589647900 > 1589648202 1589648202 258048 "drwxrwxrwt" t 19136513 -1)=E2=80=99 More out-of-order parsing: Here TRAMP attempts to parse the stat result as a filename. This is probably the source of the spurious filename starting with (("=E2=80=98tmp/=E2=80=99") ... > File error: Couldn=E2=80=99t find exit status of =E2=80=98nil=E2=80=99 More out-of-order passing? It seems likely that there are some bugs lurking in the TRAMP implementation, especially related to the out-of-order passing: apparently there are cases where TRAMP doesn't correctly wait for command output to arrive and then parses the output of the previous command. In GNU Emacs 27.0.91 (build 11, x86_64-pc-linux-gnu, GTK+ Version 3.24.13) of 2020-05-16 Repository revision: b4937f64cd97ff6bf93538987c014f8ea8ff9d34 Repository branch: emacs-27 Windowing system distributor 'The X.Org Foundation', version 11.0.12007000 System Description: Debian GNU/Linux rodete Recent messages: For information about GNU Emacs and the GNU system, type C-h C-a. Configured using: 'configure --enable-checking=3Dall --enable-gtk-deprecation-warnings --enable-gcc-warnings=3Dwarn-only --enable-check-lisp-object-type --with-mailutils --without-pop 'CFLAGS=3D-O0 -g3' LDFLAGS=3D-g3' Configured features: XPM JPEG TIFF GIF PNG SOUND DBUS GSETTINGS GLIB NOTIFY INOTIFY LIBSELINUX GNUTLS FREETYPE HARFBUZZ XFT ZLIB TOOLKIT_SCROLL_BARS GTK3 X11 XDBE XIM MODULES THREADS PDUMPER GMP Important settings: value of $LANG: en_US.UTF-8 locale-coding-system: utf-8-unix Major mode: Lisp Interaction Minor modes in effect: tooltip-mode: t global-eldoc-mode: t eldoc-mode: t electric-indent-mode: t mouse-wheel-mode: t tool-bar-mode: t menu-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: None found. Features: (shadow sort mail-extr emacsbug message rmc dired dired-loaddefs format-spec rfc822 mml easymenu mml-sec epa epg epg-config gnus-util rmail rmail-loaddefs text-property-search time-date mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils phst skeleton derived edmacro kmacro pcase ffap thingatpt url url-proxy url-privacy url-expand url-methods url-history url-cookie url-domsuf url-util url-parse auth-source cl-seq eieio eieio-core cl-macs eieio-loaddefs password-cache json map url-vars mailcap subr-x rx gnutls puny seq byte-opt gv bytecomp byte-compile cconv dbus xml compile comint ansi-color ring 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 dynamic-setting system-font-setting font-render-setting move-toolbar gtk x-toolkit x multi-tty make-network-process emacs) Memory information: ((conses 16 68847 7436) (symbols 48 8957 1) (strings 32 23860 1529) (string-bytes 1 771764) (vectors 16 13233) (vector-slots 8 180510 7252) (floats 8 25 28) (intervals 56 207 0) (buffers 1000 12)) --=20 Google Germany GmbH Erika-Mann-Stra=C3=9Fe 33 80636 M=C3=BCnchen Registergericht und -nummer: Hamburg, HRB 86891 Sitz der Gesellschaft: Hamburg Gesch=C3=A4ftsf=C3=BChrer: Paul Manicle, Halimah DeLaine Prado If you received this communication by mistake, please don=E2=80=99t forward= it to anyone else (it may contain confidential or privileged information), please erase all copies of it, including all attachments, and please let the sender know it went to the wrong person. Thanks.