dev@glassfish.java.net

Re: Leaks in GF2/Tomcat 6?

From: Jeanfrancois Arcand <Jeanfrancois.Arcand_at_Sun.COM>
Date: Mon, 10 Sep 2007 10:46:45 -0400

Hi,

Charles Oliver Nutter wrote:
> Jeanfrancois Arcand wrote:
>> Hi,
>>
>> Charles Oliver Nutter wrote:
>>> We're getting reports that deploying JRuby on Rails apps (as WAR
>>> file) to GF2 or Tomcat 6 seems to be leaking. We have not done much
>>> ground work to investigate yet, but the reports also say that using
>>> Tomcat 5.5 solves the problems...and we're deploying the exact same
>>> code in both cases.
>>>
>>> Here's one such report; the other I've gotten is on IRC:
>>>
>>> http://archive.jruby.codehaus.org/dev/806313f00708211515t31a4a1efn734b532660b447b6@mail.gmail.com
>>>
>>>
>>> How shall we go about investigating this? It's steered multiple
>>> people away from using GF with JRuby on Rails already.
>>
>> Can you get an application that demonstrate the problem? Looks like a
>> classloader leak....
>
> I will look into that. If you can give me some description of how
> classloaders could be a problem, I'd love to hear it.

I need to investigate more, but the fact that both TC6 and GlassFish
showed the leaks brings me to their classloader (this is one piece that
are similar).

  As you may know,
> JRuby generates a lot of code at runtime as part of JIT compilation. In
> most cases, a JITted method is generated into its own class, which in
> turn has its own classloader (since there's no other way the class would
> be GCable). If GF is holding on to created subclassloaders (or has
> disabled class GC?) there could certainly be a problem, since Rails in
> some cases continues to generates new methods even in production mode.

I don't think we disable GC. But the Web classloader is probably my
first candidate to look at as soon I can reproduce the problem :-)

Thanks

-- Jeanfrancois

>
> - Charlie
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>