Subject: bug#45117: 28.0.50; process-send-string mysteriously exiting non-locally when called from timer

From: Eli Zaretskii <[email-masked]>
Date: Tue, 08 Dec 2020 17:39:54 +0200

> From: João Távora <[email-masked]>
> Date: Tue, 08 Dec 2020 11:44:39 +0000
> 
> When using SLY Common Lisp IDE package for Emacs, a user has recently
> reported a strange intermittent error in SLY's asynchronous ElDoc
> function.  That function produces documenttion by querying a network
> process, a common technique in many such IDEs.  The user found that when
> reducing eldoc-idle-delay to 0.1 he could trigger the problem more
> often.
> 
> The original report lives at
> https://github.com/joaotavora/sly/issues/385.
> 
> It was triggered with Emacs 27.1, but I have also reproduced it with a
> recent master build.
> 
> After analysing the problem, I came to the conclusion that given certain
> mysterious conditions, process-send-string, which is called from SLY's
> `eldoc-documentation-function` will abruptly return non-locally even
> though no error or quit seems to have been signalled.

Can you elaborate on the evidence you found of this non-local exit?

And does "no error or quit" mean there's no trace of anything abnormal
in the *Messages* buffer?

One possible reason for non-local exit, besides signaling an error, is
stack overflow, although your description doesn't seem to indicate
that this is probable.

One other piece of information that could be relevant is that when
Emacs calls the timer function, it sets inhibit-quit non-nil.