slyblime icon indicating copy to clipboard operation
slyblime copied to clipboard

Race condition with `:read-mode`

Open s-clerc opened this issue 4 years ago • 1 comments

It seems like for some reason, there is a desynchronisation between setting the read-mode and receiving input, and eventually Slynk decides it just wants to show a prompt and then we have a problem but I'm not exactly clear why.

How to reproduce:

  1. Start any function which continually demands (read-line) and keeps demanding it on no-input
  2. Press and hold enter until the error appears.

Log files:

Earlier up

b'(:channel-send 1 (:set-read-mode :read))'


b'000026(:EMACS-CHANNEL-SEND 1 (:PROCESS "\n"))'
b'(:channel-send 1 (:set-read-mode :finished-reading))'

Just before the error:

b'000026(:EMACS-CHANNEL-SEND 1 (:PROCESS "\n"))'
b'(:channel-send 1 (:set-read-mode :read))'
b'(:channel-send 1 (:set-read-mode :finished-reading))'


b'000025(:EMACS-CHANNEL-SEND 1 (:PROCESS ""))'
write: [...]
b'(:channel-send 1 (:set-read-mode :read))'
b'(:channel-send 1 (:set-read-mode :finished-reading))'
b'(:channel-send 1 (:prompt "COMMON-LISP-USER" "CL-USER" 1 "#<END-OF-FILE #x30200190788D>"))'


b'000025(:EMACS-CHANNEL-SEND 1 (:PROCESS ""))'

s-clerc avatar Apr 18 '20 22:04 s-clerc

One theory is that after process command is sent, no other things must be sent to be processed until finished-read is sent.

s-clerc avatar Apr 19 '20 00:04 s-clerc