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

From: Robby Findler (robby at eecs.northwestern.edu)
Date: Sat Apr 20 20:37:14 EDT 2013

It might help to build racket with --enable-backtrace (pass to configure).
After that, call dump-memory-stats and it will tell you about new stuff it
has. You can do things like trace live objects and track how many of each
kind of object are alive at a given moment (and then do it before and after
something to compare what got allocated).


On Sat, Apr 20, 2013 at 6:57 PM, Danny Yoo <dyoo at hashcollision.org> wrote:

> > 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.
> ____________________
>   Racket Users list:
>   http://lists.racket-lang.org/users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20130420/aa692542/attachment.html>

Posted on the users mailing list.