On May 3, 2011, at 9:29 PM, Jan Goyvaerts wrote: > I was really wondering whether I missed something about garbage collection. > Thanks guys ! > > It's the windows JVM it's working on. It's happily ploughing through all the > data and regularly collecting. The Linux version doesn't. :-) > > Tomorrow I'll double-check the setup to make sure they're as similar as > possible. And have a go with Kirk's advice. Didn't though about allocation > stack traces indeed...
You always want a profiler to provide you with a casual execution path. In this case you want to know how the leaking objects are being created. > But I'm positive I had a memory leak on windows with the code in the loop. > And no more leak when it was put into a method. So whether it's on Linux or > windows - in both cases there's something weird. weird.. my sense is not to trust anything you're saying and perform the memory leak analysis as I've outlined. If the leak is technical, it will show as that. If it's application, it will show up as that. > > I've been trying on Linux with JDK 1.6 builds 23-25, the latest JDK7 and G1 > garbage collection. Same result. > > I agree the JDBC driver will contain native code - but how on earth can it > get a reference to an entity class ? The JDBC driver will use native code but a type IV driver doesn't contain native code. Regards, Kirk > > > > 2011/5/3 Cédric Beust ♔ <[email protected]> > On Tue, May 3, 2011 at 9:44 AM, Kirk <[email protected]> wrote: > > On May 3, 2011, at 6:13 PM, Cédric Beust ♔ wrote: > > > Hi Jan, > > > > Nice job trimming down the list of potential suspects! > > > > I think that focusing on locals is a red herring. Locals do get collected > > and I can't imagine a JVM bug in that area, regardless of the OS, but I > > have a suspicion your loop is doing some side effects which are causing > > some other bigger objects to be retained. Sadly, this hypothesis seems to > > be invalidated by the fact that your code works properly on non-Windows > > JVM's, but it's not a 100% certainty yet. > > > > Well, having the same code leak in Windows and not in Linux is very much > smells like a bug. > > Yes, but I was going with Occam's razor here: the bug is more likely to be in > applicative code (e.g. native JDBC drivers, like you suggested) than in the > JVM. > > Obviously, you need to keep both in mind until you've ruled one out. > > -- > Cédric > > > -- > You received this message because you are subscribed to the Google Groups > "The Java Posse" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/javaposse?hl=en. > > > -- > You received this message because you are subscribed to the Google Groups > "The Java Posse" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/javaposse?hl=en. -- You received this message because you are subscribed to the Google Groups "The Java Posse" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/javaposse?hl=en.
