Hello,
I am experiencing strange voodoo with mod_lisp and wanted to know
whether I am alone with this or not, as it seems to be quite fundamental...
System: Debian Sarge libapache-mod-lisp, cl-modlisp, cl-kmrcl, sbcl,
Linux Kernel 2.6
-- but I also see this behaviour with the minimal lisp-side mod_lisp
interfaces from the mod_lisp package and cmucl on kernel 2.4.
Not infrequently, a web request returns an empty page. If I tcpdump the
communication between apache and lisp, I see that a proper request is
sent by mod_lisp to the lisp process, but this TCP packet causes
a TCP RST reply. Lisp-wise, the incoming request is not noticed in any
way, as it seems.
My initial guess was that the *modlisp-socket* socket was closed on the
lisp side while there's still data in the recv buffer, hence the RST.
But strange enough, this behaviour (i.e. sending out RST replies)
persists if I alien-funcall shutdown(2) in kmrcl:close-active-socket
(which is used to shut down the modlisp socket).
Unfortunately, I seem to be unable to strace-attach a running sbcl to
investigate this any further. My next step hence would be to patch the
Linux kernel so that it tells (printk) me a bit more about the
circumstances wherever it generates a TCP RST package.
I would greatly appreciate any hint on what might be going on here,
whether anyone else has seen this, and how to resolve it, as I really am
not keen on delving that deep if it can be avoided.
--
best regards,
Dr. Thomas Fischbacher
··@cip.physik9.uni-muenchen.de (remove the number nine - spam guard)
On Wed, 8 Mar 2006 23:25:06 +0000 (UTC), "Dr. Thomas Fischbacher" <··@spamtrap-delete-this.cip.physik.uni-muenchen.de> wrote:
> I am experiencing strange voodoo with mod_lisp and wanted to know
> whether I am alone with this or not, as it seems to be quite
> fundamental...
>
> System: Debian Sarge libapache-mod-lisp, cl-modlisp, cl-kmrcl, sbcl,
> Linux Kernel 2.6
>
> -- but I also see this behaviour with the minimal lisp-side mod_lisp
> interfaces from the mod_lisp package and cmucl on kernel 2.4.
>
> Not infrequently, a web request returns an empty page. If I tcpdump
> the communication between apache and lisp, I see that a proper
> request is sent by mod_lisp to the lisp process, but this TCP packet
> causes a TCP RST reply. Lisp-wise, the incoming request is not
> noticed in any way, as it seems.
>
> My initial guess was that the *modlisp-socket* socket was closed on
> the lisp side while there's still data in the recv buffer, hence the
> RST. But strange enough, this behaviour (i.e. sending out RST
> replies) persists if I alien-funcall shutdown(2) in
> kmrcl:close-active-socket (which is used to shut down the modlisp
> socket).
>
> Unfortunately, I seem to be unable to strace-attach a running sbcl
> to investigate this any further. My next step hence would be to
> patch the Linux kernel so that it tells (printk) me a bit more about
> the circumstances wherever it generates a TCP RST package.
>
> I would greatly appreciate any hint on what might be going on here,
> whether anyone else has seen this, and how to resolve it, as I
> really am not keen on delving that deep if it can be avoided.
Just a guess: Have you checked that libapache-mod-lisp has really the
latest version of mod_lisp.c? Most of the time it hasn't in my
experience. The latest version with all known bugs fixed is here:
<http://www.fractalconcept.com:8000/public/open-source/mod_lisp/>
HTH,
Edi.
--
European Common Lisp Meeting 2006: <http://weitz.de/eclm2006/>
Real email: (replace (subseq ·········@agharta.de" 5) "edi")
Dr. Thomas Fischbacher <··@spamtrap-delete-this.cip.physik.uni-muenchen.de>
wrote:
+---------------
| Not infrequently, a web request returns an empty page. If I tcpdump the
| communication between apache and lisp, I see that a proper request is
| sent by mod_lisp to the lisp process, but this TCP packet causes
| a TCP RST reply. Lisp-wise, the incoming request is not noticed in any
| way, as it seems.
|
| My initial guess was that the *modlisp-socket* socket was closed on the
| lisp side while there's still data in the recv buffer, hence the RST.
| But strange enough, this behaviour (i.e. sending out RST replies)
| persists if I alien-funcall shutdown(2) in kmrcl:close-active-socket
| (which is used to shut down the modlisp socket).
+---------------
You might have some or all of your output page still buffered in
the Lisp stream, so make sure that your CL-MODLISP code is doing a
(FINISH-OUTPUT *MODLISP-SOCKET*) or at least (FORCE-OUTPUT *MODLISP-SOCKET*)
before calling the "shutdown(2)".
I ran into this problem early when developin my web-app framework,
too, and adding a FORCE-OUTPUT at the end of each response page
fixed it.
-Rob
-----
Rob Warnock <····@rpw3.org>
627 26th Avenue <URL:http://rpw3.org/>
San Mateo, CA 94403 (650)572-2607