If I save an image containg latest SWANK and try to start SLIME with it, I get an error. OTOH, if I start SLIME with an image that doesn't contain SWANK(loading it on the spot), all works well. I've traced back the origin of this problem to the commit of Sun Aug 3 18:23:10 entitled "Add some flow-control."
with CLISP: [1]> ;; Loading file /usr/share/emacs/site-lisp/slime/swank-loader.lisp ... 0 errors, 0 warnings ;; Loaded file /usr/share/emacs/site-lisp/slime/swank-loader.lisp *** - WRITE-CHAR on #<CLOSED IO TERMINAL-STREAM> is illegal The following restarts are available: ABORT :R1 Abort main loop Break 1 [2]> :bt <1/181> #<SYSTEM-FUNCTION SHOW-STACK> 3 <2/174> #<COMPILED-FUNCTION SYSTEM::PRINT-BACKTRACE> <3/168> #<COMPILED-FUNCTION SYSTEM::DEBUG-BACKTRACE> <4/160> #<SYSTEM-FUNCTION SYSTEM::READ-EVAL-PRINT> 2 <5/157> #<COMPILED-FUNCTION SYSTEM::BREAK-LOOP-2-3> <6/153> #<SYSTEM-FUNCTION SYSTEM::SAME-ENV-AS> 2 <7/139> #<COMPILED-FUNCTION SYSTEM::BREAK-LOOP-2> <8/137> #<SYSTEM-FUNCTION SYSTEM::DRIVER> <9/97> #<COMPILED-FUNCTION SYSTEM::BREAK-LOOP> <10/94> #<SYSTEM-FUNCTION INVOKE-DEBUGGER> 1 <11/84> #<SYSTEM-FUNCTION WRITE-STRING> <12/79> #<COMPILED-FUNCTION SWANK::SIMPLE-ANNOUNCE-FUNCTION-1> <13/71> #<COMPILED-FUNCTION SYSTEM::FORMAT-APPLY> <14/66> #<COMPILED-FUNCTION FORMAT> <15/62> #<COMPILED-FUNCTION SWANK::SIMPLE-ANNOUNCE-FUNCTION> <16/60> #<COMPILED-FUNCTION SWANK::ANNOUNCE-SERVER-PORT> <17/57> #<COMPILED-FUNCTION SWANK::START-SERVER-1> <18/51> #<COMPILED-FUNCTION SWANK::SETUP-SERVER> <19/44> #<COMPILED-FUNCTION SWANK:START-SERVER> <20/43> #<SYSTEM-FUNCTION FUNCALL> 4 [39] EVAL frame for form (FUNCALL (READ-FROM-STRING "swank:start-server") "/tmp/.private/hechee/slime.3239193" :CODING-SYSTEM "utf-8-unix")
and with SBCL: S/HU[1]> ; loading #P"/usr/share/emacs/site-lisp/slime/swank-loader.lisp"
debugger invoked on a SB-SYS:MEMORY-FAULT-ERROR in thread #<THREAD "initial thread" RUNNING {B6209F9}>: Unhandled memory fault at #x-58A13000.
Type HELP for debugger help, or (SB-EXT:QUIT) to exit from SBCL.
restarts (invokable by number or by possibly-abbreviated name): 0: [ABORT] Exit debugger, returning to top level.
(SB-SYS:MEMORY-FAULT-ERROR) 0] backtrace
0: (SB-SYS:MEMORY-FAULT-ERROR) 1: (SB-SYS:MEMORY-FAULT-ERROR)[:EXTERNAL] 2: ("foreign function: #x8063A1C") 3: ("foreign function: #x8063C70") 4: (SB-IMPL::OUTPUT-BYTES/UTF-8 #<SB-SYS:FD-STREAM for "standard error" {9143371}> ";; Swank started at port: " NIL 0 26) 5: (SB-IMPL::FD-SOUT #<SB-SYS:FD-STREAM for "standard error" {9143371}> ";; Swank started at port: " 0 26) 6: (SB-IMPL::%WRITE-STRING ";; Swank started at port: " #<SB-SYS:FD-STREAM for "standard error" {9143371}> 0 26) 7: (WRITE-STRING ";; Swank started at port: " #<SB-SYS:FD-STREAM for "standard error" {9143371}> :START 0 :END NIL) 8: (SB-FORMAT::INTERPRET-DIRECTIVE-LIST #<SB-SYS:FD-STREAM for "standard error" {9143371}> (";; Swank started at port: " #<~D> "." #<~%>) (39770) (39770)) 9: (SB-FORMAT::%FORMAT #<SB-SYS:FD-STREAM for "standard error" {9143371}> "~&;; Swank started at port: ~D.~%" (39770) (39770)) 10: (FORMAT #<SB-SYS:FD-STREAM for "standard error" {9143371}> "~&;; Swank started at port: ~D.~%")[:EXTERNAL] 11: (SWANK::SIMPLE-ANNOUNCE-FUNCTION 39770) 12: (SWANK::ANNOUNCE-SERVER-PORT "/tmp/.private/hechee/slime.3239193" 39770) 13: ((LAMBDA (SWANK::PORT)) 39770) 14: (SWANK::SETUP-SERVER 0 #<CLOSURE (LAMBDA (SWANK::PORT)) {B6F6B75}> :SPAWN NIL :UTF-8) 15: (SWANK:START-SERVER "/tmp/.private/hechee/slime.3239193")[:EXTERNAL] 16: (SB-INT:SIMPLE-EVAL-IN-LEXENV (FUNCALL (READ-FROM-STRING "swank:start-server") "/tmp/.private/hechee/slime.3239193" :CODING-SYSTEM "utf-8-unix") #<NULL-LEXENV>)
* Stelian Ionescu [2008-08-09 18:34+0200] writes:
If I save an image containg latest SWANK and try to start SLIME with it, I get an error. OTOH, if I start SLIME with an image that doesn't contain SWANK(loading it on the spot), all works well. I've traced back the origin of this problem to the commit of Sun Aug 3 18:23:10 entitled "Add some flow-control."
Hmm, synonym-streams surely are confusing. Should be fixed in HEAD. Thank you for the bug report.
Helmut.
On Sat, Aug 9, 2008 at 9:58 PM, Helmut Eller heller@common-lisp.net wrote:
- Stelian Ionescu [2008-08-09 18:34+0200] writes:
If I save an image containg latest SWANK and try to start SLIME with it, I get an error. OTOH, if I start SLIME with an image that doesn't contain SWANK(loading it on the spot), all works well. I've traced back the origin of this problem to the commit of Sun Aug 3 18:23:10 entitled "Add some flow-control."
Hmm, synonym-streams surely are confusing. Should be fixed in HEAD. Thank you for the bug report.
Unfortunately it doesn't work. But when I launch slime from Emacs it works fine.
rafal@delta:/tmp$ cat a.lisp
(make-package :swank-loader) (defparameter swank-loader::*fasl-directory* "/tmp/fasls/") (load #p"/home/rafal/work/slime/swank-loader.lisp") (swank-loader:init)
(defun start () (swank:create-server :port 4005 :dont-close t :coding-system "utf-8-unix"))
(sb-ext:save-lisp-and-die "sbcl.core" :purify t)
rafal@delta:/tmp$ sbcl --load a.lisp This is SBCL 1.0.19.26, an implementation of ANSI Common Lisp. More information about SBCL is available at http://www.sbcl.org/. [...]
rafal@delta:/tmp$ sbcl --core sbcl.core --eval "(start)" This is SBCL 1.0.19.26, an implementation of ANSI Common Lisp. More information about SBCL is available at http://www.sbcl.org/.
SBCL is free software, provided as is, with absolutely no warranty. It is mostly in the public domain; some portions are provided under BSD-style licenses. See the CREDITS and COPYING files in the distribution for more information.
debugger invoked on a SIMPLE-ERROR in thread #<THREAD "initial thread" RUNNING {10029069A1}>: Error during processing of --eval option "(start)":
Unhandled memory fault at #x7FF178381000. ;; SWANK: sb-thread::get-foreground ...
Type HELP for debugger help, or (SB-EXT:QUIT) to exit from SBCL.
restarts (invokable by number or by possibly-abbreviated name): 0: [CONTINUE] Ignore and continue with next --eval option. 1: [ABORT ] Skip rest of --eval options. 2: Skip to toplevel READ/EVAL/PRINT loop. 3: [QUIT ] Quit SBCL (calling #'QUIT, killing the process).
((FLET #:LAMBDA135) #<SB-SYS:MEMORY-FAULT-ERROR {1002AC1AB1}>);; SWANK: sb-thread::get-foreground ...
0] backtrace
0: ((FLET #:LAMBDA135) #<SB-SYS:MEMORY-FAULT-ERROR {1002AC1AB1}>) 1: ((FLET #:LAMBDA135) #<SB-SYS:MEMORY-FAULT-ERROR {1002AC1AB1}>)[:EXTERNAL] 2: (SIGNAL #<SB-SYS:MEMORY-FAULT-ERROR {1002AC1AB1}>)[:EXTERNAL] 3: (ERROR SB-SYS:MEMORY-FAULT-ERROR)[:EXTERNAL] 4: (SB-SYS:MEMORY-FAULT-ERROR) 5: (SB-SYS:MEMORY-FAULT-ERROR)[:EXTERNAL] 6: ("foreign function: #x41E2F2") 7: ("foreign function: #x41E3B0") 8: (SB-IMPL::OUTPUT-BYTES/UTF-8 #<SB-SYS:FD-STREAM for "standard error" {100027D6D1}> ";; Swank started at port: " NIL 0 26) 9: (SB-IMPL::FD-SOUT #<SB-SYS:FD-STREAM for "standard error" {100027D6D1}> ";; Swank started at port: " 0 26) 10: (SB-IMPL::%WRITE-STRING ";; Swank started at port: " #<SB-SYS:FD-STREAM for "standard error" {100027D6D1}> 0 26) 11: (WRITE-STRING ";; Swank started at port: " #<SB-SYS:FD-STREAM for "standard error" {100027D6D1}> :START 0 :END NIL) 12: (SB-FORMAT::INTERPRET-DIRECTIVE-LIST #<SB-SYS:FD-STREAM for "standard error" {100027D6D1}> (";; Swank started at port: " #<~D> "." #<~%>) (4005) (4005)) 13: (SB-FORMAT::%FORMAT #<SB-SYS:FD-STREAM for "standard error" {100027D6D1}> "~&;; Swank started at port: ~D.~%" (4005) (4005)) 14: (FORMAT #<SB-SYS:FD-STREAM for "standard error" {100027D6D1}> "~&;; Swank started at port: ~D.~%")[:EXTERNAL] 15: (SWANK::SIMPLE-ANNOUNCE-FUNCTION 4005) 16: (SWANK::SETUP-SERVER 4005 #<FUNCTION SWANK::SIMPLE-ANNOUNCE-FUNCTION> :SPAWN T :UTF-8) 17: (SB-INT:SIMPLE-EVAL-IN-LEXENV (START) #<NULL-LEXENV>) 18: (SB-IMPL::PROCESS-EVAL-OPTIONS ("(start)")) 19: (SB-IMPL::TOPLEVEL-INIT) 20: ((LABELS SB-IMPL::RESTART-LISP)) ;; SWANK: sb-thread::get-foreground ...
0]
* RafaB StrzaliDski [2008-08-12 01:34+0200] writes:
rafal@delta:/tmp$ cat a.lisp
(make-package :swank-loader) (defparameter swank-loader::*fasl-directory* "/tmp/fasls/") (load #p"/home/rafal/work/slime/swank-loader.lisp") (swank-loader:init)
Does it work if you call (swank-loader:init :setup nil) instead?
On Tue, Aug 12, 2008 at 8:01 AM, Helmut Eller heller@common-lisp.net wrote:
- RafaB StrzaliDski [2008-08-12 01:34+0200] writes:
rafal@delta:/tmp$ cat a.lisp
(make-package :swank-loader) (defparameter swank-loader::*fasl-directory* "/tmp/fasls/") (load #p"/home/rafal/work/slime/swank-loader.lisp") (swank-loader:init)
Does it work if you call (swank-loader:init :setup nil) instead?
Yes, it works. Thanks Helmut.
-- Best regards, Rafal Strzalinski (nabla) http://nablaone.net