GNU bug report logs - #61350
Eglot over Tramp freezes with large project

Previous Next

Package: emacs;

Reported by: Thomas Koch <thomas <at> koch.ro>

Date: Tue, 7 Feb 2023 18:49:02 UTC

Severity: normal

Full log


View this message in rfc822 format

From: João Távora <joaotavora <at> gmail.com>
To: Michael Albinus <michael.albinus <at> gmx.de>
Cc: Thomas Koch <thomas <at> koch.ro>, 61350 <at> debbugs.gnu.org
Subject: bug#61350: Eglot over Tramp freezes with large project
Date: Tue, 7 Mar 2023 14:03:34 +0000
On Tue, Mar 7, 2023 at 1:52 PM Michael Albinus <michael.albinus <at> gmx.de> wrote:
> >      [In accept-process-output, ] If PROCESS is
> >      non-‘nil’ then this function does not return until some output has
> >                                                  [^^^^^^^^^^^^^^^^^]
> >      been received from PROCESS or PROCESS has closed the connection.
> >
> >
> > Note "some", not "all".  So while less common, I think the hang
> > can still happen.
> >
> > So maybe you meant:
> >
> >    (while (accept-process-output p 0 nil t))
> >
> > as suggested in that section?
>
> That was my first idea as well. But tramp-accept-process-output itself is
> called in a loop, so there's no difference in practice[1].

Hmmm, I still don't think they are equivalent.  In tramp-a-p-o with
TIMEOUT set to nil is where it normally hangs, right?  Well then, if
it does hang it will _not_ be called in a loop, by definition.

So the prior "hang removal" a-p-o call that you added must _still_
be made in a loop  itself to ensure that the outher existing inner
call:

  (accept-process-output tprocess nil nil t)

will not block due to the conditions you described.

Regardless, if this were my code. I'd put a big fat FIXME there
explaining that I want to remove the JUST-THIS-ONE, but I'm
afraid to :-)

> [1]: In theory, there's no difference between theory and practice. In
> practice, there is. :-)

hehe :-)

> Pls give my patch testing, in order to see whether Tramp still blocks.

I will do that later.  But 10 out of 10 successes in your testing is
a pretty solid indication that this is on the right track.

João




This bug report was last modified 2 years and 49 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.