On Thu, 12 Oct 2017 13:35:27 -0700, barto...@gmx.de wrote:
> On Sat, 23 Sep 2017 12:28:53 -0700, barto...@gmx.de wrote:
> > 3) Feeding the EvalServer with a program that calls 'run' (or
> > Proc::Async directly) does heavily leak memory, threads and what not
> > (again assuming a clean EvalServer instance started as above):
> >
> > $ echo 'run("echo", "42");' > foo.p6
> > $ for i in {1..500}; do ./eval-client.pl TESTTOKEN run foo.p6; done
> 
> I'm still trying to find the cause of the memory leak. Part of the
> problem seems to be that with each invokation of './eval-client.pl
> TESTTOKEN run foo.p6' three or four additional threads are started.
> Those threads are never stopped.
> 
> Some debug statements in src/core/ThreadPoolScheduler.pm indicate that
> with each invokation (s.a.) a new AffinityWorker instance and a new
> GeneralWorker instance are created (and at least one other thread). I
> guess those newly started Threads stay around until the EvalServer is
> killed.

I've pushed some improvements for this issue in NQP commit b88de49aad.  As the 
commit message notes, there's probably more out there, but this gets us through 
spectest on hack.p6c.org at least, with a max RES of around 4.5gb.

Reply via email to