Subject: bug#57800: TRAMP insert-file-contents now fails for regions

From: Paul Pogonyshev <[email-masked]>
Date: Fri, 30 Sep 2022 10:49:27 +0200

Happened again. See attached `BACKTRACE' and `TRAMP-LOG' generated after
evalling `(setf tramp-verbose 10)'.

Note this suspicious entry in the log:
10:26:36.864700 tramp-get-remote-tmpdir (1) # File error: Directory
/ssh:USER@HOST#22222:/ssh:USER@HOST#22222:/tmp not accessible

Mentioned Git commit cannot be found, because I build Emacs with a few
minor local changes. I can assure you they have nothing to do with TRAMP.
The build is from 14th of September, so upstream commit number should be
around 997284d2a5 or so.

I will keep this Emacs instance around in case you have questions.

Paul

On Thu, 29 Sept 2022 at 19:39, Michael Albinus <[email-masked]>
wrote:

> Paul Pogonyshev <[email-masked]> writes:
>
> Hi Paul,
>
> > No, the bug is not reproducible all the time. I have switched to Emacs
> > 28 since then, as this breaks functionality important for me. Now
> > tried to run 29 again, but it doesn't happen anymore, neither with
> > `-Q' nor without. Also cannot find a backtrace for the same reason
> > now.
> >
> > From the reproducing early today I remember that restarting Emacs
> > doesn't help - or is at least random, since now a newly started Emacs
> > doesn't exhibit this problem. It feels like the problem is in some
> > cache and the cache appears to be persistent (cross-Emacs), if TRAMP
> > uses something like that at all.
> >
> > The files I have noticed this on have names like
> > "/ssh:USER@HOST#22222:/...", i.e. using SSH backend and a non-standard
> > port, if that matters.
>
> Thanks, this might make a difference when caching files. Ports are used
> for creating a file name index in the cache, but I'm not certain they
> are always taken into account, in all dark corners of Tramp. Will analyze.
>
> However, it would be great if you could reproduce the bug somehow in an
> Emacs instance started with
>
> --8<---------------cut here---------------start------------->8---
> emacs -Q --eval '(setq tramp-verbose 10)'
> --8<---------------cut here---------------end--------------->8---
>
> If the problem happens, pls show the recipe to provoke, and the Tramp
> debug buffer.
>
> > Paul
>
> Best regards, Michael.
>