Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > Memory leaks in all Java processes

Reply
Thread Tools

Memory leaks in all Java processes

 
 
qazmlp
Guest
Posts: n/a
 
      01-02-2004
All the Java processes that we have give memory leaks in a long run.
We have already fixed all the memory leaks from our application code.
But, still, resident stack size keeps growing always and it never
reaches the steady state. What else I can check with?

Are there leaks reported in the following Java version?
guiUser@hfnsn162(*)[43]: java -version
java version "1.2.2"
Solaris VM (build Solaris_JDK_1.2.2_05a, native threads, sunwjit)
 
Reply With Quote
 
 
 
 
Rich Teer
Guest
Posts: n/a
 
      01-02-2004
On Thu, 1 Jan 2004, qazmlp wrote:

> But, still, resident stack size keeps growing always and it never
> reaches the steady state. What else I can check with?


Constant growth isn't necessarily a sign of memory leakage.

> Are there leaks reported in the following Java version?
> guiUser@hfnsn162(*)[43]: java -version
> java version "1.2.2"
> Solaris VM (build Solaris_JDK_1.2.2_05a, native threads, sunwjit)


I don't know, but I'd recommend using the latest version of the
JVM, just in case.

--
Rich Teer, SCNA, SCSA . * * . * .* .
. * . .*
President, * . . /\ ( . . *
Rite Online Inc. . . / .\ . * .
.*. / * \ . .
. /* o \ .
Voice: +1 (250) 979-1638 * '''||''' .
URL: http://www.rite-online.net ******************
 
Reply With Quote
 
 
 
 
Bent C Dalager
Guest
Posts: n/a
 
      01-02-2004
In article <(E-Mail Removed) >,
qazmlp <(E-Mail Removed)> wrote:
>All the Java processes that we have give memory leaks in a long run.
>We have already fixed all the memory leaks from our application code.
>But, still, resident stack size keeps growing always and it never
>reaches the steady state. What else I can check with?


I assume you are not actually referring to the stack size, which would
rapidly give you an overflow exception if it keeps growing, but that
you are rather referring to the heap or even just process memory usage
as reported by your OS.

If it is indeed the case that the heap is constantly growing, then it
should eventually run out of memory and start throwing exceptions.

More likely, perhaps, is that you've got some thread going that keeps
creating temporary objects that will eventually get cleaned up. Swing
is one common culprit. This is not usually a big problem.

In any case, I would use a profiler to track this down. JProbe and
OptimizeIt are two commercial options.

Cheers
Bent D
--
Bent Dalager - http://www.velocityreviews.com/forums/(E-Mail Removed) - http://www.pvv.org/~bcd
powered by emacs
 
Reply With Quote
 
Alan Coopersmith
Guest
Posts: n/a
 
      01-02-2004
(E-Mail Removed) (qazmlp) writes in comp.unix.solaris:
|All the Java processes that we have give memory leaks in a long run.
|We have already fixed all the memory leaks from our application code.
|But, still, resident stack size keeps growing always and it never
|reaches the steady state. What else I can check with?

RSS is not stack size - it's the amount currently cached in RAM, and
can grow or shrink independent of memory allocation/deallocation as
pages get paged in or out depending on how often they are accessed.
It's not a good measure of memory leaks at all.

--
__________________________________________________ ______________________
Alan Coopersmith (E-Mail Removed)
http://www.CSUA.Berkeley.EDU/~alanc/ aka: (E-Mail Removed)
Working for, but definitely not speaking for, Sun Microsystems, Inc.
 
Reply With Quote
 
Rich Teer
Guest
Posts: n/a
 
      01-02-2004
On Fri, 2 Jan 2004, Alan Coopersmith wrote:

> (E-Mail Removed) (qazmlp) writes in comp.unix.solaris:
> |All the Java processes that we have give memory leaks in a long run.
> |We have already fixed all the memory leaks from our application code.
> |But, still, resident stack size keeps growing always and it never
> |reaches the steady state. What else I can check with?
>
> RSS is not stack size - it's the amount currently cached in RAM, and


Just to expand a bit (for the OP), RSS = Resident Set Size.
I.e., the amount of the process' VM that is resident in RAM.

--
Rich Teer, SCNA, SCSA . * * . * .* .
. * . .*
President, * . . /\ ( . . *
Rite Online Inc. . . / .\ . * .
.*. / * \ . .
. /* o \ .
Voice: +1 (250) 979-1638 * '''||''' .
URL: http://www.rite-online.net ******************
 
Reply With Quote
 
Casper H.S. Dik
Guest
Posts: n/a
 
      01-02-2004
Rich Teer <(E-Mail Removed)> writes:

>On Fri, 2 Jan 2004, Alan Coopersmith wrote:


>> (E-Mail Removed) (qazmlp) writes in comp.unix.solaris:
>> |All the Java processes that we have give memory leaks in a long run.
>> |We have already fixed all the memory leaks from our application code.
>> |But, still, resident stack size keeps growing always and it never
>> |reaches the steady state. What else I can check with?
>>
>> RSS is not stack size - it's the amount currently cached in RAM, and


>Just to expand a bit (for the OP), RSS = Resident Set Size.
>I.e., the amount of the process' VM that is resident in RAM.


And it's normal for it to grow in absence of memory pressure to
be near equal in size to "SZ".

Casper
--
Expressed in this posting are my opinions. They are in no way related
to opinions held by my employer, Sun Microsystems.
Statements on Sun products included here are not gospel and may
be fiction rather than truth.
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
circular memory leaks: cleanup in all browsers beneficial Peter Michaux Javascript 6 02-19-2008 10:29 AM
How memory leaks in java aruna Java 25 05-06-2004 07:52 AM
memory leaks jboss-java with jni interface johan Java 2 03-02-2004 10:12 AM
Understanding memory leaks in Java & start using HAT for further analysis qazmlp Java 3 01-07-2004 09:30 PM
do self references cause memory leaks in Java? Novice Java 28 07-22-2003 02:25 PM



Advertisments