classlojure icon indicating copy to clipboard operation
classlojure copied to clipboard

Memory leaks

Open NeedMoreDesu opened this issue 12 years ago • 4 comments

http://www.everfall.com/paste/id.php?4futm8xwuqtp Causing memory leaks.

http://www.everfall.com/paste/id.php?7pu6c7acr59i Don't cause, but uncommenting that line causes memory leak again.

Possibly relevant: http://immutant.org/news/2012/05/18/runtime-isolation/

NeedMoreDesu avatar Mar 08 '13 21:03 NeedMoreDesu

I'm seeing this as well. Unfortunately, I'm not deep enough into classloaders or profilers to get much further than the few hours of digging through jvisualvm I did, to no avail.

Unfortunately, apply @tcrawley's clojure patch doesn't solve it for me.

The second example above takes ~10 iterations to run me out of PermGen space. Sorry I don't have more insight here.

trptcolin avatar May 13 '13 04:05 trptcolin

If someone can create and share a simple app that recreates this, I'd be happy to take a look and see if I can figure out what's retaining the reference to the classloader. And if it's a flaw in Clojure, I'll see about adding it to CLJ-1125.

tobias avatar May 13 '13 12:05 tobias

Whoops, got your other GH username @tobias :) Good news: in my newly trimmed-down use case, your clojure patch is looking great, so it must be something higher up than classlojure in my original use case that was retaining the references.

Thanks!

trptcolin avatar May 14 '13 00:05 trptcolin

No worries, I'm squatting @tcrawley to catch the confusion between my nick-everywhere-else and here, so it worked!

If you do isolate your leak, I'd love to know the cause. My approach for finding the dval leaks was to take memory dumps and sift through them with MAT, and looking at gc roots there. It was, uhm, fun. If you do get a concise reproducible case, I'd be happy to take a look.

tobias avatar May 14 '13 00:05 tobias