[slime-devel] Hang with cmucl 20c
Helmut Eller
heller at common-lisp.net
Thu Oct 4 10:18:49 UTC 2012
On Wed, Oct 03 2012, Harald Hanche-Olsen wrote:
[snip]
>> The output of (ql:quickload "ironclad" :verbose t) would probably
>> provide some hint in what file the problem occurs.
>
> After loading ironclad.asd, it does
>
> ; Loading #P"/home/midterm/quicklisp/dists/quicklisp/software/nibbles-2012081\
1-git/nibbles.asd".
> ; Compiling LAMBDA (.PV-CELL. .NEXT-METHOD-CALL. C S):
> ; Compiling Top-Level Form:
> ; Compiling LAMBDA (.PV-CELL. .NEXT-METHOD-CALL. C S):
> ; Compiling Top-Level Form:
> .
> ; Compiling LAMBDA (.PV-CELL. .NEXT-METHOD-CALL. OP C):
> ; Compiling Top-Level Form:
> .
> ; Compiling LAMBDA (.PV-CELL. .NEXT-METHOD-CALL. OP C):
> ; Compiling Top-Level Form:
> ; Compiling LAMBDA (.PV-CELL. .NEXT-METHOD-CALL. OP C):
> ; Compiling Top-Level Form:
> .
> ; Compiling LAMBDA (.PV-CELL. .NEXT-METHOD-CALL. OP C):
> ; Compiling Top-Level Form:
>
> and hangs.
>
> Most interestingly, if I start over and do
> CL-USER> (ql:quickload "nibbles" :verbose t)
> and then
> CL-USER> (ql:quickload "ironclad" :verbose t)
> it works. Immediately after the output shown above, the "nibbles" load
> continues with
> To load "nibbles":
> Load 1 ASDF system:
> nibbles
> ; Loading "nibbles"
> and so forth.
I think the problem occurs during loading of gray-streams. There is a
(defgeneric stream-element-type ...) which removes all methods. After
that the compiler adds new methods and generates the dispatch code for
STREAM-ELEMENT-TYPE but wants to print some progress information before
the code is ready.
It seems that the progress information is printed in
QUICKLISP-CLIENT::MACROEXPANAD-PROGRESS-FUN which is bound to
*MACROEXPAND-HOOK*. If I change the code in
quicklisp/dists/quicklisp/software/ironclad_0.31/src/octed-stream.lisp
to
#+cmu
(eval-when (:compile-toplevel :load-toplevel :execute)
(let ((*macroexpand-hook* #'funcall))
(require :gray-streams)))
the problem seems to go away.
Not sure what the right fix is. PCL::COMPILE-LAMBDA should probably
bind *MACROEXPAND-HOOK* hook in any case. SWANK could also load
gray-strams early or CMUCL could load gray-streams in the default image.
It's also debatable whether Quicklisp should bind *MACROEXPAND-HOOK*.
[snip]
>> Also is swank:*use-dedicated-output-stream* set?
>
> No. Ought it to be set?
Usually not, but the problem would probably go away as
STREAM-ELEMENT-TYPE would not be called.
Helmut
More information about the slime-devel
mailing list