Luke Gorrie luke@bluetail.com writes:
Howdy,
If you fire up SLIME in OpenMCL and pull up SLDB (e.g. with (/ 1 0)) then it seems the ABORT restart ('a') doesn't work. Invoking it seems to just return nil instead of aborting the evaluation.
Anyone know what's up?
I had to do an update from CVS and rebuild and restart Emacs.
I have no idea how to debug this, but here is what I have observed with Activity Monitor. When SLIME is started the openmcl process is known as dppccl. It starts with 6 (six!) threads. It runs with 3 threads initially when started from bash.
After trying (/ 1 0) and trying anything to get out of the debugger, I end up with just 5 threads. The REPL no longer gets any more prompts although I did get an evaluation aborted message.
The *inferior-lisp* buffer is still active and still working.
Here are my buffers. I had no idea *slime-events* was folded when I copied it. Sorry. Just trying to give out info to the people who know what all this voodoo means.
*slime-repl*
; SLIME 2004-05-01 CL-USER> (/ 1 0) Invoking restart: #<RESTART ABORT #x41354E36> ; Evaluation aborted
*slime-events*
(:emacs-rex (swank:connection-info) nil t (lambda (&rest --cl-rest--) (apply (lambda (G100092 G100083) (let* ((tmp-100089 G100083) (op-100087 (car tmp-100089)) (rand-100088 (cdr tmp-100089))) (cond ((eql op-100087 ':ok) (let* ((--rest--100090 rand-100088) (result (if (= (length --rest--100090) 1) (car --rest--100090) (signal 'wrong-number-of-arguments (list nil (length --rest--100090)))))) (funcall (symbol-value G100092) result))) ((eql op-100087 ':abort) (let* ((--rest--100091 rand-100088)) (if --rest--100091 (signal 'wrong-number-of-arguments (list nil (+ 0 (length --rest--100091))))) (message "Evaluation aborted."))) (t (error "destructure-case failed: %S" tmp-100089))))) '--cont-- --cl-rest--))) (:open-dedicated-output-stream 55319) (:indentation-update (("do-external-symbols" . 1) ("do-all-symbols" . 1) ("multiple-value-bind" . 2) ("prog*" . 1) ("do-symbols" . 1) ("dolist" . 1) ("pprint-logical-block" . 1) ("ecase" . 1) ("case" . 1) ("unless" . 1) ("do" . 2) ("restart-bind" . 1) ("etypecase" . 1) ("ctypecase" . 1) ("typecase" . 1) ("dotimes" . 1) ("when" . 1) ("prog" . 1) ("lambda" . 1) ("do*" . 2) ("handler-bind" . 1) ("psetq" . 0) ("destructuring-bind" . 2) ("print-unreadable-object" . 1) ("ccase" . 1) ("without-gcing" . 0) ("while" . 1) ("%ilogior" . 1) ("ignoring-without-interrupts" . 0) ("once-only" . 1) ("do-inactive-lisp-threads" . 1) ("%with-recursive-lock-ptr" . 1) ("do-unexhausted-lisp-threads" . 1) ("ensuring-node-target" . 1) ("restoring-interrupt-level" . 1) ("%with-recursive-lock-ptr-maybe" . 1) ("%ilogxor" . 1) ("in-development-mode" . 0) ("iterate" . 2) ("do-interface-dirs" . 1) ("do-db-links" . 1) ("qlfun" . 2) ("%ilogand" . 1) ("until" . 1) ("do-dll-nodes" . 1) ("collect" . 1) ("do-consing-areas" . 1) ("do-gc-areas" . 1) ("do-present-symbols" . 1) ("numeric-dispatch" . 1) ("pprint-logical-block+" . 1) ("using-resource" . 1) ("rletz" . 1) ("rlet" . 1) ("catch-cancel" . 0) ("without-interrupts" . 0) ("%vstack-block" . 1) ("dovector" . 1) ("%stack-block" . 1) ("let-globally" . 1) ("without-interrupts" . 0))) (:return (:ok ("2004-05-01" 19821 "OpenMCL" "openmcl" (:primary-classes :ccl :ccl-2 :ccl-3 :ccl-4 :coral :common-lisp :mcl :openmcl :ansi-cl :processes :unix :openmcl-native-threads :openmcl-partial-mop :mcl-common-mop-subset :openmcl-mop-2 :interfaces-2 :powerpc :ppc-target :ppc-clos :ppc32-target :ppc32-host :darwinppc-target :darwinppc-host :darwin :poweropen-target))) 14) (:emacs-rex (swank:arglist-for-echo-area '("/")) "CL-USER" :repl-thread (lambda (&rest --cl-rest--) (apply (lambda (G100118 G100109) (let* ((tmp-100115 G100109) (op-100113 (car tmp-100115)) (rand-100114 (cdr tmp-100115))) (cond ((eql op-100113 ':ok) (let* ((--rest--100116 rand-100114) (result (if (= (length --rest--100116) 1) (car --rest--100116) (signal 'wrong-number-of-arguments (list nil (length --rest--100116)))))) (funcall (symbol-value G100118) result))) ((eql op-100113 ':abort) (let* ((--rest--100117 rand-100114)) (if --rest--100117 (signal 'wrong-number-of-arguments (list nil (+ 0 (length --rest--100117))))) (message "Evaluation aborted."))) (t (error "destructure-case failed: %S" tmp-100115))))) '--cont-- --cl-rest--))) (:return (:ok "(/ arg-0 &rest the-rest)") 15) (:emacs-rex (swank:arglist-for-echo-area '("/")) "CL-USER" :repl-thread (lambda (&rest --cl-rest--) (apply (lambda (G100132 G100123) (let* ((tmp-100129 G100123) (op-100127 (car tmp-100129)) (rand-100128 (cdr tmp-100129))) (cond ((eql op-100127 ':ok) (let* ((--rest--100130 rand-100128) (result (if (= (length --rest--100130) 1) (car --rest--100130) (signal 'wrong-number-of-arguments (list nil (length --rest--100130)))))) (funcall (symbol-value G100132) result))) ((eql op-100127 ':abort) (let* ((--rest--100131 rand-100128)) (if --rest--100131 (signal 'wrong-number-of-arguments (list nil (+ 0 (length --rest--100131))))) (message "Evaluation aborted."))) (t (error "destructure-case failed: %S" tmp-100129))))) '--cont-- --cl-rest--))) (:return (:ok "(/ arg-0 &rest the-rest)") 16) (:emacs-rex (swank:listener-eval "(/ 1 0)\n") "CL-USER" :repl-thread (lambda (G100138) (let* ((tmp-100143 G100138) (op-100141 (car tmp-100143)) (rand-100142 (cdr tmp-100143))) (cond ((eql op-100141 ':ok) (let* ((--rest--100144 rand-100142) (result (if (= (length --rest--100144) 1) (car --rest--100144) (signal 'wrong-number-of-arguments (list nil (length --rest--100144)))))) (save-current-buffer (set-buffer (slime-output-buffer)) (slime-repl-insert-prompt result)))) ((eql op-100141 ':abort) (let* ((--rest--100145 rand-100142)) (if --rest--100145 (signal 'wrong-number-of-arguments (list nil (+ 0 (length --rest--100145))))) (slime-repl-show-abort))) (t (error "destructure-case failed: %S" tmp-100143)))))) (:debug 5 1 ("DIVISION-BY-ZERO detected \nperforming 'TRUNCATE on (1 0)" " [Condition of type DIVISION-BY-ZERO]") (("ABORT" "Abort handling SLIME request.") ("ABORT-BREAK" "#<RESTART ABORT-BREAK #x41354E0E>") ("ABORT" "#<RESTART ABORT #x41354E36>")) ((0 "(CCL::DIVIDE-BY-ZERO-ERROR 'TRUNCATE)") (1 "(CCL::%FIXNUM-TRUNCATE)") (2 "(CCL::INTEGER-/-INTEGER)") (3 "(/)") (4 "(CCL::CALL-CHECK-REGS /)") (5 "(SWANK::EVAL-REGION (/ 1 0)\n T)") (6 "(SWANK:LISTENER-EVAL (/ 1 0)\n)") (7 "(CCL::CALL-CHECK-REGS LISTENER-EVAL)") (8 "(SWANK::EVAL-FOR-EMACS (LISTENER-EVAL (/ 1 0)\n) CL-USER 17)") (9 "(FUNCALL EVAL-FOR-EMACS)") (10 "(SWANK::READ-FROM-EMACS)") (11 "(Anonymous Function #x53A5F06)") (12 "(SWANK::CALL-WITH-REDIRECTED-IO #S(CONNECTION :SOCKET-IO #<TCP-STREAM (SOCKET/14) #x53BF10E> :DEDICATED-OUTPUT #<TCP-STREAM (SOCKET/15) #x53BE9E6> :USER-INPUT #<SLIME-INPUT-STREAM #x53BE5F6> :USER-OUTPUT #<TCP-STREAM (SOCKET/15) #x53BE9E6> :USER-IO #<TWO-WAY-STREAM input #<SWANK-BACKEND::SLIME-INPUT-STREAM #x53BE5F6>, output #<TCP-STREAM (SOCKET/15) #x53BE9E6> #x53BE5B6> :CONTROL-THREAD #<PROCESS control-thread(3) [Active] #x53BDD8E> :READER-THREAD #<PROCESS reader-thread(4) [Active] #x53BDB96> :REPL-THREAD #<PROCESS repl-thread(5) [Active] #x53BD9A6> :READ #<Compiled-function READ-FROM-CONTROL-THREAD #x539F94E> :SEND #<Compiled-function SEND-TO-CONTROL-THREAD #x539ED0E> :SERVE-REQUESTS #<Compiled-function SPAWN-THREADS-FOR-CONNECTION #x53A297E> :CLEANUP NIL :INDENTATION-CACHE #<HASH-TABLE :TEST EQ size 61/90 #x53BEB96> :INDENTATION-CACHE-PACKAGES (#<Package "SWANK-COMPLETION-TEST"> #<Package "SWANK-IO-PACKAGE"> #<Package "SWANK"> #<Package "NREGEX"> #<P ackage "SWANK-BACKEND"> #<Package "SWANK-LOADER"> #<Package "ILISP"> #<Package "PPC"> #<Package "PPC32"> #<Package "OPENMCL-MOP"> #<Package "GRAY"> #<Package "OPENMCL-SOCKET"> #<Package "INSPECTOR"> #<Package "OS"> #<Package "ARCH"> #<Package "ANSI-LOOP"> #<Package "COMMON-LISP-USER"> #<Package "SETF"> #<Package "CCL"> #<Package "COMMON-LISP"> #<Package "KEYWORD">)) #<Anonymous Function #x53A5F06>)") (13 "(SWANK::HANDLE-REQUEST #S(CONNECTION :SOCKET-IO #<TCP-STREAM (SOCKET/14) #x53BF10E> :DEDICATED-OUTPUT #<TCP-STREAM (SOCKET/15) #x53BE9E6> :USER-INPUT #<SLIME-INPUT-STREAM #x53BE5F6> :USER-OUTPUT #<TCP-STREAM (SOCKET/15) #x53BE9E6> :USER-IO #<TWO-WAY-STREAM input #<SWANK-BACKEND::SLIME-INPUT-STREAM #x53BE5F6>, output #<TCP-STREAM (SOCKET/15) #x53BE9E6> #x53BE5B6> :CONTROL-THREAD #<PROCESS control-thread(3) [Active] #x53BDD8E> :READER-THREAD #<PROCESS reader-thread(4) [Active] #x53BDB96> :REPL-THREAD #<PROCESS repl-thread(5) [Active] #x53BD9A6> :READ #<Compiled-function READ-FROM-CONTROL-THREAD #x539F94E> :SEND #<Compiled-function SEND-TO-CONTROL-THREAD #x539ED0E> :SERVE-REQUESTS #<Compiled-function SPAWN-THREADS-FOR-CONNECTION #x53A297E> :CLEANUP NIL :INDENTATION-CACHE #<HASH-TABLE :TEST EQ size 61/90 #x53BEB96> :INDENTATION-CACHE-PACKAGES (#<Package "SWANK-COMPLETION-TEST"> #<Package "SWANK-IO-PACKAGE"> #<Package "SWANK"> #<Package "NREGEX"> #<Package " SWANK-BACKEND"> #<Package "SWANK-LOADER"> #<Package "ILISP"> #<Package "PPC"> #<Package "PPC32"> #<Package "OPENMCL-MOP"> #<Package "GRAY"> #<Package "OPENMCL-SOCKET"> #<Package "INSPECTOR"> #<Package "OS"> #<Package "ARCH"> #<Package "ANSI-LOOP"> #<Package "COMMON-LISP-USER"> #<Package "SETF"> #<Package "CCL"> #<Package "COMMON-LISP"> #<Package "KEYWORD">)))") (14 "(Anonymous Function #x53A235E)") (15 "(SWANK::CALL-WITH-REDIRECTED-IO #S(CONNECTION :SOCKET-IO #<TCP-STREAM (SOCKET/14) #x53BF10E> :DEDICATED-OUTPUT #<TCP-STREAM (SOCKET/15) #x53BE9E6> :USER-INPUT #<SLIME-INPUT-STREAM #x53BE5F6> :USER-OUTPUT #<TCP-STREAM (SOCKET/15) #x53BE9E6> :USER-IO #<TWO-WAY-STREAM input #<SWANK-BACKEND::SLIME-INPUT-STREAM #x53BE5F6>, output #<TCP-STREAM (SOCKET/15) #x53BE9E6> #x53BE5B6> :CONTROL-THREAD #<PROCESS control-thread(3) [Active] #x53BDD8E> :READER-THREAD #<PROCESS reader-thread(4) [Active] #x53BDB96> :REPL-THREAD #<PROCESS repl-thread(5) [Active] #x53BD9A6> :READ #<Compiled-function READ-FROM-CONTROL-THREAD #x539F94E> :SEND #<Compiled-function SEND-TO-CONTROL-THREAD #x539ED0E> :SERVE-REQUESTS #<Compiled-function SPAWN-THREADS-FOR-CONNECTION #x53A297E> :CLEANUP NIL :INDENTATION-CACHE #<HASH-TABLE :TEST EQ size 61/90 #x53BEB96> :INDENTATION-CACHE-PACKAGES (#<Package "SWANK-COMPLETION-TEST"> #<Package "SWANK-IO-PACKAGE"> #<Package "SWANK"> #<Package "NREGEX"> #<P ackage "SWANK-BACKEND"> #<Package "SWANK-LOADER"> #<Package "ILISP"> #<Package "PPC"> #<Package "PPC32"> #<Package "OPENMCL-MOP"> #<Package "GRAY"> #<Package "OPENMCL-SOCKET"> #<Package "INSPECTOR"> #<Package "OS"> #<Package "ARCH"> #<Package "ANSI-LOOP"> #<Package "COMMON-LISP-USER"> #<Package "SETF"> #<Package "CCL"> #<Package "COMMON-LISP"> #<Package "KEYWORD">)) #<COMPILED-LEXICAL-CLOSURE #x53BF9DE>)") (16 "(SWANK::REPL-LOOP #S(CONNECTION :SOCKET-IO #<TCP-STREAM (SOCKET/14) #x53BF10E> :DEDICATED-OUTPUT #<TCP-STREAM (SOCKET/15) #x53BE9E6> :USER-INPUT #<SLIME-INPUT-STREAM #x53BE5F6> :USER-OUTPUT #<TCP-STREAM (SOCKET/15) #x53BE9E6> :USER-IO #<TWO-WAY-STREAM input #<SWANK-BACKEND::SLIME-INPUT-STREAM #x53BE5F6>, output #<TCP-STREAM (SOCKET/15) #x53BE9E6> #x53BE5B6> :CONTROL-THREAD #<PROCESS control-thread(3) [Active] #x53BDD8E> :READER-THREAD #<PROCESS reader-thread(4) [Active] #x53BDB96> :REPL-THREAD #<PROCESS repl-thread(5) [Active] #x53BD9A6> :READ #<Compiled-function READ-FROM-CONTROL-THREAD #x539F94E> :SEND #<Compiled-function SEND-TO-CONTROL-THREAD #x539ED0E> :SERVE-REQUESTS #<Compiled-function SPAWN-THREADS-FOR-CONNECTION #x53A297E> :CLEANUP NIL :INDENTATION-CACHE #<HASH-TABLE :TEST EQ size 61/90 #x53BEB96> :INDENTATION-CACHE-PACKAGES (#<Package "SWANK-COMPLETION-TEST"> #<Package "SWANK-IO-PACKAGE"> #<Package "SWANK"> #<Package "NREGEX"> #<Package "SWANK -BACKEND"> #<Package "SWANK-LOADER"> #<Package "ILISP"> #<Package "PPC"> #<Package "PPC32"> #<Package "OPENMCL-MOP"> #<Package "GRAY"> #<Package "OPENMCL-SOCKET"> #<Package "INSPECTOR"> #<Package "OS"> #<Package "ARCH"> #<Package "ANSI-LOOP"> #<Package "COMMON-LISP-USER"> #<Package "SETF"> #<Package "CCL"> #<Package "COMMON-LISP"> #<Package "KEYWORD">)))") (17 "(Anonymous Function #x53A2616)") (18 "(CCL::RUN-PROCESS-INITIAL-FORM (#<COMPILED-LEXICAL-CLOSURE #x53BD96E>))") (19 "(Anonymous Function #x5103E76 (#<COMPILED-LEXICAL-CLOSURE #x53BD96E>))"))) (:debug-activate 6 1) (:emacs-rex (swank:invoke-nth-restart-for-emacs 1 2) nil 5 (lambda (G100182) (let* ((tmp-100187 G100182) (op-100185 (car tmp-100187)) (rand-100186 (cdr tmp-100187))) (cond ((eql op-100185 ':ok) (let* ((--rest--100188 rand-100186) (value (if (= (length --rest--100188) 1) (car --rest--100188) (signal 'wrong-number-of-arguments (list nil (length --rest--100188)))))) (message "Restart returned: %s" value))) ((eql op-100185 ':abort) (let* ((--rest--100189 rand-100186)) (if --rest--100189 (signal 'wrong-number-of-arguments (list nil (+ 0 (length --rest--100189))))))) (t (error "destructure-case failed: %S" tmp-100187)))))) (:return (:abort) 18) (:debug-return 6 1) (:return (:abort) 17) (:emacs-rex (swank:listener-eval "") nil :repl-thread (lambda (G100190) (let* ((tmp-100195 G100190) (op-100193 (car tmp-100195)) (rand-100194 (cdr tmp-100195))) (cond ((eql op-100193 ':ok) (let* ((--rest--100196 rand-100194) (result (if (= (length --rest--100196) 1) (car --rest--100196) (signal 'wrong-number-of-arguments (list nil (length --rest--100196)))))) (save-current-buffer (set-buffer (slime-output-buffer)) (slime-repl-insert-prompt "")))) (t (error "destructure-case failed: %S" tmp-100195))))))
*Messages*
Initial handshake... Connected on port 55315. Take this REPL, brother, and may it serve you well. (/ arg-0 &rest the-rest) [2 times]
*inferior-lisp*
Welcome to OpenMCL Version (Beta: Darwin) 0.14.1-p1! ? ; Warning: These Swank interfaces are unimplemented: ; (ADD-FD-HANDLER ADD-SIGIO-HANDLER LIST-CALLEES MACROEXPAND-ALL PROFILE PROFILE-PACKAGE PROFILE-REPORT PROFILE-RESET PROFILED-FUNCTIONS REMOVE-FD-HANDLERS REMOVE-SIGIO-HANDLERS UNPROFILE WHO-BINDS WHO-CALLS WHO-MACROEXPANDS WHO-REFERENCES WHO-SETS WHO-SPECIALIZES) ; While executing: SWANK-BACKEND::WARN-UNIMPLEMENTED-INTERFACES #P"/Users/david/usr/src/slime/slime/swank-loader.lisp" ? ;; Swank started at port: 55315. 55315 ?