Hi,
[Sorry if this question was asked before. I couldn't find something related in the archives.]
When I start SLIME with `M-x slime' in emacs, below lines appear in the *inferior-lisp* buffer:
(progn (load "/home/vy/elisp/slime/swank-loader.lisp" :verbose t) (funcall (read-from-string "swank-loader:init")) (funcall (read-from-string "swank:start-server") "/tmp/slime.2951" :coding-system "utf-8-unix"))
This is SBCL 1.0.19.27, an implementation of ANSI Common Lisp. ... ; loading #P"/home/vy/.slime/fasl/2008-08-14/sbcl-1.0.19.27-linux-x86-64/swank.fasl" WARNING: These Swank interfaces are unimplemented: (CALLS-WHO DISASSEMBLE-FRAME SLDB-BREAK-AT-START SLDB-BREAK-ON-RETURN WHO-SPECIALIZES) ;; Swank started at port: 56586. ;; SWANK: sb-thread::get-foreground ... 56586 *
First problem is SLIME doesn't place `/tmp/slime.<emacs-pid>' file.
1. Do I need to turn some variable on to make SLIME write the port number its accepting connections from to the port file?
Then I start a second emacs instance and try to connect the related swank session using `M-x slime-connect'. (Such a thing is possible, isn't it?) But emacs complains that
make client process failed: connection refused, :name, SLIME Lisp, :buffer, nil, :host, 127.0.0.1, :service, 5658
Then I kill (C-x k) my initial *slime-repl sbcl* buffer (typing `y' in the prompt asking me if I am sure that I want to close the existing connections too). This time emacs complains with the same error message as above and below lines appear in the *inferior-lisp* buffer.
; swank:close-connection: end of file on #<SB-SYS:FD-STREAM for "a socket" {1003442631}>
Furthermore, in any of the above cases `netstat -plunt' doesn't produce any output related with sbcl process.
2. How can I start SLIME on a dedicated TCP/IP socket?
3. Is it possible to connect to a single swank session using multiple client (SLIME) connections?
4. How can I make my swank session to not close its listener after one of clients disconnects? (Or in other words, how can I pass ":DONT-CLOSE T" option SWANK:START-SERVER within emacs?
Regards.
Volkan YAZICI yazicivo@ttmail.com writes:
This is SBCL 1.0.19.27, an implementation of ANSI Common Lisp. ... ; loading #P"/home/vy/.slime/fasl/2008-08-14/sbcl-1.0.19.27-linux-x86-64/swank.fasl" WARNING: These Swank interfaces are unimplemented: (CALLS-WHO DISASSEMBLE-FRAME SLDB-BREAK-AT-START SLDB-BREAK-ON-RETURN WHO-SPECIALIZES) ;; Swank started at port: 56586. ;; SWANK: sb-thread::get-foreground ... 56586
First problem is SLIME doesn't place `/tmp/slime.<emacs-pid>' file.
- Do I need to turn some variable on to make SLIME write the port number its accepting connections from to the port file?
The temporary file is probably deleted after the connection succeeded. You can look into the *inferior-lisp* buffer (cf. above) where the port number is shown.
Then I start a second emacs instance and try to connect the related swank session using `M-x slime-connect'. (Such a thing is possible, isn't it?) But emacs complains that
make client process failed: connection refused, :name, SLIME Lisp, :buffer, nil, :host, 127.0.0.1, :service, 5658
You cannot multiply connect to the same swank server. You can however, start several swank servers in your Lisp image if the Lisp implementation you use supports threads, or serve-event.
- How can I start SLIME on a dedicated TCP/IP socket?
You have to manually start the SWANK server, and use CREATE-SERVER's :PORT key argument.
- Is it possible to connect to a single swank session using multiple client (SLIME) connections?
No, only if you start several SWANK servers.
- How can I make my swank session to not close its listener after one of clients disconnects? (Or in other words, how can I pass ":DONT-CLOSE T" option SWANK:START-SERVER within emacs?
You can place an appropriate form into ~/.swank.lisp. Starting an inferior-lisp with :DONT-CLOSE being T doesn't generally make much sense, as the inferior-lisp process will be killed when you close Emacs.
-T.
Hi,
First, thanks so much for your prompt reply.
On Fri, 15 Aug 2008, "Tobias C. Rittweiler" tcr@freebits.de writes:
The temporary file is probably deleted after the connection succeeded. You can look into the *inferior-lisp* buffer (cf. above) where the port number is shown.
Hrm... I thought it lives in place during the lifetime of the inferior lisp process.
You cannot multiply connect to the same swank server. You can however, start several swank servers in your Lisp image if the Lisp implementation you use supports threads, or serve-event.
Got it.
You have to manually start the SWANK server, and use CREATE-SERVER's :PORT key argument.
For this purpose, I've created two small custom `inferior-lisp' and `slime-connect' functions.
(defun custom-slime-connect (host port n-tries) (assert (not (< n-tries 0))) (unless (zerop n-tries) (condition-case data (run-with-timer 0.3 nil #'slime-connect host port) (error (message "Retrying swank connection... %d" n-tries) (custom-slime-connect host port (1- n-tries))))))
(defun custom-slime () (interactive) (inferior-lisp (format "%s --load /home/vy/.swank" inferior-lisp-program)) (custom-slime-connect "127.0.0.1" 4005 10))
But this time evaluation enters into `custom-slime-connect', executes `(run-with-timer ...)' expression, *Messages* display `Connecting to Swank on port 4005...' lines (2 times) and nothing happens. Would you mind helping me to spot the problem?
Furthermore, in the *inferior-lisp* buffer started by `inferior-lisp' command, after every expression I evaluate in *inferior-lisp* buffer, it displays
;; SWANK: sb-thread::get-foreground ...
in the *inferior-lisp* buffer and the steps into the prompt. Is that something expected?
BTW, I'm quite suprised that almost everybody is satisfied with the current close-socket-on-client-disconnects behavior. My client disconnects from the inferior lisp image nearly two or three times a day. (I suspect this is because of non-latin characters, despite my coding-system set to "utf-8-unix".) And because of I cannot reconnect, I need to start SLIME from scratch, which is quite irritating. IMHO, it'd awesome if it'd be possible to start a dedicated swank server easily in SLIME.
Regards.
P.S. I couldn't instrument `custom-slime-connect' for debugging, because of swank server moves faster than me while stepping.
* Volkan YAZICI [2008-08-15 16:25+0200] writes:
But this time evaluation enters into `custom-slime-connect', executes `(run-with-timer ...)' expression, *Messages* display `Connecting to Swank on port 4005...' lines (2 times) and nothing happens. Would you mind helping me to spot the problem?
You could do something like this:
(setq slime-lisp-implementations `((sbcl-4005 ("sbcl") :init (lambda (port-file _encoding) (let ((form `(swank::setup-server 4005 (lambda (port) (swank::announce-server-port ,port-file port)) :spawn t (swank::find-external-format-or-lose"latin-1-unix")))) (format "%S\n\n" `(progn (load ,(expand-file-name "swank-loader.lisp" slime-path) :verbose t) (funcall (read-from-string "swank-loader:init")) (eval (read-from-string ,(prin1-to-string form))))))))
Then you can start it with `M- M-x slime sbcl-4005'.
Furthermore, in the *inferior-lisp* buffer started by `inferior-lisp' command, after every expression I evaluate in *inferior-lisp* buffer, it displays
;; SWANK: sb-thread::get-foreground ...
in the *inferior-lisp* buffer and the steps into the prompt. Is that something expected?
That's a debug message. I can remove that.
BTW, I'm quite suprised that almost everybody is satisfied with the current close-socket-on-client-disconnects behavior.
Keep in mind that there are two kinds of sockets. The "server socket" which accepts the connection and the "client socket" which is the actual communication channel. In absence of the :dont-close argument, we close the server socket after the first connection just to close one of the many security holes. Keeping the client socket open after Emacs disconnects is meaningless, as by then there's nobody to talk to.
I guess that most people start long running Lisp process in Screen or something like that and not from within Emacs.
My client disconnects from the inferior lisp image nearly two or three times a day. (I suspect this is because of non-latin characters, despite my coding-system set to "utf-8-unix".)
In this case, there should be an error message either in the *inferior-lisp* buffer of the *Messages* buffer.
And because of I cannot reconnect, I need to start SLIME from scratch, which is quite irritating. IMHO, it'd awesome if it'd be possible to start a dedicated swank server easily in SLIME.
If the *inferior-lisp* process is still running, and you do `M-x slime' then SLIME usually asks: "Create an additional *inferior-lisp*? (y or n)" If you answer yes, the same Lisp process opens a new server socket and lets Emacs reconnect. There are some bugs, it seems to work for the first connection but not for multiple concurrent connections.
Adding a fixed port number to slime-lisp-implementations would be easy but not very useful. I guess we could add something like `C-u PORT-NUMBER M-x slime', but I doubt that enough people need that to justify the added complexity for `M-x slime'.
Helmut.
On Fri, 15 Aug 2008, Helmut Eller heller@common-lisp.net writes:
If the *inferior-lisp* process is still running, and you do `M-x slime' then SLIME usually asks: "Create an additional *inferior-lisp*? (y or n)" If you answer yes, the same Lisp process opens a new server socket and lets Emacs reconnect. There are some bugs, it seems to work for the first connection but not for multiple concurrent connections.
`M-x slime n' sometimes work, but mostly doesn't. I managed to re-produce the case and copied the emacs backtrace. (See the bottom.) I tried nearly 15-20 times, and all resulted with the same error. I'll be really appreciated if you can help me to fix this.
Adding a fixed port number to slime-lisp-implementations would be easy but not very useful. I guess we could add something like `C-u PORT-NUMBER M-x slime', but I doubt that enough people need that to justify the added complexity for `M-x slime'.
It would be awesome if you can at least have a special variable for this.
Regards.
Debugger entered: (("Error in timer" slime-attempt-connection (#<process inferior-lisp<1>> nil 7) (file-error "make client process failed" "connection refused" :name "SLIME Lisp" :buffer nil :host "127.0.0.1" :service 39076))) (condition-case data (apply fun args) (error (debug nil ...))) slime-timer-call(slime-attempt-connection #<process inferior-lisp<1>> nil 7) apply(slime-timer-call (slime-attempt-connection #<process inferior-lisp<1>> nil 7)) byte-code("��H�H"�" [timer apply 5 6] 4) timer-event-handler([t 18604 19209 832477 nil slime-timer-call (slime-attempt-connection #<process inferior-lisp<1>> nil 7) nil]) recursive-edit() byte-code("�. @�=�!.���"���!�.A@)��=�!.���"��!�� �� !�\f�c.�ed".V�W.eb��.�y�`.db��.�.Zy�.`|�)�c�eb���� "�� ���!���..��!��� �+ه" [unread-command-char debugger-args x debugger-buffer noninteractive debugger-batch-max-lines -1 debug backtrace-debug 4 t backtrace-frame lambda 5 pop-to-buffer debugger-mode debugger-setup-buffer count-lines 2 "...\n" message "%s" buffer-string kill-emacs "" nil recursive-edit middlestart buffer-read-only standard-output] 4) debug(nil ("Error in timer" slime-attempt-connection (#<process inferior-lisp> nil 2) (file-error "make client process failed" "connection refused" :name "SLIME Lisp" :buffer nil :host "127.0.0.1" :service 51602))) (condition-case data (apply fun args) (error (debug nil ...))) slime-timer-call(slime-attempt-connection #<process inferior-lisp> nil 2) apply(slime-timer-call (slime-attempt-connection #<process inferior-lisp> nil 2)) byte-code("��H�H"�" [timer apply 5 6] 4) timer-event-handler([t 18604 19107 410339 nil slime-timer-call (slime-attempt-connection #<process inferior-lisp> nil 2) nil]) recursive-edit() byte-code("�. @�=�!.���"���!�.A@)��=�!.���"��!�� �� !�\f�c.�ed".V�W.eb��.�y�`.db��.�.Zy�.`|�)�c�eb���� "�� ���!���..��!��� �+ه" [unread-command-char debugger-args x debugger-buffer noninteractive debugger-batch-max-lines -1 debug backtrace-debug 4 t backtrace-frame lambda 5 pop-to-buffer debugger-mode debugger-setup-buffer count-lines 2 "...\n" message "%s" buffer-string kill-emacs "" nil recursive-edit middlestart buffer-read-only standard-output] 4) debug(nil ("Error in timer" slime-attempt-connection (#<process inferior-lisp> nil 2) (file-error "writing to process" "connection reset by peer" #<process SLIME Lisp>))) (condition-case data (apply fun args) (error (debug nil ...))) slime-timer-call(slime-attempt-connection #<process inferior-lisp> nil 2) apply(slime-timer-call (slime-attempt-connection #<process inferior-lisp> nil 2)) byte-code("��H�H"�" [timer apply 5 6] 4) timer-event-handler([t 18604 19087 627539 nil slime-timer-call (slime-attempt-connection #<process inferior-lisp> nil 2) nil]) recursive-edit() (progn (message "Entering recursive edit..") (recursive-edit)) (if (and slime-stack-eval-tags) (progn (message "Entering recursive edit..") (recursive-edit))) (when (and slime-stack-eval-tags) (message "Entering recursive edit..") (recursive-edit)) (save-current-buffer (set-buffer (sldb-get-buffer thread)) (unless (equal sldb-level level) (setq buffer-read-only nil) (sldb-mode) (unless sldb-saved-window-configuration ...) (setq slime-current-thread thread) (setq sldb-level level) (setq mode-name ...) (setq sldb-condition condition) (setq sldb-restarts restarts) (setq sldb-continuations conts) (sldb-insert-condition condition) (insert "\n\n" ... "\n") (sldb-insert-restarts restarts) (insert "\n" ... "\n") (setq sldb-backtrace-start-marker ...) (save-excursion ...) (run-hooks ...)) (pop-to-buffer (current-buffer)) (sldb-recenter-region (point-min) (point)) (setq buffer-read-only t) (when (and slime-stack-eval-tags) (message "Entering recursive edit..") (recursive-edit))) (with-current-buffer (sldb-get-buffer thread) (unless (equal sldb-level level) (setq buffer-read-only nil) (sldb-mode) (unless sldb-saved-window-configuration ...) (setq slime-current-thread thread) (setq sldb-level level) (setq mode-name ...) (setq sldb-condition condition) (setq sldb-restarts restarts) (setq sldb-continuations conts) (sldb-insert-condition condition) (insert "\n\n" ... "\n") (sldb-insert-restarts restarts) (insert "\n" ... "\n") (setq sldb-backtrace-start-marker ...) (save-excursion ...) (run-hooks ...)) (pop-to-buffer (current-buffer)) (sldb-recenter-region (point-min) (point)) (setq buffer-read-only t) (when (and slime-stack-eval-tags) (message "Entering recursive edit..") (recursive-edit))) sldb-setup(1 1 (#("The function MAKE-LOCK is undefined." 0 36 (face sldb-topline-face)) #(" [Condition of type UNDEFINED-FUNCTION]" 0 41 (face sldb-condition-face)) nil) ((#("DEFAULT-DEBUGGER" 0 16 ...) #("Use default debugger." 0 21 ...)) (#("ABORT" 0 5 ...) #("Abort SLIME compilation." 0 24 ...)) (#("ABORT" 0 5 ...) #("Return to SLIME's top level." 0 28 ...)) (#("TERMINATE-THREAD" 0 16 ...) #("Terminate this thread (#<THREAD "worker" RUNNING {1003156EA1}>)" 0 63 ...))) ((0 #("("bogus stack frame")" 0 21 ...)) (1 #("(SB-FASL::FOP-FUNCALL-FOR-EFFECT)" 0 33 ...)) (2 #("(SB-FASL::LOAD-FASL-GROUP #<SB-SYS:FD-STREAM for "file /tmp/file0bBNMP.fasl" {1003286831}>)" 0 91 ...)) (3 #("((FLET SB-THREAD::WITH-RECURSIVE-LOCK-THUNK))" 0 45 ...)) (4 #("((FLET #:WITHOUT-INTERRUPTS-BODY-[CALL-WITH-RECURSIVE-LOCK]508))" 0 64 ...)) (5 #("(SB-THREAD::CALL-WITH-RECURSIVE-LOCK #<CLOSURE (FLET SB-THREAD::WITH-RECURSIVE-LOCK-THUNK) {2B6EAA186DE9}> #S(SB-THREAD:MUTEX :NAME "big compiler lock" :%OWNER #<SB-THREAD:THREAD "worker" RUNNING {1003156EA1}> :STATE 1))" 0 220 ...)) (6 #("(SB-FASL::LOAD-AS-FASL #<SB-SYS:FD-STREAM for "file /tmp/file0bBNMP.fasl" {1003286831}> NIL #<unavailable argument>)" 0 116 ...)) (7 #("((FLET SB-FASL::LOAD-STREAM) #<SB-SYS:FD-STREAM for "file /tmp/file0bBNMP.fasl" {1003286831}>)" 0 94 ...)) (8 #("(LOAD #P"/tmp/file0bBNMP.fasl")[:EXTERNAL]" 0 42 ...)) (9 #("((LAMBDA (STRING &KEY SWANK-BACKEND::BUFFER POSITION DIRECTORY DEBUG)) "(let ((generator-lock (make-lock))\n (generator-counter 0))\n (defun generator-proc ()\n (with-lock-held (generator-lock)\n (loop for counter = (incf generator-counter)\n when (zerop (1- (mod (expt 2 (1- counter)) counter)))\n do (return-from generator-proc counter)))))\n" :BUFFER "sbcl-thread-profile-bug.lisp" :POSITION 144 :DIRECTORY "/tmp/" :DEBUG NIL)" 0 458 ...)) (10 #("((LAMBDA NIL))" 0 14 ...)) (11 "(SWANK::MEASURE-TIME-INTERVAL #<CLOSURE (LAMBDA NIL) {1003159109}>)") (12 "(SWANK::SWANK-COMPILER #<CLOSURE (LAMBDA NIL) {1003159109}>)") (13 "(SWANK::CALL-WITH-BUFFER-SYNTAX NIL #<CLOSURE (LAMBDA NIL) {10031590B9}>)") (14 "(SWANK:COMPILE-STRING-FOR-EMACS "(let ((generator-lock (make-lock))\n (generator-counter 0))\n (defun generator-proc ()\n (with-lock-held (generator-lock)\n (loop for counter = (incf generator-counter)\n when (zerop (1- (mod (expt 2 (1- counter)) counter)))\n do (return-from generator-proc counter)))))\n" "sbcl-thread-profile-bug.lisp" 144 "/tmp/" NIL)") (15 "(SB-INT:SIMPLE-EVAL-IN-LEXENV (SWANK:COMPILE-STRING-FOR-EMACS "(let ((generator-lock (make-lock))\n (generator-counter 0))\n (defun generator-proc ()\n (with-lock-held (generator-lock)\n (loop for counter = (incf generator-counter)\n when (zerop (1- (mod (expt 2 (1- counter)) counter)))\n do (return-from generator-proc counter)))))\n" "sbcl-thread-profile-bug.lisp" 144 "/tmp/" (QUOTE NIL)) #<NULL-LEXENV>)") (16 "(SWANK::EVAL-FOR-EMACS (SWANK:COMPILE-STRING-FOR-EMACS "(let ((generator-lock (make-lock))\n (generator-counter 0))\n (defun generator-proc ()\n (with-lock-held (generator-lock)\n (loop for counter = (incf generator-counter)\n when (zerop (1- (mod (expt 2 (1- counter)) counter)))\n do (return-from generator-proc counter)))))\n" "sbcl-thread-profile-bug.lisp" 144 "/tmp/" (QUOTE NIL)) ":test" 7)") (17 "(SWANK::PROCESS-REQUESTS NIL T)") (18 "((LAMBDA NIL))") (19 "((LAMBDA (SWANK-BACKEND::HOOK SWANK-BACKEND::FUN)) #<FUNCTION SWANK:SWANK-DEBUGGER-HOOK> #<CLOSURE (LAMBDA NIL) {1003148FB9}>)")) (7)) slime-dispatch-event((:debug 1 1 (#("The function MAKE-LOCK is undefined." 0 36 ...) #(" [Condition of type UNDEFINED-FUNCTION]" 0 41 ...) nil) ((#("DEFAULT-DEBUGGER" 0 16 ...) #("Use default debugger." 0 21 ...)) (#("ABORT" 0 5 ...) #("Abort SLIME compilation." 0 24 ...)) (#("ABORT" 0 5 ...) #("Return to SLIME's top level." 0 28 ...)) (#("TERMINATE-THREAD" 0 16 ...) #("Terminate this thread (#<THREAD "worker" RUNNING {1003156EA1}>)" 0 63 ...))) ((0 #("("bogus stack frame")" 0 21 ...)) (1 #("(SB-FASL::FOP-FUNCALL-FOR-EFFECT)" 0 33 ...)) (2 #("(SB-FASL::LOAD-FASL-GROUP #<SB-SYS:FD-STREAM for "file /tmp/file0bBNMP.fasl" {1003286831}>)" 0 91 ...)) (3 #("((FLET SB-THREAD::WITH-RECURSIVE-LOCK-THUNK))" 0 45 ...)) (4 #("((FLET #:WITHOUT-INTERRUPTS-BODY-[CALL-WITH-RECURSIVE-LOCK]508))" 0 64 ...)) (5 #("(SB-THREAD::CALL-WITH-RECURSIVE-LOCK #<CLOSURE (FLET SB-THREAD::WITH-RECURSIVE-LOCK-THUNK) {2B6EAA186DE9}> #S(SB-THREAD:MUTEX :NAME "big compiler lock" :%OWNER #<SB-THREAD:THREAD "worker" RUNNING {1003156EA1}> :STATE 1))" 0 220 ...)) (6 #("(SB-FASL::LOAD-AS-FASL #<SB-SYS:FD-STREAM for "file /tmp/file0bBNMP.fasl" {1003286831}> NIL #<unavailable argument>)" 0 116 ...)) (7 #("((FLET SB-FASL::LOAD-STREAM) #<SB-SYS:FD-STREAM for "file /tmp/file0bBNMP.fasl" {1003286831}>)" 0 94 ...)) (8 #("(LOAD #P"/tmp/file0bBNMP.fasl")[:EXTERNAL]" 0 42 ...)) (9 #("((LAMBDA (STRING &KEY SWANK-BACKEND::BUFFER POSITION DIRECTORY DEBUG)) "(let ((generator-lock (make-lock))\n (generator-counter 0))\n (defun generator-proc ()\n (with-lock-held (generator-lock)\n (loop for counter = (incf generator-counter)\n when (zerop (1- (mod (expt 2 (1- counter)) counter)))\n do (return-from generator-proc counter)))))\n" :BUFFER "sbcl-thread-profile-bug.lisp" :POSITION 144 :DIRECTORY "/tmp/" :DEBUG NIL)" 0 458 ...)) (10 #("((LAMBDA NIL))" 0 14 ...)) (11 "(SWANK::MEASURE-TIME-INTERVAL #<CLOSURE (LAMBDA NIL) {1003159109}>)") (12 "(SWANK::SWANK-COMPILER #<CLOSURE (LAMBDA NIL) {1003159109}>)") (13 "(SWANK::CALL-WITH-BUFFER-SYNTAX NIL #<CLOSURE (LAMBDA NIL) {10031590B9}>)") (14 "(SWANK:COMPILE-STRING-FOR-EMACS "(let ((generator-lock (make-lock))\n (generator-counter 0))\n (defun generator-proc ()\n (with-lock-held (generator-lock)\n (loop for counter = (incf generator-counter)\n when (zerop (1- (mod (expt 2 (1- counter)) counter)))\n do (return-from generator-proc counter)))))\n" "sbcl-thread-profile-bug.lisp" 144 "/tmp/" NIL)") (15 "(SB-INT:SIMPLE-EVAL-IN-LEXENV (SWANK:COMPILE-STRING-FOR-EMACS "(let ((generator-lock (make-lock))\n (generator-counter 0))\n (defun generator-proc ()\n (with-lock-held (generator-lock)\n (loop for counter = (incf generator-counter)\n when (zerop (1- (mod (expt 2 (1- counter)) counter)))\n do (return-from generator-proc counter)))))\n" "sbcl-thread-profile-bug.lisp" 144 "/tmp/" (QUOTE NIL)) #<NULL-LEXENV>)") (16 "(SWANK::EVAL-FOR-EMACS (SWANK:COMPILE-STRING-FOR-EMACS "(let ((generator-lock (make-lock))\n (generator-counter 0))\n (defun generator-proc ()\n (with-lock-held (generator-lock)\n (loop for counter = (incf generator-counter)\n when (zerop (1- (mod (expt 2 (1- counter)) counter)))\n do (return-from generator-proc counter)))))\n" "sbcl-thread-profile-bug.lisp" 144 "/tmp/" (QUOTE NIL)) ":test" 7)") (17 "(SWANK::PROCESS-REQUESTS NIL T)") (18 "((LAMBDA NIL))") (19 "((LAMBDA (SWANK-BACKEND::HOOK SWANK-BACKEND::FUN)) #<FUNCTION SWANK:SWANK-DEBUGGER-HOOK> #<CLOSURE (LAMBDA NIL) {1003148FB9}>)")) (7)) #<process SLIME Lisp>) slime-process-available-input(#<process SLIME Lisp>) slime-net-filter(#<process SLIME Lisp> "000CFD(:debug 1 1 ("The function MAKE-LOCK is undefined." " [Condition of type UNDEFINED-FUNCTION]" nil) (("DEFAULT-DEBUGGER" "Use default debugger.") ("ABORT" "Abort SLIME compilation.") ("ABORT" "Return to SLIME's top level.") ("TERMINATE-THREAD" "Terminate this thread (#<THREAD \"worker\" RUNNING {1003156EA1}>)")) ((0 "(\"bogus stack frame\")") (1 "(SB-FASL::FOP-FUNCALL-FOR-EFFECT)") (2 "(SB-FASL::LOAD-FASL-GROUP #<SB-SYS:FD-STREAM for \"file /tmp/file0bBNMP.fasl\" {1003286831}>)") (3 "((FLET SB-THREAD::WITH-RECURSIVE-LOCK-THUNK))") (4 "((FLET #:WITHOUT-INTERRUPTS-BODY-[CALL-WITH-RECURSIVE-LOCK]508))") (5 "(SB-THREAD::CALL-WITH-RECURSIVE-LOCK #<CLOSURE (FLET SB-THREAD::WITH-RECURSIVE-LOCK-THUNK) {2B6EAA186DE9}> #S(SB-THREAD:MUTEX :NAME \"big compiler lock\" :%OWNER #<SB-THREAD:THREAD \"worker\" RUNNING {1003156EA1}> :STATE 1))") (6 "(SB-FASL::LOAD-AS-FASL #<SB-SYS:FD-STREAM for \"file /tmp/file0bBNMP.fasl\" {1003286831}> NIL #<unavailable argument>)") (7 "((FLET SB-FASL::LOAD-STREAM) #<SB-SYS:FD-STREAM for \"file /tmp/file0bBNMP.fasl\" {1003286831}>)") (8 "(LOAD #P\"/tmp/file0bBNMP.fasl\")[:EXTERNAL]") (9 "((LAMBDA (STRING &KEY SWANK-BACKEND::BUFFER POSITION DIRECTORY DEBUG)) \"(let ((generator-lock (make-lock))\n (generator-counter 0))\n (defun generator-proc ()\n (with-lock-held (generator-lock)\n (loop for counter = (incf generator-counter)\n when (zerop (1- (mod (expt 2 (1- counter)) counter)))\n do (return-from generator-proc counter)))))\n\" :BUFFER \"sbcl-thread-profile-bug.lisp\" :POSITION 144 :DIRECTORY \"/tmp/\" :DEBUG NIL)") (10 "((LAMBDA NIL))") (11 "(SWANK::MEASURE-TIME-INTERVAL #<CLOSURE (LAMBDA NIL) {1003159109}>)") (12 "(SWANK::SWANK-COMPILER #<CLOSURE (LAMBDA NIL) {1003159109}>)") (13 "(SWANK::CALL-WITH-BUFFER-SYNTAX NIL #<CLOSURE (LAMBDA NIL) {10031590B9}>)") (14 "(SWANK:COMPILE-STRING-FOR-EMACS \"(let ((generator-lock (make-lock))\n (generator-counter 0))\n (defun generator-proc ()\n (with-lock-held (generator-lock)\n (loop for counter = (incf generator-counter)\n when (zerop (1- (mod (expt 2 (1- counter)) counter)))\n do (return-from generator-proc counter)))))\n\" \"sbcl-thread-profile-bug.lisp\" 144 \"/tmp/\" NIL)") (15 "(SB-INT:SIMPLE-EVAL-IN-LEXENV (SWANK:COMPILE-STRING-FOR-EMACS \"(let ((generator-lock (make-lock))\n (generator-counter 0))\n (defun generator-proc ()\n (with-lock-held (generator-lock)\n (loop for counter = (incf generator-counter)\n when (zerop (1- (mod (expt 2 (1- counter)) counter)))\n do (return-from generator-proc counter)))))\n\" \"sbcl-thread-profile-bug.lisp\" 144 \"/tmp/\" (QUOTE NIL)) #<NULL-LEXENV>)") (16 "(SWANK::EVAL-FOR-EMACS (SWANK:COMPILE-STRING-FOR-EMACS \"(let ((generator-lock (make-lock))\n (generator-counter 0))\n (defun generator-proc ()\n (with-lock-held (generator-lock)\n (loop for counter = (incf generator-counter)\n when (zerop (1- (mod (expt 2 (1- counter)) counter)))\n do (return-from generator-proc counter)))))\n\" \"sbcl-thread-profile-bug.lisp\" 144 \"/tmp/\" (QUOTE NIL)) \":test\" 7)") (17 "(SWANK::PROCESS-REQUESTS NIL T)") (18 "((LAMBDA NIL))") (19 "((LAMBDA (SWANK-BACKEND::HOOK SWANK-BACKEND::FUN)) #<FUNCTION SWANK:SWANK-DEBUGGER-HOOK> #<CLOSURE (LAMBDA NIL) {1003148FB9}>)")) (7))000019(:debug-activate 1 1 nil)") recursive-edit() byte-code("�. @�=�!.���"���!�.A@)��=�!.���"��!�� �� !�\f�c.�ed".V�W.eb��.�y�`.db��.�.Zy�.`|�)�c�eb���� "�� ���!���..��!��� �+ه" [unread-command-char debugger-args x debugger-buffer noninteractive debugger-batch-max-lines -1 debug backtrace-debug 4 t backtrace-frame lambda 5 pop-to-buffer debugger-mode debugger-setup-buffer count-lines 2 "...\n" message "%s" buffer-string kill-emacs "" nil recursive-edit middlestart buffer-read-only standard-output] 4) debug(t) * (unless (eq (process-status conn) (quote open)) (error "Lisp connection closed unexpectedly")) (while t (unless (eq ... ...) (error "Lisp connection closed unexpectedly")) (slime-accept-process-output nil 0.01)) (let ((debug-on-quit t) (inhibit-quit nil) (conn ...)) (while t (unless ... ...) (slime-accept-process-output nil 0.01))) (catch tag (slime-rex (tag sexp) (sexp package) (... ... ...) (... ...)) (let (... ... ...) (while t ... ...))) (apply (function funcall) (catch tag (slime-rex ... ... ... ...) (let ... ...))) (let* ((tag ...) (slime-stack-eval-tags ...)) (apply (function funcall) (catch tag ... ...))) slime-eval((swank:frame-catch-tags-for-emacs 0)) sldb-catch-tags(0) (let* ((frame ...) (num ...) (catches ...) (locals ...)) (destructuring-bind (start end) (sldb-frame-region) (list start end frame locals catches))) sldb-frame-details() (let* ((--cl-rest-- ...) (start ...) (end ...) (frame ...) (locals ...) (catches ...)) (slime-save-coordinates start (delete-region start end) (slime-propertize-region ... ... ...)) (sldb-recenter-region start end)) (progn (let* (... ... ... ... ... ...) (slime-save-coordinates start ... ...) (sldb-recenter-region start end))) (destructuring-bind (start end frame locals catches) (sldb-frame-details) (slime-save-coordinates start (delete-region start end) (slime-propertize-region ... ... ...)) (sldb-recenter-region start end)) sldb-show-frame-details() (if (or on (not ...)) (sldb-show-frame-details) (sldb-hide-frame-details)) (let ((inhibit-read-only t) (inhibit-point-motion-hooks t)) (if (or on ...) (sldb-show-frame-details) (sldb-hide-frame-details))) sldb-toggle-details() funcall(sldb-toggle-details) (if fn (funcall fn)) (let ((fn ...)) (if fn (funcall fn))) sldb-default-action() call-interactively(sldb-default-action nil nil) recursive-edit() byte-code("�. @�=�!.���"���!�.A@)��=�!.���"��!�� �� !�\f�c.�ed".V�W.eb��.�y�`.db��.�.Zy�.`|�)�c�eb���� "�� ���!���..��!��� �+ه" [unread-command-char debugger-args x debugger-buffer noninteractive debugger-batch-max-lines -1 debug backtrace-debug 4 t backtrace-frame lambda 5 pop-to-buffer debugger-mode debugger-setup-buffer count-lines 2 "...\n" message "%s" buffer-string kill-emacs "" nil recursive-edit middlestart buffer-read-only standard-output] 4) debug(nil ("Error in timer" slime-attempt-connection (#<process inferior-lisp> nil 2) (file-error "writing to process" "connection reset by peer" #<process SLIME Lisp>))) (condition-case data (apply fun args) (error (debug nil ...))) slime-timer-call(slime-attempt-connection #<process inferior-lisp> nil 2) apply(slime-timer-call (slime-attempt-connection #<process inferior-lisp> nil 2)) byte-code("��H�H"�" [timer apply 5 6] 4) timer-event-handler([t 18604 16224 490468 nil slime-timer-call (slime-attempt-connection #<process inferior-lisp> nil 2) nil]) recursive-edit() byte-code("�. @�=�!.���"���!�.A@)��=�!.���"��!�� �� !�\f�c.�ed".V�W.eb��.�y�`.db��.�.Zy�.`|�)�c�eb���� "�� ���!���..��!��� �+ه" [unread-command-char debugger-args x debugger-buffer noninteractive debugger-batch-max-lines -1 debug backtrace-debug 4 t backtrace-frame lambda 5 pop-to-buffer debugger-mode debugger-setup-buffer count-lines 2 "...\n" message "%s" buffer-string kill-emacs "" nil recursive-edit middlestart buffer-read-only standard-output] 4) debug(nil ("Error in timer" slime-attempt-connection (#<process inferior-lisp> nil 22) (file-error "writing to process" "connection reset by peer" #<process SLIME Lisp>))) (condition-case data (apply fun args) (error (debug nil ...))) slime-timer-call(slime-attempt-connection #<process inferior-lisp> nil 22) apply(slime-timer-call (slime-attempt-connection #<process inferior-lisp> nil 22)) byte-code("��H�H"�" [timer apply 5 6] 4) timer-event-handler([t 18604 16212 406912 nil slime-timer-call (slime-attempt-connection #<process inferior-lisp> nil 22) nil])