Hi,
I've been looking into that unbound memory consumption situation when directly connecting to TBNL (that doesn't happen when going through mod_lisp or Araneida and only seems to happen on OS/X).
I put some debugging statements into KMRCL and have (finally) noticed something that was blindingly obvious before.
There is a KMRCL function lw-worker in listener.lisp that is called for every request made to TBNL directly. It is called only once (or, at least, a very few times) if TBNL is invoked indirectly (i.e. via mod_lisp or Araneida). The call to this function is through a lambda that is defined in make-socket-server and passed to comm:start-up-server.
I am assuming at this point that this has something to do with the problem.
Now, I don't really understand what is going on here. I will continue to look into this, but if anyone happens to already know what is going on here I'd love to hear about it.
Cheers, Bob
On Apr 1, 2005, at 5:14 PM, Bob Hutchison wrote:
Hi,
I've been looking into that unbound memory consumption situation when directly connecting to TBNL (that doesn't happen when going through mod_lisp or Araneida and only seems to happen on OS/X).
I put some debugging statements into KMRCL and have (finally) noticed something that was blindingly obvious before.
There is a KMRCL function lw-worker in listener.lisp that is called for every request made to TBNL directly. It is called only once (or, at least, a very few times) if TBNL is invoked indirectly (i.e. via mod_lisp or Araneida). The call to this function is through a lambda that is defined in make-socket-server and passed to comm:start-up-server.
A bit more specific information. In the worker initializer there is a lambda being assigned to the thread-fun slot. In the case of mod_lisp->TBNL this function very rarely returns (but it does). In the case of browser->TBNL this function always returns.
So it turns out that the tbnl::listen-for-request function is returning. Don't know why yet.
How could this be chewing up memory? Where is the bug, surely returning from the listener-function should cause things to be cleaned up?
I am assuming at this point that this has something to do with the problem.
Now, I don't really understand what is going on here. I will continue to look into this, but if anyone happens to already know what is going on here I'd love to hear about it.
Cheers, Bob
---- Bob Hutchison -- blogs at http://www.recursive.ca/hutch/ Recursive Design Inc. -- http://www.recursive.ca/