slime + clisp + emacs: server disconnects

Stuart Little achirvasub at gmail.com
Tue Jul 23 13:59:39 UTC 2019


On Tue, Jul 23, 2019 at 04:52:00PM +0300, Stas Boukarev wrote:
> It says that Clisp crashes with a segfault, nothing to do with slime.
> 

It does say that, but a follow-up:

If I run through the procedure described at the end, of starting swank from within clisp, there are no crashes with swank-v2.20 (rather than 2.24).

I do get a warning in emacs to the effect that swank (2.20) and slime (2.24) versions don't match, but once I confirm that the crashes go away.

So this same clisp installation works fine with swank 2.20 and not swank 2.24, meaning that some change in the latter is what's causing this.

> On Tue, Jul 23, 2019 at 4:30 PM Stuart Little <achirvasub at gmail.com> wrote:
> >
> > I am running
> >
> > - emacs 26.2
> > - slime 2.24
> > - clisp 2.49
> >
> > on Linux.
> >
> > Running M-x slime in emacs with 'inferior-lisp-program' set to 'clisp' starts slime fine. I can usually run one evaluation (like say (+ 2 3)), whereupon any other action (pressing 'enter', say) will result in a disconnect:
> >
> > Lisp connection closed unexpectedly: connection broken by remote peer
> >
> > The inferior-lisp buffer reads as follows after the disconnect:
> >
> > --- buffer starts ---
> >
> > (progn (load "/home/chirvasitua/quicklisp/dists/quicklisp/software/slime-v2.24/swank-loader.lisp" :verbose t) (funcall (read-from-string "swank-loader:init") :from-emacs t) (funcall (read-from-string "swank:start-server") "/tmp/slime.19223"))
> >
> >   i i i i i i i       ooooo    o        ooooooo   ooooo   ooooo
> >   I I I I I I I      8     8   8           8     8     o  8    8
> >   I  \ `+' /  I      8         8           8     8        8    8
> >    \  `-+-'  /       8         8           8      ooooo   8oooo
> >     `-__|__-'        8         8           8           8  8
> >         |            8     o   8           8     o     8  8
> >   ------+------       ooooo    8oooooo  ooo8ooo   ooooo   8
> >
> > Welcome to GNU CLISP 2.49 (2010-07-07) <http://clisp.cons.org/>
> >
> > Copyright (c) Bruno Haible, Michael Stoll 1992, 1993
> > Copyright (c) Bruno Haible, Marcus Daniels 1994-1997
> > Copyright (c) Bruno Haible, Pierpaolo Bernardi, Sam Steingold 1998
> > Copyright (c) Bruno Haible, Sam Steingold 1999-2000
> > Copyright (c) Sam Steingold, Bruno Haible 2001-2010
> >
> > Type :h and hit Enter for context help.
> >
> > [1]>
> > ;; Loading file /home/chirvasitua/quicklisp/dists/quicklisp/software/slime-v2.24/swank-loader.lisp ...
> > ;; Loaded file /home/chirvasitua/quicklisp/dists/quicklisp/software/slime-v2.24/swank-loader.lisp
> > ;; Loading file /home/chirvasitua/.slime/fasl/2.24/clisp-2.49-unix-pc386/packages.fas ...
> > ;; Loaded file /home/chirvasitua/.slime/fasl/2.24/clisp-2.49-unix-pc386/packages.fas
> > ;; Loading file /home/chirvasitua/.slime/fasl/2.24/clisp-2.49-unix-pc386/backend.fas ...
> > ;; Loaded file /home/chirvasitua/.slime/fasl/2.24/clisp-2.49-unix-pc386/backend.fas
> > ;; Loading file /home/chirvasitua/.slime/fasl/2.24/clisp-2.49-unix-pc386/xref.fas ...
> > ;; Loaded file /home/chirvasitua/.slime/fasl/2.24/clisp-2.49-unix-pc386/xref.fas
> > ;; Loading file /home/chirvasitua/.slime/fasl/2.24/clisp-2.49-unix-pc386/metering.fas ...
> > ;; Loaded file /home/chirvasitua/.slime/fasl/2.24/clisp-2.49-unix-pc386/metering.fas
> > ;; Loading file /home/chirvasitua/.slime/fasl/2.24/clisp-2.49-unix-pc386/clisp.fas ...
> > WARNING: DEFUN/DEFMACRO: redefining function BREAK in
> >          /home/chirvasitua/.slime/fasl/2.24/clisp-2.49-unix-pc386/clisp.fas,
> >          was defined in /builddir/clisp-2.49/src/condition.fas
> > WARNING: Replacing method #<STANDARD-METHOD (#<BUILT-IN-CLASS T>)> in
> >          #<STANDARD-GENERIC-FUNCTION EMACS-INSPECT>
> > ;; Loaded file /home/chirvasitua/.slime/fasl/2.24/clisp-2.49-unix-pc386/clisp.fas
> > ;; Loading file /home/chirvasitua/.slime/fasl/2.24/clisp-2.49-unix-pc386/gray.fas ...
> > WARNING: The generic function #<STANDARD-GENERIC-FUNCTION STREAM-LINE-COLUMN>
> >          is being modified, but has already been called.
> > WARNING: The generic function #<STANDARD-GENERIC-FUNCTION STREAM-FORCE-OUTPUT>
> >          is being modified, but has already been called.
> > WARNING: The generic function #<STANDARD-GENERIC-FUNCTION STREAM-LINE-COLUMN>
> >          is being modified, but has already been called.
> > ;; Loaded file /home/chirvasitua/.slime/fasl/2.24/clisp-2.49-unix-pc386/gray.fas
> > ;; Loading file /home/chirvasitua/.slime/fasl/2.24/clisp-2.49-unix-pc386/match.fas ...
> > ;; Loaded file /home/chirvasitua/.slime/fasl/2.24/clisp-2.49-unix-pc386/match.fas
> > ;; Loading file /home/chirvasitua/.slime/fasl/2.24/clisp-2.49-unix-pc386/rpc.fas ...
> > ;; Loaded file /home/chirvasitua/.slime/fasl/2.24/clisp-2.49-unix-pc386/rpc.fas
> > ;; Loading file /home/chirvasitua/.slime/fasl/2.24/clisp-2.49-unix-pc386/swank.fas ...
> > ;; Loaded file /home/chirvasitua/.slime/fasl/2.24/clisp-2.49-unix-pc386/swank.fas
> > 0 errors, 5 warnings
> > ;; Swank started at port: 41975.
> > CL-USER>
> > ;; Loading file /home/chirvasitua/.slime/fasl/2.24/clisp-2.49-unix-pc386/contrib/swank-trace-dialog.fas ...
> > ;; Loaded file /home/chirvasitua/.slime/fasl/2.24/clisp-2.49-unix-pc386/contrib/swank-trace-dialog.fas
> > ;; Loading file /home/chirvasitua/.slime/fasl/2.24/clisp-2.49-unix-pc386/contrib/swank-package-fu.fas ...
> > ;; Loaded file /home/chirvasitua/.slime/fasl/2.24/clisp-2.49-unix-pc386/contrib/swank-package-fu.fas
> > ;; Loading file /home/chirvasitua/.slime/fasl/2.24/clisp-2.49-unix-pc386/contrib/swank-presentations.fas ...
> > ;;  Loading file /home/chirvasitua/.slime/fasl/2.24/clisp-2.49-unix-pc386/contrib/swank-repl.fas ...
> > WARNING: The generic function
> >          #<STANDARD-GENERIC-FUNCTION THREAD-FOR-EVALUATION> is being modified,
> >          but has already been called.
> > WARNING: Replacing method
> >           #<STANDARD-METHOD
> >             (#<STRUCTURE-CLASS MULTITHREADED-CONNECTION> (EQL :FIND-EXISTING))>
> >          in #<STANDARD-GENERIC-FUNCTION THREAD-FOR-EVALUATION>
> > ;;  Loaded file /home/chirvasitua/.slime/fasl/2.24/clisp-2.49-unix-pc386/contrib/swank-repl.fas
> > ;; Loaded file /home/chirvasitua/.slime/fasl/2.24/clisp-2.49-unix-pc386/contrib/swank-presentations.fas
> > ;; Loading file /home/chirvasitua/.slime/fasl/2.24/clisp-2.49-unix-pc386/contrib/swank-macrostep.fas ...
> > ;; Loaded file /home/chirvasitua/.slime/fasl/2.24/clisp-2.49-unix-pc386/contrib/swank-macrostep.fas
> > ;; Loading file /home/chirvasitua/.slime/fasl/2.24/clisp-2.49-unix-pc386/contrib/swank-fuzzy.fas ...
> > ;;  Loading file /home/chirvasitua/.slime/fasl/2.24/clisp-2.49-unix-pc386/contrib/swank-util.fas ...
> > ;;  Loaded file /home/chirvasitua/.slime/fasl/2.24/clisp-2.49-unix-pc386/contrib/swank-util.fas
> > ;;  Loading file /home/chirvasitua/.slime/fasl/2.24/clisp-2.49-unix-pc386/contrib/swank-c-p-c.fas ...
> > ;;  Loaded file /home/chirvasitua/.slime/fasl/2.24/clisp-2.49-unix-pc386/contrib/swank-c-p-c.fas
> > ;; Loaded file /home/chirvasitua/.slime/fasl/2.24/clisp-2.49-unix-pc386/contrib/swank-fuzzy.fas
> > ;; Loading file /home/chirvasitua/.slime/fasl/2.24/clisp-2.49-unix-pc386/contrib/swank-fancy-inspector.fas ...
> > ;; Loaded file /home/chirvasitua/.slime/fasl/2.24/clisp-2.49-unix-pc386/contrib/swank-fancy-inspector.fas
> > ;; Loading file /home/chirvasitua/.slime/fasl/2.24/clisp-2.49-unix-pc386/contrib/swank-arglists.fas ...
> > WARNING: Test failed: (&KEY #'#'+) => "(&key (function  #'+))"
> >          Expected: One of: "(&key (function #'+))", "(&key (function (function
> >          +)))"
> > ;; Loaded file /home/chirvasitua/.slime/fasl/2.24/clisp-2.49-unix-pc386/contrib/swank-arglists.fas
> >
> > Process inferior-lisp segmentation fault
> >
> > --- buffer ends ---
> >
> > More information:
> >
> > - starting clisp in a terminal all on its own seems to work fine; I haven't had segmentation faults using it in isolation from slime.
> >
> > - I tried to start the server from within clisp and connect to it:
> >
> > (a) rlwrap clisp
> > (b) (load "~/quicklisp/dists/quicklisp/software/slime-v2.24/swank-loader.lisp")
> > (c) (swank-loader::init :reload t)
> > (d) (swank:create-server :port 7000)
> > (e) from within emacs: M-x slime-connect with localhost and port 7000
> >
> > Same behavior as before: I get connected, get to make a few evaluations, get disconnected.
> >
> > This time around rlwrap tells me (in the terminal where I started clisp):
> >
> > rlwrap: warning: clisp crashed, killed by SIGSEGV
> >



More information about the slime-devel mailing list