[slime-devel] Connection to Emacs lost. condition: junk in string

Kelly McDonald kelly at fammcdonald.net
Fri Jun 26 00:03:09 UTC 2009


Not sure if this is going to get threading hooked up correctly as I
just joined the list.

>Recently when I evaluate a relatively big function in slime (more that 6
>lines of code) I lose connection with swank.
>I tried Emacs with different versions and slime with different versions, so
>I don't know where else I can look for an error.
>Could it be something with network on this particular workstation?

I had this same behavior when evaluating a ~30k section of code.
After a bit of debugging , I found that

My setup:
sbcl 1.0.29 (both binary x86 and local built 64bit  - no threads enabled)
slime/swank from git (or was that cvs?)


1) Threads were not available
2) the read-packet was getting interrupted by another swank event, it
would read the packet length from the stream, but the first event had
not finished yet so it was reading random characters in the first
event to determine the length of the next packet and it crashed in
parse-integer
3) wait-for-event was being recalled before the event had completely decoded.
4) I had turned logging on and I had seen (READ: 003999 - 6 digit
packet length) (wait-for-event: ~s ~s~%) (READ: strjunk) being
printed, instead of (READ:003999) (READ:validpacket). (I added some
other logging points as well)
5) I think the problem was somewhere in wait-for-event/event-loop -
but I didn't totally understand the code enough (and didn't have time
enough) do debug any further.
6) I enabled threads in sbcl and the problem went away.

Sorry I could not provide a patch or more information.
If you have something for me to try, please let me know and I will test.
Kelly McDonald




More information about the slime-devel mailing list