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

From: Michael Albinus <[email-masked]>
Date: Wed, 20 Nov 2024 10:08:45 +0100

Alex Hutcheson via "Bug reports for GNU Emacs, the Swiss army knife of
text editors" <[email-masked]> writes:

Hi Alex,

> It seems like the root cause of this issue (a deadlock due to 2 Emacs
> functions waiting on different output from the same socket) was fixed
> as part of bug#61350.
>
> Can the tramp-compile-disable-ssh-controlmaster-options workaround now
> be removed?

Well, we have indeed some code in tramp-accept-process-output, which
should improve the situation.

However, before I remove the workaround, it should be tested whether the
problem described in bug#45518 is fixed indeed. Going through the
discussion, it requires a complex test infrastructure I'm not able to
reproduce ATM (for example, my Ubuntu machine has died. RIP.)

If somebody could remove the workaround from tramp-integration.el, and
test the recipe given there, I would be more confident that we can
remove the workaround finally.

> Some of the users in my org have complained about additional SSH
> connections being created by compilation functions.

As mitigation, they can call after loading compile.el and tramp.el

--8<---------------cut here---------------start------------->8---
(remove-hook 'compilation-mode-hook
             #'tramp-compile-disable-ssh-controlmaster-options)
--8<---------------cut here---------------end--------------->8---

Best regards, Michael.