[racket] Getting unusual behavior from racket/sandbox: not truly capping memory usage?!

From: Danny Yoo (dyoo at hashcollision.org)
Date: Sat Apr 20 19:57:02 EDT 2013

> Let me post code and see if anyone agrees:
>
>      https://github.com/dyoo/web-server-under-sandbox
>
> I create a trivial web server with a servlet that immediately errors
> out.  I have it also serve static JavaScript that's essentially a
> torture test: it keeps sending requests to the web server, over and
> over.  (Ripped out of whalesong's REPL testing code).


Followup: I've gotten independent confirmation from Eric Hanchrow that
he can replicate my results, so at least I'm not hallucinating.

I've been able to trace down the source of the garbage somewhere due
to the reuse of the connection to support HTTP/1.1.  If I hack this
line in the codebase:

    https://github.com/plt/racket/blob/master/collects/web-server/private/dispatch-server-unit.rkt#L106


so that it _always_ closes the connection, then the resulting web
server survives my torture test.


So there's some kind of state that's accumulating due to the
connection reuse to support HTTP/1.1.  Still trying to trace the exact
nature of the problem down.

Posted on the users mailing list.