-
Notifications
You must be signed in to change notification settings - Fork 142
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unexpected reply #385
Comments
Yuck, this isn't good. I see this once in a while , too, but not nearly "every few minutes". I see it once a week at most. It's very hard to pin down. You can give me some help tho:
João |
@joaotavora I would say every 20 minutes to an hour, so not that easy to bisect. Is there anything else I can do to help pin it down? |
In principle, with the Elisp evaluation model I know, this shouldn't matter, but you can try with this patch:
|
The code path that I'm thinking about should be equivalent to SLIME's, so I find this very strange. Maybe you upgraded Emacs versions a month ago or something like that? |
I am on Arch Linux, so get frequent updates, yes. Currently on Emacs 27.1 |
That's fairly recent, and what I use as well (actually I use master). Maybe you can downgrade momentarily to 26.3 or keep it besides Emacs 27. Anyway, this seems to be Eldoc/Autodoc exclusive, so shooshing those errors in those circunstances could be an option. But I'd like to get to the bottom of it. Please try my patch for a while. |
Actually, come to think of it, this started happening when I upgraded from 27 to 27.1 back when it was released in August, but I also updated all my Emacs packages at the same time, so... |
From 27 to 27.1? That's odd. Were you using a pretest? Or did you mean 26? |
Let me consult my Linux package update log...
Ah, sorry. So it happened with 26.3 -> 27.1. |
Nice linux distro btw. Someday I'll switch myself, what "flavor" of Arch, if any, are you on? |
Plain old Arch Linux. |
Anyway, so as you can see by my patch, my suspicion/working hypothesis is that 27.1 somehow allowed (contrary to 26.3) EDIT: this working hypothesis is now known invalid. The real reason is that process-send-string is sometimes silently exiting non-locally when called from a timer. |
Sure, I am upgrading my packages right now, then I will try your patch, and perhaps Emacs HEAD. Thanks |
Actually, I wouldn't do that. I would try one thing at a time. |
Starting with the patch, maybe. |
Yes, I know. I have some other outstanding Emacs issues to take care of too, so first I'm updating packages and inspecting all that. I have a backup on my NAS of the previous state in case things go awful, and to try your patch in isolation. |
@joaotavora With your patch, eldoc no longer gives any hints at all. |
In looking over my Emacs config though I have |
* sly.el (sly-dispatch-event): Move sly-send a line below.
Wow, that is something. I've pushed a branch with the patch. Please point your copy of SLY to it, make sure you don't have any stale .elc files, and try to reproduce the problem with a bare Emacs. |
By problem I mean any of the two problems, the error or the missing ElDoc. By bare Emacs I mean Emacs -Q. |
eldoc seems to be working, even though nothing appears to be different from that patch and what i changed. And I always delete elc files between each run in these types of cases. Will keep an eye out for the error now |
I spoke too soon. eldoc stopped printing out signatures in the minibuffer. |
Michael Fiano <notifications@github.com> writes:
I spoke too soon. eldoc stopped printing out signatures in the minibuffer.
I reproduced this and am looking at it, it's the converse of the error
you got earlier. You can likely get out of this "no-ElDoc" state with
`M-x sly-forget-pending-events`. If you have the standard SLY mode-line
you should have spotted a continuation counter stuck at "1" when ElDoc
stopped working.
João
|
* sly.el (sly-dispatch-event): handle mysterious sly-send non-local exits.
Michael Fiano <notifications@github.com> writes:
I spoke too soon. eldoc stopped printing out signatures in the minibuffer.
I've pushed another commit to the branch that I'd with you'd try out.
For the record this is related to some mysterious non-local exits when
process-send-string is called from within a timer. This is likely an
Emacs bug.
It also connects to another strange behaviour I observed recently.
Anyway, try out the patch and let me know.
Cheers.
|
I've pinned this down to a likely Emacs bug. Here is the report I made: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=45117 @mfiano The most recent commit will probably be the end of it regardless of whether the problem is fixed in Emacs or not, but I'd still appreciate that you'd test it. |
Interesting. Nice debugging there! I will be using your latest commit and let you know how it goes. P.S. South Bank Common Lisp is not a thing :) |
Nah-ah!!!, it's a thing I got here that noone knows and only I use! 🤦 🤦 |
Unfortunately, your latest changes didn't solve the issue:
|
Likely you didn't compile them, or have a stale elc.. I'll look later but you can substitute the latest by the |
I made sure to remove all packages, not just ELC, but everything, and did a checkout of that specific branch for Sly. |
I still think you missed something. I'll push a version with a little bit more debugging info and then we can check Messages to be sure. |
Thinking x2 about it, there is indeed a possibility of unexpected reply, I just never got it (and I got a lot of observations of the bug). but lets run this version so we get more feedback. |
By the way, you don't have to completely purge everything to get this, just go to the sly.el file and re-evaluate that definition |
Give me a few minutes to finish up and I will try. I will say though, that the previous patch seemed to result in the error far less often, or it could just be the computer gods laughing at me. In any case, I will run with the latest for a while and report what I see. |
After a few minutes, this is in
|
And also some "unexpecteds?" |
Negative |
let's wait though, I think eventually you'll bump into one. |
I copied some code I already wrote, typing as fast as I could, as that seems to generate them quickly:
|
yeah, with a short |
No unexpecteds with the latest patch. |
(the latest patch is the same as the one before, btw :-) just more debugging info) |
Anyway, keep testing, I think you'll reach an unexpected or two, by my calculations, it's certainly possible, and likely that was happening before. It would also explain the perceived decrease in frequency you mentioned. |
When you confirm this, I'll have a patch to fix those |
Sure I will keep testing. Just to be clear:
|
By the way. It's great that you use SLY so intensively and take the time to report these bugs and help me debug them. Very appreciated 👌 |
So, it's much more bearable now at least. Oh no problem at all. Thank you for being such a great maintainer, because I know you're a very busy person. |
Right, the debug message is just a tracer. You can comment it out. |
Yep:
|
After some very intensive investigation, I came to the correct fix. I shall be ⚡ if this doesn't fix it. Problem was in Emacs, but in Elisp and not in C, thankfully. |
Excellent. Thank you for all your work! |
This started happening a few months ago, and I'm just getting around to reporting it because it is quite annoying. Every few minutes, this error is invoked, which pauses Emacs for a good 5 seconds while I am typing.
Here's another occurence in my Messages buffer:
and another:
and another:
and one more from today:
The text was updated successfully, but these errors were encountered: