-
Notifications
You must be signed in to change notification settings - Fork 11
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
Workaround for sentinel-related race condition #53
Comments
Thanks, Joseph! For our future reference, what seems to be happening is that this call to When that is so, the "hack" workaround starting in this form calls the sentinel first (currently, with the Then, since the sentinel was already called, and the process's buffer was already killed (by In our testing, this was only reproducible on Joseph's system, and then only 5-10% of the time. So it appears to be a race condition in Emacs's process-handling code. With respect to Also, the hack of calling All together, the fixes are twofold:
As well, this should probably be reported in an Emacs bug report (perhaps the one made a few years ago about this problem, which the hack was devised to work around). Unfortunately we still don't have a way to reproduce it consistently, but it seems that we can at least add to the problem description (i.e. that not only may it be that the process sentinel may not be called after the process has exited and all of its output has been accepted, but that it may be called after the top-level Elisp function returns--which may be fine for async requests, but not for synchronous ones (which may explain why we noticed and were able to reproduce the problem specifically with a synchronous request)). |
Thank you!! I'm no longer able to reproduce the issue on my machine in normal
No error signaled! The
Each time, it appears that the This is great!! Thank you!!! |
That's great news! Really, it's thanks to you for your help debugging it, and your persistence in wanting it fixed, despite the difficulty in reproducing it. Quick question, to be sure I didn't make a mistake: that warning appeared because you bound Also, had you used the |
Yes. Please also see #54. I'm not sure that submitting a PR from my remote's
No. Previously, I had repeatedly run Just now, I evaluted
|
Ok, so when you run that while loop with this branch's code, does Emacs stay in the loop until you press |
Yes, I have to manually stop the loop with |
I'll close this issue now, since the workaround is doing the right thing! |
That's good news! Leaving the issue open to remind me to do something about the Emacs bug report. :) |
plz-sentinel-race-condition-debug.txt
The text was updated successfully, but these errors were encountered: