On 05 Mar 2005 11:29:07 +0100, Luke Gorrie luke@synap.se wrote:
Please put something like this in your .swank.lisp:
(setq swank::*log-output* (open "/tmp/log.txt" :direction :output)) (setq swank:*log-events* t)
and then save and post the log file the next time this happens.
OK, I think I now have a reproducible test case although it involves a rather large system using various third-party libraries.
It turns out that if I wait long enough SLIME returns and I don't have to kill Emacs.
The offending part of the log file looks like this (imagine a very long pause between the first lines where slime-edit-definition is invoked and the rest):
READ: (:emacs-rex (swank:find-definitions-for-emacs "get-projects-for-costs") ":acc" t 7)
DISPATCHING: (:EMACS-REX (SWANK:FIND-DEFINITIONS-FOR-EMACS "get-projects-for-costs") ":acc" T 7) DISPATCHING: (:DEBUG #<Process Idle Loop {58004595}> 1 ("Heap (dynamic space) overflow" " [Condition of type KERNEL:HEAP-OVERFLOW]" NIL NIL) (("ABORT" "Abort handling SLIME request.") ("CONTINUE" "Return NIL from load of "home:.cmucl-init".") ("ABORT" "Skip remaining initializations.")) ((0 "((METHOD SWANK-BACKEND:CALL-WITH-DEBUGGING-ENVIRONMENT NIL (T)) #<#1=unused-arg> #<#1#> #<Function "DEFUN DEBUG-IN-EMACS" {59CFEEF1}>)") (1 "(SWANK::CALL-WITH-BINDINGS ((*PRINT-PRETTY*) (*PRINT-LEVEL* . 4) (*PRINT-LENGTH* . 10) (*PRINT-CIRCLE* . T) (*PRINT-READABLY*) ...) #<Function "DEFUN DEBUG-IN-EMACS" {59CFEEB1}>)") (2 "(SWANK::DEBUG-IN-EMACS #<KERNEL:HEAP-OVERFLOW {77F0003D}>)") (3 "(INVOKE-DEBUGGER #<KERNEL:HEAP-OVERFLOW {77F0003D}>)") (4 "(ERROR KERNEL:HEAP-OVERFLOW)") (5 "(KERNEL:DYNAMIC-SPACE-OVERFLOW-WARNING-HIT)")) (7)) WRITE: (:debug 0 1 ("Heap (dynamic space) overflow" " [Condition of type KERNEL:HEAP-OVERFLOW]" nil nil) (("ABORT" "Abort handling SLIME request.") ("CONTINUE" "Return NIL from load of "home:.cmucl-init".") ("ABORT" "Skip remaining initializations.")) ((0 "((METHOD SWANK-BACKEND:CALL-WITH-DEBUGGING-ENVIRONMENT NIL (T)) #<#1=unused-arg> #<#1#> #<Function "DEFUN DEBUG-IN-EMACS" {59CFEEF1}>)") (1 "(SWANK::CALL-WITH-BINDINGS ((*PRINT-PRETTY*) (*PRINT-LEVEL* . 4) (*PRINT-LENGTH* . 10) (*PRINT-CIRCLE* . T) (*PRINT-READABLY*) ...) #<Function "DEFUN DEBUG-IN-EMACS" {59CFEEB1}>)") (2 "(SWANK::DEBUG-IN-EMACS #<KERNEL:HEAP-OVERFLOW {77F0003D}>)") (3 "(INVOKE-DEBUGGER #<KERNEL:HEAP-OVERFLOW {77F0003D}>)") (4 "(ERROR KERNEL:HEAP-OVERFLOW)") (5 "(KERNEL:DYNAMIC-SPACE-OVERFLOW-WARNING-HIT)")) (7)) DISPATCHING: (:DEBUG-ACTIVATE #<Process Idle Loop {58004595}> 1) WRITE: (:debug-activate 0 1) READ: (:emacs-rex (swank:backtrace 1 40) nil 0 8)
DISPATCHING: (:EMACS-REX (SWANK:BACKTRACE 1 40) NIL 0 8) DISPATCHING: (:RETURN #<Process Idle Loop {58004595}> (:OK ((1 "(SWANK::CALL-WITH-BINDINGS ((*PRINT-PRETTY*) (*PRINT-LEVEL* . 4) (*PRINT-LENGTH* . 10) (*PRINT-CIRCLE* . T) (*PRINT-READABLY*) ...) #<Function "DEFUN DEBUG-IN-EMACS" {59CFEEB1}>)") (2 "(SWANK::DEBUG-IN-EMACS #<KERNEL:HEAP-OVERFLOW {77F0003D}>)") (3 "(INVOKE-DEBUGGER #<KERNEL:HEAP-OVERFLOW {77F0003D}>)") (4 "(ERROR KERNEL:HEAP-OVERFLOW)") (5 "(KERNEL:DYNAMIC-SPACE-OVERFLOW-WARNING-HIT)"))) 8) WRITE: (:return (:ok ((1 "(SWANK::CALL-WITH-BINDINGS ((*PRINT-PRETTY*) (*PRINT-LEVEL* . 4) (*PRINT-LENGTH* . 10) (*PRINT-CIRCLE* . T) (*PRINT-READABLY*) ...) #<Function "DEFUN DEBUG-IN-EMACS" {59CFEEB1}>)") (2 "(SWANK::DEBUG-IN-EMACS #<KERNEL:HEAP-OVERFLOW {77F0003D}>)") (3 "(INVOKE-DEBUGGER #<KERNEL:HEAP-OVERFLOW {77F0003D}>)") (4 "(ERROR KERNEL:HEAP-OVERFLOW)") (5 "(KERNEL:DYNAMIC-SPACE-OVERFLOW-WARNING-HIT)"))) 8) DISPATCHING: (:DEBUG-ACTIVATE #<Process Idle Loop {58004595}> 1) WRITE: (:debug-activate 0 1) READ: (:emacs-rex (swank:frame-locals-for-emacs 1) nil 0 9)
Here's the debugging info I get from within SLIME:
Heap (dynamic space) overflow [Condition of type KERNEL:HEAP-OVERFLOW]
Restarts: 0: [ABORT] Abort handling SLIME request. 1: [CONTINUE] Return NIL from load of "home:.cmucl-init". 2: [ABORT] Skip remaining initializations.
Backtrace: 0: ((METHOD SWANK-BACKEND:CALL-WITH-DEBUGGING-ENVIRONMENT NIL (T)) #<#1=unused-arg> #<#1#> #<Function "DEFUN DEBUG-IN-EMACS" {59CFEEF1}>) 1: (SWANK::CALL-WITH-BINDINGS ((*PRINT-PRETTY*) (*PRINT-LEVEL* . 4) (*PRINT-LENGTH* . 10) (*PRINT-CIRCLE* . T) (*PRINT-READABLY*) ...) #<Function "DEFUN DEBUG-IN-EMACS" {59CFEEB1}>) Locals: SWANK::ALIST = ((*PRINT-PRETTY*) (*PRINT-LEVEL* . 4) (*PRINT-LENGTH* . 10) (*PRINT-CIRCLE* . T) (*PRINT-READABLY*) (*PRINT-PPRINT-DISPATCH* . #<PRETTY-PRINT::PPRINT-DISPATCH-TABLE {61E70BCD}>) (*PRINT-GENSYM* . T) (*PRINT-BASE* . 10) (*PRINT-RADIX*) (*PRINT-ARRAY* . T) ...) SWANK::FUN = #<Function "DEFUN DEBUG-IN-EMACS" {59CFEEB1}> FUNCTION = #:INVALID C::VALS = #:INVALID C::VARS = #:INVALID [No catch-tags] 2: (SWANK::DEBUG-IN-EMACS #<KERNEL:HEAP-OVERFLOW {77F0003D}>) Locals: CONDITION = #<KERNEL:HEAP-OVERFLOW {77F0003D}> [No catch-tags] 3: (INVOKE-DEBUGGER #<KERNEL:HEAP-OVERFLOW {77F0003D}>) Locals: CONDITION = #<KERNEL:HEAP-OVERFLOW {77F0003D}> FUNCTION = #:INVALID DEBUG::HOOK = #:INVALID [No catch-tags] 4: (ERROR KERNEL:HEAP-OVERFLOW) Locals: CONDITIONS::ARGUMENTS = NIL CONDITION = #:INVALID CONDITIONS::DATUM = KERNEL:HEAP-OVERFLOW CONDITIONS::FRAME = #:INVALID CONDITIONS::NAME = #:INVALID [No catch-tags] 5: (KERNEL:DYNAMIC-SPACE-OVERFLOW-WARNING-HIT) Locals: [No catch-tags]
What seems strange to me is that one of the restarts I get is
Return NIL from load of "home:.cmucl-init".
At that point loading of ~/.cmucl-init should have been history already.
Let me know if you need more info. I can send you the whole code if needed but I don't want to post it to the list - it's big and ugly and part of a commercial project.
Cheers, Edi.