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... 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.

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 ?



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.

Reply via email to