Hi all,
In bash:
# sbcl --core sbcl.core-with-swank This is SBCL 1.0.30, 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. * (swank:create-server :port 49153) ;; Swank started at port: 49153.
49153 * (swank:stop-server 49153) #
sbcl dies, which I obviously don't want it to.
My core includes the latest slime/swank from CVS, on a Debian (Lenny) box.
I need to be able to stop swank the server cleanly, whilst leaving sbcl running.
Is this a (serious) bug or am I missing something?
Regards,
Seb
On Sat, Oct 10, 2009 at 2:36 AM, Sebastian Tennant sebyte@smolny.plus.com wrote:
Hi all,
In bash:
# sbcl --core sbcl.core-with-swank This is SBCL 1.0.30, 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. * (swank:create-server :port 49153) ;; Swank started at port: 49153.
49153 * (swank:stop-server 49153) #
sbcl dies, which I obviously don't want it to.
My core includes the latest slime/swank from CVS, on a Debian (Lenny) box.
I need to be able to stop swank the server cleanly, whilst leaving sbcl running.
Is this a (serious) bug or am I missing something?
That's a bug, it was killing the wrong thread. Fixed in CVS. Thanks for the report!
Quoth Stas Boukarev stassats@gmail.com:
That's a bug, it was killing the wrong thread. Fixed in CVS. Thanks for the report!
Thanks for the super-quick response, but...
... having checked out the fix, I can no longer build the core. It never used to produce this much output, and, needless to say, it didn't use to fail:
* (swank-loader:dump-image "sbcl.core-with-swank")
; compiling file "/root/elisp/remote-cvs/slime/swank-backend.lisp" (written 09 OCT 2009 09:46:31 PM):
; /root/.slime/fasl/2009-10-09/sbcl-1.0.30-linux-x86/swank-backend.fasl written ; compilation finished in 0:00:01.080 ; loading #P"/root/.slime/fasl/2009-10-09/sbcl-1.0.30-linux-x86/swank-backend.fasl" WARNING: SWANK-BACKEND also exports the following symbols: (SWANK-BACKEND:SLDB-BREAK-AT-START SWANK-BACKEND:CLOSE-SOCKET SWANK-BACKEND:PROFILE-RESET SWANK-BACKEND:SWANK-COMPILE-FILE SWANK-BACKEND:COMPILER-MACROEXPAND-1 SWANK-BACKEND:INSTALL-DEBUGGER-GLOBALLY SWANK-BACKEND:ARGLIST SWANK-BACKEND:DESCRIBE-SYMBOL-FOR-EMACS SWANK-BACKEND:FRAME-CATCH-TAGS SWANK-BACKEND:DISASSEMBLE-FRAME SWANK-BACKEND:SET-DEFAULT-DIRECTORY SWANK-BACKEND:PRINT-FRAME SWANK-BACKEND:FIND-DEFINITIONS SWANK-BACKEND:TOGGLE-TRACE SWANK-BACKEND:GETPID SWANK-BACKEND:SAVE-IMAGE SWANK-BACKEND:SPAWN SWANK-BACKEND:DESCRIBE-PRIMITIVE-TYPE SWANK-BACKEND:COMPUTE-BACKTRACE SWANK-BACKEND:CALL-WITHOUT-INTERRUPTS SWANK-BACKEND:SEND SWANK-BACKEND:CALLS-WHO SWANK-BACKEND:THREAD-STATUS SWANK-BACKEND:MAKE-INPUT-STREAM SWANK-BACKEND:INSTALL-SIGINT-HANDLER SWANK-BACKEND:MAKE-LOCK SWANK-BACKEND:LISP-IMPLEMENTATION-TYPE-NAME SWANK-BACKEND:SLDB-STEP-OUT SWANK-BACKEND:DEFAULT-READTABLE-ALIST SWANK-BACKEND:THREAD-ATTRIBUTES SWANK-BACKEND:CALL-WITH-DEBUGGING-ENVIRONMENT SWANK-BACKEND:EMACS-CONNECTED SWANK-BACKEND:SET-THREAD-DESCRIPTION SWANK-BACKEND:FRAME-SOURCE-LOCATION SWANK-BACKEND:LOCAL-PORT SWANK-BACKEND:CREATE-SOCKET SWANK-BACKEND:FRAME-VAR-VALUE SWANK-BACKEND:ACCEPT-CONNECTION SWANK-BACKEND:PATHNAME-TO-FILENAME SWANK-BACKEND:WHO-BINDS SWANK-BACKEND:FUNCTION-NAME SWANK-BACKEND:WHO-SETS SWANK-BACKEND:MAKE-OUTPUT-STREAM SWANK-BACKEND:FILENAME-TO-PATHNAME SWANK-BACKEND:DESCRIBE-DEFINITION SWANK-BACKEND:GUESS-EXTERNAL-FORMAT SWANK-BACKEND:WHO-MACROEXPANDS SWANK-BACKEND:FORMAT-STRING-EXPAND SWANK-BACKEND:CALL-WITH-DEBUGGER-HOOK SWANK-BACKEND:MAKE-WEAK-VALUE-HASH-TABLE SWANK-BACKEND:UNPROFILE-ALL SWANK-BACKEND:FIND-THREAD SWANK-BACKEND:FRAME-LOCALS SWANK-BACKEND:FRAME-RESTARTABLE-P SWANK-BACKEND:LIST-CALLERS SWANK-BACKEND:THREAD-DESCRIPTION SWANK-BACKEND:WAIT-FOR-INPUT SWANK-BACKEND:MACROEXPAND-ALL SWANK-BACKEND:SLDB-STEPPER-CONDITION-P SWANK-BACKEND:KILL-THREAD SWANK-BACKEND:CONDITION-EXTRAS SWANK-BACKEND:CALL-WITH-USER-BREAK-HANDLER SWANK-BACKEND:UNPROFILE SWANK-BACKEND:RESTART-FRAME SWANK-BACKEND:SLDB-STEP-INTO SWANK-BACKEND:THREAD-ID SWANK-BACKEND:ACTIVATE-STEPPING SWANK-BACKEND:CALL-WITH-COMPILATION-HOOKS SWANK-BACKEND:WHO-CALLS SWANK-BACKEND:COMPILER-MACROEXPAND SWANK-BACKEND:WHO-SPECIALIZES SWANK-BACKEND:ADD-SIGIO-HANDLER SWANK-BACKEND:WHO-REFERENCES SWANK-BACKEND:ALL-THREADS SWANK-BACKEND:CALL-WITH-LOCK-HELD SWANK-BACKEND:PROFILE-REPORT SWANK-BACKEND:CHARACTER-COMPLETION-SET SWANK-BACKEND:HASH-TABLE-WEAKNESS SWANK-BACKEND:CALL-WITH-SYNTAX-HOOKS SWANK-BACKEND:RECEIVE-IF SWANK-BACKEND:CURRENT-THREAD SWANK-BACKEND:INTERRUPT-THREAD SWANK-BACKEND:THREAD-ALIVE-P SWANK-BACKEND:REMOVE-FD-HANDLERS SWANK-BACKEND:FIND-SOURCE-LOCATION SWANK-BACKEND:DEFAULT-DIRECTORY SWANK-BACKEND:SWANK-COMPILE-STRING SWANK-BACKEND:PROFILED-FUNCTIONS SWANK-BACKEND:SLDB-STEP-NEXT SWANK-BACKEND:THREAD-NAME SWANK-BACKEND:ADD-FD-HANDLER SWANK-BACKEND:MAKE-WEAK-KEY-HASH-TABLE SWANK-BACKEND:LIST-CALLEES SWANK-BACKEND:SET-STREAM-TIMEOUT SWANK-BACKEND:EVAL-IN-FRAME SWANK-BACKEND:BUFFER-FIRST-CHANGE SWANK-BACKEND:PREFERRED-COMMUNICATION-STYLE SWANK-BACKEND:FORMAT-SLDB-CONDITION SWANK-BACKEND:RETURN-FROM-FRAME SWANK-BACKEND:PROFILE SWANK-BACKEND:INITIALIZE-MULTIPROCESSING SWANK-BACKEND:SET-DEFAULT-INITIAL-BINDING SWANK-BACKEND:RECEIVE SWANK-BACKEND:PROFILE-PACKAGE SWANK-BACKEND:FIND-EXTERNAL-FORMAT SWANK-BACKEND:REMOVE-SIGIO-HANDLERS SWANK-BACKEND:SLDB-BREAK-ON-RETURN) See also: The ANSI Standard, Macro DEFPACKAGE ; compiling file "/root/elisp/remote-cvs/slime/swank-source-path-parser.lisp" (written 19 MAY 2009 10:51:38 AM):
; /root/.slime/fasl/2009-10-09/sbcl-1.0.30-linux-x86/swank-source-path-parser.fasl written ; compilation finished in 0:00:00.149 ; loading #P"/root/.slime/fasl/2009-10-09/sbcl-1.0.30-linux-x86/swank-source-path-parser.fasl" ; compiling file "/root/elisp/remote-cvs/slime/swank-source-file-cache.lisp" (written 09 MAY 2009 07:26:00 PM):
; /root/.slime/fasl/2009-10-09/sbcl-1.0.30-linux-x86/swank-source-file-cache.fasl written ; compilation finished in 0:00:00.100 ; loading #P"/root/.slime/fasl/2009-10-09/sbcl-1.0.30-linux-x86/swank-source-file-cache.fasl" ; compiling file "/root/elisp/remote-cvs/slime/swank-sbcl.lisp" (written 09 OCT 2009 09:46:31 PM):
; /root/.slime/fasl/2009-10-09/sbcl-1.0.30-linux-x86/swank-sbcl.fasl written ; compilation finished in 0:00:02.130 ; loading #P"/root/.slime/fasl/2009-10-09/sbcl-1.0.30-linux-x86/swank-sbcl.fasl" STYLE-WARNING: redefining EMACS-INSPECT (#<BUILT-IN-CLASS T>) in DEFMETHOD ; compiling file "/root/elisp/remote-cvs/slime/swank-gray.lisp" (written 31 AUG 2008 11:58:01 AM):
; /root/.slime/fasl/2009-10-09/sbcl-1.0.30-linux-x86/swank-gray.fasl written ; compilation finished in 0:00:00.522 ; loading #P"/root/.slime/fasl/2009-10-09/sbcl-1.0.30-linux-x86/swank-gray.fasl" STYLE-WARNING: Implicitly creating new generic function STREAM-READ-CHAR-WILL-HANG-P. ; compiling file "/root/elisp/remote-cvs/slime/swank.lisp" (written 09 OCT 2009 11:53:24 PM):
; /root/.slime/fasl/2009-10-09/sbcl-1.0.30-linux-x86/swank.fasl written ; compilation finished in 0:00:04.088 ; loading #P"/root/.slime/fasl/2009-10-09/sbcl-1.0.30-linux-x86/swank.fasl" WARNING: SWANK also exports the following symbols: (SWANK:SIMPLE-COMPLETIONS SWANK:PPRINT-EVAL SWANK:INSPECTOR-RANGE SWANK:LISTENER-EVAL SWANK:CREATE-REPL SWANK:SLDB-ABORT SWANK:STATE-STACK SWANK:START-SWANK-SERVER-IN-THREAD SWANK:DESCRIBE-SYMBOL SWANK:INTERACTIVE-EVAL SWANK:SLDB-BREAK-WITH-DEFAULT-DEBUGGER SWANK:KILL-NTH-THREAD SWANK:PPRINT-INSPECTOR-PART SWANK:SWANK-REQUIRE SWANK:SET-PACKAGE SWANK:SWANK-MACROEXPAND SWANK:INVOKE-NTH-RESTART-FOR-EMACS SWANK:COMPILE-FILE-IF-NEEDED SWANK:INSPECTOR-POP SWANK:LOAD-FILE SWANK:RE-EVALUATE-DEFVAR SWANK:VALUE-FOR-EDITING SWANK:SLDB-RETURN-FROM-FRAME SWANK:INSPECT-FRAME-VAR SWANK:INSPECT-IN-FRAME SWANK:UNTRACE-ALL SWANK:SLDB-DISASSEMBLE SWANK:SWANK-MACROEXPAND-ALL SWANK:PPRINT-EVAL-STRING-IN-FRAME SWANK:FIND-DEFINITION-FOR-THING SWANK:QUIT-INSPECTOR SWANK:SLDB-OUT SWANK:APROPOS-LIST-FOR-EMACS SWANK:INIT-INSPECTOR SWANK:FRAME-LOCALS-AND-CATCH-TAGS SWANK:TOGGLE-PROFILE-FDEFINITION SWANK:CREATE-LISTENER SWANK:OPERATOR-ARGLIST SWANK:UNDEFINE-FUNCTION SWANK:SWANK-COMPILER-MACROEXPAND-1 SWANK:INSPECTOR-TOGGLE-VERBOSE SWANK:DESCRIBE-FUNCTION SWANK:IO-SPEED-TEST SWANK:SIMPLE-BREAK SWANK:INSPECTOR-CALL-NTH-ACTION SWANK:BACKTRACE SWANK:EVAL-AND-GRAB-OUTPUT SWANK:LIST-THREADS SWANK:XREFS SWANK:UPDATE-INDENTATION-INFORMATION SWANK:COMPILE-MULTIPLE-STRINGS-FOR-EMACS SWANK:SWANK-FORMAT-STRING-EXPAND SWANK:REDIRECT-TRACE-OUTPUT SWANK:SWANK-COMPILER-MACROEXPAND SWANK:QUIT-THREAD-BROWSER SWANK:INTERACTIVE-EVAL-REGION SWANK:INSPECT-NTH-PART SWANK:LIST-ALL-PACKAGE-NAMES SWANK:DISASSEMBLE-SYMBOL SWANK:EVAL-STRING-IN-FRAME SWANK:COMPILE-STRING-FOR-EMACS SWANK:PING SWANK:INSPECTOR-NEXT SWANK:SWANK-TOGGLE-TRACE SWANK:DESCRIBE-DEFINITION-FOR-EMACS SWANK:COMMIT-EDITED-VALUE SWANK:DEBUG-NTH-THREAD SWANK:DOCUMENTATION-SYMBOL SWANK:DEBUGGER-INFO-FOR-EMACS SWANK:DESCRIBE-INSPECTEE SWANK:XREF SWANK:SLDB-NEXT SWANK:FIND-SOURCE-LOCATION-FOR-EMACS SWANK:INSPECT-CURRENT-CONDITION SWANK:PROFILE-BY-SUBSTRING SWANK:SLDB-CONTINUE SWANK:CONNECTION-INFO SWANK:FIND-DEFINITIONS-FOR-EMACS SWANK:MOP SWANK:THROW-TO-TOPLEVEL SWANK:INSPECTOR-NTH-PART SWANK:SWANK-MACROEXPAND-1 SWANK:INVOKE-NTH-RESTART SWANK:INSPECTOR-REINSPECT SWANK:COMPILE-FILE-FOR-EMACS) See also: The ANSI Standard, Macro DEFPACKAGE WARNING: These Swank interfaces are unimplemented: (DISASSEMBLE-FRAME SLDB-BREAK-AT-START SLDB-BREAK-ON-RETURN)
debugger invoked on a SIMPLE-ERROR in thread #<THREAD "initial thread" RUNNING {A902839}>: The assertion (AND (SB-POSIX:WIFEXITED SWANK-BACKEND::STATUS) (ZEROP (SB-POSIX:WEXITSTATUS SWANK-BACKEND::STATUS))) failed.
Type HELP for debugger help, or (SB-EXT:QUIT) to exit from SBCL.
restarts (invokable by number or by possibly-abbreviated name): 0: [CONTINUE] Retry assertion. 1: [ABORT ] Exit debugger, returning to top level.
(SB-KERNEL:ASSERT-ERROR (AND (SB-POSIX:WIFEXITED SWANK-BACKEND::STATUS) (ZEROP (SB-POSIX:WEXITSTATUS SWANK-BACKEND::STATUS))) NIL NIL)[:EXTERNAL] 0] 1 *
Seb
On Sat, Oct 10, 2009 at 4:03 AM, Sebastian Tennant sebyte@smolny.plus.com wrote:
Quoth Stas Boukarev stassats@gmail.com:
That's a bug, it was killing the wrong thread. Fixed in CVS. Thanks for the report!
Thanks for the super-quick response, but...
... having checked out the fix, I can no longer build the core. It never used to produce this much output, and, needless to say, it didn't use to fail:
* (swank-loader:dump-image "sbcl.core-with-swank")
... So much output is ok. dump-image is doing a fork before dumping an image. And it seems that forking failed for some reason. I'd just use sb-ext:save-lisp-and-die directly and don't rely on forking.
Quoth Stas Boukarev stassats@gmail.com:
On Sat, Oct 10, 2009 at 4:03 AM, Sebastian Tennant sebyte@smolny.plus.com wrote:
Quoth Stas Boukarev stassats@gmail.com:
That's a bug, it was killing the wrong thread. Fixed in CVS. Thanks for the report!
Thanks for the super-quick response, but...
... having checked out the fix, I can no longer build the core. It never used to produce this much output, and, needless to say, it didn't use to fail:
- (swank-loader:dump-image "sbcl.core-with-swank")
... So much output is ok. dump-image is doing a fork before dumping an image. And it seems that forking failed for some reason. I'd just use sb-ext:save-lisp-and-die directly and don't rely on forking.
It's working fine now. Thanks a lot :)
Seb