Running SBCL 0.9.6 with TBNL 0.8.4 and Apache 2.0.54 with mod_lisp2, the image download examples work as expected, but uploading any binary file results in a 500 Internal Server Error being throw by Apache. No error is reported in Lisp, but the Apache log file error_log shows the following entry:
[error] (70014)End of file found: error reading from Lisp
Setting apache to log in debug mode doesn't provide any additional insight, but some testing and modification of the mod_lisp2.c code showed that the error is starting at line 588 where mod_lisp attempts to read the first of the headers. This leads back to read_lisp_line(), then deeper to fill_input_buffer(), where the failure seems to originate at the call to:
RELAY_ERROR (((length = (sizeof (buffer->data))), (apr_recv (socket, (buffer->data), (&length)))));
With *DEBUG-MODE* set to t, *COMMAND* contains seemingly plausible headers (shown below).
I am not familiar enough with the internals to have much of an idea of what is causing the breakdown, though the C code seems to suggest that lisp is sending a different amount of data than is promised.
I'm happy to dig into either the TBNL, KMRCL, or mod_lisp2.c code and come up with a patch for this, but it would be tremendously helpful if someone has a good idea of where to start and what the problem might be.
Cheers,
-- Travis
*COMMAND* after failed file upload:
(("content-stream" . #<SB-SYS:FD-STREAM for "a constant string" {9CEF2D9}>) ("server-protocol" . "HTTP/1.1") ("method" . "POST") ("url" . "/tbnl/test/upload.html") ("content-type" . "multipart/form-data; boundary=---------------------------130786897319483305451172113725") ("content-length" . "281039") ("server-ip-addr" . "127.0.0.1") ("server-ip-port" . "80") ("remote-ip-addr" . "127.0.0.1") ("script-filename" . "/usr/htdocs") ("remote-ip-port" . "48073") ("server-id" . "tbnl") ("server-baseversion" . "Apache/2.0.54") ("modlisp-version" . "1.2") ("modlisp-major-version" . "2") ("Host" . "localhost") ("User-Agent" . "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.10) Gecko/20050829 Firefox/1.0.6") ("Accept" . "text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5") ("Accept-Language" . "en-us,en;q=0.5") ("Accept-Encoding" . "gzip,deflate") ("Accept-Charset" . "ISO-8859-1,utf-8;q=0.7,*;q=0.7") ("Keep-Alive" . "300") ("Connection" . "keep-alive") ("Referer" . "http://localhost/tbnl/test/upload.html") ("Cookie" . "pumpkin=barking") ("Authorization" . "Basic bmFub29rOmlnbG9v") ("Content-Type" . "multipart/form-data; boundary=---------------------------130786897319483305451172113725") ("Content-Length" . "281039"))
On Thu, 03 Nov 2005 12:13:41 -0500, Travis Cross travis@crosswirecorp.com wrote:
Running SBCL 0.9.6 with TBNL 0.8.4 and Apache 2.0.54 with mod_lisp2, the image download examples work as expected,
Hmm, I just tried with SBCL 0.9.6 in TBNL's "stand-alone" mode and only the first image download example worked for me.
but uploading any binary file results in a 500 Internal Server Error being throw by Apache. No error is reported in Lisp, but the Apache log file error_log shows the following entry:
[error] (70014)End of file found: error reading from Lisp
Setting apache to log in debug mode doesn't provide any additional insight, but some testing and modification of the mod_lisp2.c code showed that the error is starting at line 588 where mod_lisp attempts to read the first of the headers. This leads back to read_lisp_line(), then deeper to fill_input_buffer(), where the failure seems to originate at the call to:
RELAY_ERROR (((length = (sizeof (buffer->data))), (apr_recv (socket, (buffer->data), (&length)))));
With *DEBUG-MODE* set to t, *COMMAND* contains seemingly plausible headers (shown below).
I am not familiar enough with the internals to have much of an idea of what is causing the breakdown, though the C code seems to suggest that lisp is sending a different amount of data than is promised.
I'm happy to dig into either the TBNL, KMRCL, or mod_lisp2.c code and come up with a patch for this, but it would be tremendously helpful if someone has a good idea of where to start and what the problem might be.
I don't really have an idea but I'd advise you to track this down without Apache - use TBNL without a back-end. I'm pretty sure the problem is TBNL not properly supporting SBCL's Unicode branch and it's not related to Apache or mod_lisp.
You might want to experiment with different locale settings and see if it makes a difference.
Cheers, Edi.
Edi Weitz wrote:
On Thu, 03 Nov 2005 12:13:41 -0500, Travis Cross travis@crosswirecorp.com wrote:
Running SBCL 0.9.6 with TBNL 0.8.4 and Apache 2.0.54 with mod_lisp2, the image download examples work as expected,
Hmm, I just tried with SBCL 0.9.6 in TBNL's "stand-alone" mode and only the first image download example worked for me.
Makes sense. I was running with a version of kmrcl that I had patched for testing.
I don't really have an idea but I'd advise you to track this down without Apache - use TBNL without a back-end. I'm pretty sure the problem is TBNL not properly supporting SBCL's Unicode branch and it's not related to Apache or mod_lisp.
Thanks. I managed to track this issue down. It turns out that TBNL, SBCL, and mod_lisp[2] were all innocent parties here. I will be opening a new thread to pass along patches.
Cheers,
-- Travis