CCL::RECURSIVE-LOCK-PTR

Dmitri Hrapof <[email protected]> Mon, 27 Apr 2009 21:51:48 +0400
Newsgroups gmane.lisp.openmcl.bugs
Message-ID <[email protected]>
Hello!

I'm trying to make a Windows program that reads and writes from 
stdin/stdout (CGI, actually).

With CCL "Version 1.2-r11583M  (LinuxPPC32)" my test

(defun test ()
  (format t "Hello, world!"))

(defun make ()
  (save-application "tst.exe" :toplevel-function #'test :error-handler 
:quiet
            :prepend-kernel t))

happily prints "Hello, world!" and exits.

But with Windows CCL fresh from SVN it prints

Hello, world!
 > Error: value NIL is not of the expected type CCL::RECURSIVE-LOCK.
 > While executing: CCL::RECURSIVE-LOCK-PTR, in process Initial(0).
 > Type :POP to abort, :R for a list of available restarts.
 > Error: value NIL is not of the expected type CCL::RECURSIVE-LOCK.
 > While executing: CCL::RECURSIVE-LOCK-PTR, in process Initial(0).
 > Type :POP to abort, :R for a list of available restarts.
 > Error: value NIL is not of the expected type CCL::RECURSIVE-LOCK.
....
....

and then hangs, eating CPU.

I was able to work around it by setting *standard-output* to 
(make-fd-stream 1 :direction :output)
(and believe me, you don't want to see my work-around for 
*standard-input*; suffice is to say fd wasn't 0). But my program still 
hangs in strange places (the same code runs fine with REPL and with 
SBCL), so I decided to find out the reason for CCL::RECURSIVE-LOCK-PTR 
behaviour. Any ideas?

Sincerely yours,
Dmitri