Subject: bug#78572: 30.1; Tramp Project error message loop - File is missing

From: Michael Albinus <[email-masked]>
Date: Thu, 29 May 2025 09:13:07 +0200

Alexis Bakatine <[email-masked]> writes:

> Hello Michael,

Hi Alexis,

> All your explanations make sense now. But I'm still not sure if it's an
> issue with Tramp or Project? Trivially speaking, we could also ask Project
> to not look for vc related information over Tramp, but maybe some people
> rely on this? After all, I'm the first one to report that bug as far as I
> know.

Yes, a fix in project.el is also possible. But I have the impression
that it could happen in other integrations as well, so I'd prefer to fix
it in Tramp, if possible.

And you are "the first one to report that bug" because you use a sudo
connection as target for your project. Other Tramp methods don't
activate session timeouts; the error isn't visible immediately.

>> sudo's session timeout after ca 5 minutes due to inactivity on the
>> wire.
>
> This led me to investigate something. I told you it happened when
> using Tramp with sudo. But now I tested it WITHOUT sudo and I can
> reproduce the same errors. Here are the steps:
>
> 1. start an Emacs session with the command below (replace "x" with your own
>    server)
>
> # emacs -Q -l project --eval '(setopt project-vc-extra-root-markers (quote (".project")))' --eval '(setopt project-mode-line t)' '/ssh:x:'
>
> 2. after successfuly connecting do:
>    M-x tramp-cleanup-all-connections
>
> As soon as the connection is closed the same errors happen.

Sure. A session timeout does exactly this: call tramp-cleanup-connection.
See tramp-timeout-session.

Best regards, Michael.