Subject: Re: bug#45518: Ctrl-G Fails to Interrupt Hung Tramp Remote-Compile in Emacs 27.1

From: Duncan Greatwood <[email-masked]>
Date: Thu, 28 Jan 2021 21:15:38 -0800

Hi Michael -

Got back to this.

Good news! The patch for compile.el, applied to Emacs 27.1, fixes the issue
of the tramp window hanging in my test cases, running tramp from MAC.

There is still one tramp hanging issue I saw in my testing. This is a much
less serious issue (pressing ctrl-G once "unhangs"), but thought I'd
mention it here. LMK if you'd prefer a separate bug report and I'll create
one.

If, during a "make" via tramp with many syntax errors, you click on one of
the early errors produced in the tramp window, the compile pauses and the
source window does not move to the error. Emacs appears to hang.

If you press ctrl-G, then the compile continues, no problem, until
eventually exiting.

I also noticed the same effect if I just try and type a few characters into
the source file while the make is going on - the compile hangs, and emacs
appears to hang, until I press ctrl-G to allow it to continue.

When I perform this operation directly in emacs on the ubuntu machine (i.e.
without using tramp), clicking on an early error message while "make"
continues to run does not hang anything - the "make" process continues and
meanwhile (even before make completes) the source window moves to the error
that I clicked on. Likewise I can type characters into the test.cpp source
file during make without causing a hang.

I am enclosing another test.cpp with even more errors to make it easier to
catch this issue (you can just drop it into the src directory you were
using for the last setup, overwriting the prior test.cpp).

By the way, this time, the issue reproduces for me regardless of whether I
am running the emacs-tramp on a Mac or on an ubuntu client; as you'll
recall, the target host is ubuntu in both cases.

Thanks again for fixing the main hanging issue!
Duncan.

On Tue, Jan 12, 2021 at 7:02 AM Michael Albinus <[email-masked]>
wrote:

> Duncan Greatwood <[email-masked]> writes:
>
> Hi Duncan,
>
> > Meanwhile, good luck with debugging these bug#45518 issues.
>
> Finally, I nailed it down. In the (remote) compilation process, there is
> a process filter, which calls `file-truename' if it detects an
> error. This works one or two times, but then the (remote) compilation
> process comes in conflict with the (remote) Tramp process responsible
> for `file-truename'.
>
> The following patch has fixed the issue for me on my FreeBSD machine. It
> is on top of Emacs' git master; but likely it works also for your Emacs
> 27 (not tested by me). Could you check, whether this helps you?
>
> > Thanks again!
>
> Best regards, Michael.
>