[hunchentoot-devel] Starting a server hangs

Robert J. Macomber tbnl at rojoma.com
Mon Dec 18 22:09:27 UTC 2006


On Mon, Dec 18, 2006 at 09:32:52PM +0100, Edi Weitz wrote:
> This doesn't happen with LispWorks, though.  At the moment, I have no
> idea what the problem is.  Maybe an SBCL expert is reading this and
> can help.

Definitely an SBCL bug.  Paring it down, it's hanging at the call to
make-instance -- it looks like any make-instance will do, it's not
something socket-specific.  That is, this is a minimal testcase which
shows the problem is:

(defclass foo () ())
(defun foo (&aux done)
  (flet ((do-it ()
          (make-instance 'foo)
          (setf done t)))
    (sb-thread:make-thread #'do-it)
    (loop until done do (sleep 0.1))))
(foo)

Remove the make-instance, and it terminates.  Move the make-instance
into the main thread, and it terminates.  Leave it there, it hangs
(and never gets to the point of running things like shared-initialize
or lsof would report the socket is created).

CC'd sbcl-devel, since getting into CLOS+thread bugs is way beyond my
level of SBCL knowledge.  I hope that's an open list, as I'm not
subscribed there with this address.  For those on that list but not
tbnl-devel: compile-file + load'ing the above snippet hangs SBCL.
-- 
Robert Macomber
tbnl at rojoma.com



More information about the Tbnl-devel mailing list