Is this GC.log summary indicating memory leak ?

K

Krist

Hi All,

I am trying to find out whether our app is experiencing memory leak by
doing verbose gc on 4 days , here is the summary : (the detail is too
long too attached)

I use 2 JVMs with thi setting :
-ms3072M -mx3072M -XX:+UseConcMarkSweepGC -XX:+UseParNewGC -
XX:MaxPermSize=1024M

From the output below, is there any sign of memory leak ?

Output of GCViewer :
-------------
FootPrint : 3,071.938M
Total Time : 4d7h33m
Acc pauses : 19.25s
Throughput : 99.91 %
Full GC performance : 93.509 M/s
GC Performance : 984.563 M/s
---
Acc pauses : 319.25s
Acc full GC : 8.76s(2.7%)
Acc GC : 310.49s (97.3%)
Min Pause 0.00508s
Max Pause 8.44777s
Avg full GC : 0.62586s
Avg GC : 0.03832s

Thank you,
xtanto
 
K

Krist

There is no sign of a memory "leak".
There is no sign of a lack of a memory "leak".

Hi sir,

What can be the signs, if indeed there is the "leak" ?

Thank you,
Krist
 
R

RedGrittyBrick

What can be the signs, if indeed there is the "leak" ?

Firstly, I think you may mean what some people call packratting rather
than the usual meaning of "memory leak".
<http://mindprod.com/jgloss/packratting.html>

Secondly, because you started this discussion, I imagine you already
have some sign that you consider indicative of a "memory leak". What
sign was that?

If I obtained that GCViewer output on four successive days and found
that FootPrint was monotonically increasing, I'd feel it was a sign of
something that might need investigation.

Some ideas here on "How to search for leaks"
http://groups.google.com/group/comp...read/thread/16d16e4f9b7d9509/4a58432ba88fa526
 
J

John B. Matthews

RedGrittyBrick said:
Firstly, I think you may mean what some people call packratting
rather than the usual meaning of "memory leak".
<http://mindprod.com/jgloss/packratting.html>

Secondly, because you started this discussion, I imagine you already
have some sign that you consider indicative of a "memory leak". What
sign was that?

If I obtained that GCViewer output on four successive days and found
that FootPrint was monotonically increasing, I'd feel it was a sign
of something that might need investigation.

Some ideas here on "How to search for leaks"
http://groups.google.com/group/comp...read/thread/16d16e4f9b7d9509/4a58432ba88fa526

For reference, I have updated the graphs mentioned in that thread:

<http://sites.google.com/site/trashgod/garbageheap>
 
K

Krist

Firstly, I think you may mean what some people call packratting rather
than the usual meaning of "memory leak".
<http://mindprod.com/jgloss/packratting.html>

Secondly, because you started this discussion, I imagine you already
have some sign that you consider indicative of a "memory leak". What
sign was that?

If I obtained that GCViewer output on four successive days and found
that FootPrint was monotonically increasing, I'd feel it was a sign of
something that might need investigation.

Some ideas here on "How to search for leaks"http://groups.google.com/group/comp.lang.java.programmer/browse_threa...
Hi Sir,
The sign is : intermittently, the JVM got not responding and the apps
server restart it. That is the sign that make me think that what cause
the JVM restart :

Memory leak ?
Full GC ?
Setting the Heap not correct : -ms3072M -mx3072M -XX:
+UseConcMarkSweepGC -XX:+UseParNewGC -
XX:MaxPermSize=1024M ???

What may cause the JVM to no responding ?

Thank you,
Krist
 
K

Krist

Hi Sir,
The sign is : intermittently, the JVM got not responding  and the apps
server restart it. That is the sign that make me think that what cause
the JVM restart :

Memory leak ?
Full GC ?
Setting the Heap not correct : -ms3072M -mx3072M -XX:
+UseConcMarkSweepGC -XX:+UseParNewGC -
XX:MaxPermSize=1024M  ???

What may cause the JVM to no responding ?

Thank you,
Krist- Sembunyikan teks kutipan -

- Perlihatkan teks kutipan -

Hi,

I Forget to include the error in log file when the JVM restart : there
is 'Too many open files' error.

10/02/08 05:34:40 oracle.ias.opmn.optic.OpticBadConnectException:
Error connecting to OPMN (is it running?): Too many open files
10/02/08 05:34:40 at
oracle.ias.opmn.optic.OpmnPhone.dialOpmn(OpmnPhone.java:451)
10/02/08 05:34:40 at
oracle.ias.opmn.optic.OpmnPhone.makePhoneCall(OpmnPhone.java:178)
10/02/08 05:34:40 at
oracle.ias.opmn.optic.OpmnPhone.request(OpmnPhone.java:130)
10/02/08 05:34:40 at
oracle.ias.opmn.optic.OpmnQuery.getBuf(OpmnQuery.java:347)
10/02/08 05:34:40 at
oracle.ias.opmn.optic.OpmnQuery.getDom(OpmnQuery.java:467)
10/02/08 05:34:40 at
oracle.ias.opmn.optic.OpmnQuery.getProc(OpmnQuery.java:615)
10/02/08 05:34:40 at oracle.dms.address.Optic.getAddresses(Unknown
Source)
10/02/08 05:34:40 at
oracle.dms.address.OpmnDiscoverer.getAddresses(Unknown Source)
10/02/08 05:34:40 at
oracle.dms.address.Discoverer.searchAddresses(Unknown Source)
10/02/08 05:34:40 at
oracle.dms.address.AddressBook.discoverAddresses(Unknown Source)
10/02/08 05:34:40 at oracle.dms.collector.Hunter.setOff(Unknown
Source)
10/02/08 05:34:40 at oracle.dms.aggregator.Timer.run(Unknown Source)
10/02/08 05:34:40 at java.lang.Thread.run(Thread.java:595)
10/02/08 05:34:51 oracle.ias.opmn.optic.OpticBadConnectException:
Error reading formFactorFile: /opt/oracle/product/10.1.3.1/OracleAS_1/
opmn/conf/.formfactor (/opt/oracle/product/10.1.3.1/OracleAS_1/opmn/
conf/.formfactor (Too many open files))
10/02/08 05:34:51 at
oracle.ias.opmn.optic.OpmnPhone.refreshFormFactor(OpmnPhone.java:328)
10/02/08 05:34:51 at
oracle.ias.opmn.optic.OpmnPhone.refreshConnectionInfo(OpmnPhone.java:
278)
10/02/08 05:34:51 at
oracle.ias.opmn.optic.OpmnPhone.makePhoneCall(OpmnPhone.java:174)
10/02/08 05:34:51 at
oracle.ias.opmn.optic.OpmnPhone.request(OpmnPhone.java:130)
10/02/08 05:34:51 at
oracle.ias.opmn.optic.OpmnQuery.getBuf(OpmnQuery.java:347)
10/02/08 05:34:51 at
oracle.ias.opmn.optic.OpmnQuery.getDom(OpmnQuery.java:467)
10/02/08 05:34:51 at
oracle.ias.opmn.optic.OpmnQuery.getProc(OpmnQuery.java:615)
10/02/08 05:34:51 at oracle.dms.address.Optic.getAddresses(Unknown
Source)
10/02/08 05:34:51 at
oracle.dms.address.OpmnDiscoverer.getAddresses(Unknown Source)
10/02/08 05:34:51 at
oracle.dms.address.Discoverer.searchAddresses(Unknown Source)
10/02/08 05:34:51 at
oracle.dms.address.AddressBook.discoverAddresses(Unknown Source)
10/02/08 05:34:51 at oracle.dms.collector.Hunter.setOff(Unknown
Source)
10/02/08 05:34:51 at oracle.dms.aggregator.Timer.run(Unknown Source)
10/02/08 05:34:51 at java.lang.Thread.run(Thread.java:595)
10/02/08 05:35:25 oracle.ias.opmn.optic.OpticBadConnectException:
Error reading formFactorFile: /opt/oracle/product/10.1.3.1/OracleAS_1/
opmn/conf/.formfactor (/opt/oracle/product/10.1.3.1/OracleAS_1/opmn/
conf/.formfactor (Too many open files))
10/02/08 05:35:25 at
oracle.ias.opmn.optic.OpmnPhone.refreshFormFactor(OpmnPhone.java:328)
10/02/08 05:35:25 at
oracle.ias.opmn.optic.OpmnPhone.refreshConnectionInfo(OpmnPhone.java:
278)
10/02/08 05:35:25 at
oracle.ias.opmn.optic.OpmnPhone.makePhoneCall(OpmnPhone.java:174)
10/02/08 05:35:25 at
oracle.ias.opmn.optic.OpmnPhone.request(OpmnPhone.java:130)
10/02/08 05:35:25 at
oracle.ias.opmn.optic.OpmnQuery.getBuf(OpmnQuery.java:347)
10/02/08 05:35:25 at
oracle.ias.opmn.optic.OpmnQuery.getDom(OpmnQuery.java:467)
10/02/08 05:35:25 at
oracle.ias.opmn.optic.OpmnQuery.getProc(OpmnQuery.java:615)
10/02/08 05:35:25 at oracle.dms.address.Optic.getAddresses(Unknown
Source)
10/02/08 05:35:25 at
oracle.dms.address.OpmnDiscoverer.getAddresses(Unknown Source)
10/02/08 05:35:25 at
oracle.dms.address.Discoverer.searchAddresses(Unknown Source)
10/02/08 05:35:25 at
oracle.dms.address.AddressBook.discoverAddresses(Unknown Source)
10/02/08 05:35:25 at oracle.dms.collector.Hunter.setOff(Unknown
Source)
10/02/08 05:35:25 at oracle.dms.aggregator.Timer.run(Unknown Source)
10/02/08 05:35:25 at java.lang.Thread.run(Thread.java:595)

Thanks,
Krist
 
R

RedGrittyBrick

I Forget to include the error in log file when the JVM restart : there
is 'Too many open files' error.

10/02/08 05:34:40 oracle.ias.opmn.optic.OpticBadConnectException:
Error connecting to OPMN (is it running?): Too many open files


Your problem /appears/ to be that your application or IAS is holding
open too many files. This may be merely a symptom of the underlying
cause. To me it doesn't immediately look like a memory leak in the JVM.

OPM is the Oracle Process Manager - I don't know anything about this.
According to the Oracle website it is part of their IAS application
server which "Provides automatic restart of Oracle Application Server
processes when they become unresponsive"

10/02/08 05:34:51 oracle.ias.opmn.optic.OpticBadConnectException:
Error reading formFactorFile: /opt/oracle/product/10.1.3.1/OracleAS_1/
opmn/conf/.formfactor (/opt/oracle/product/10.1.3.1/OracleAS_1/opmn/
conf/.formfactor (Too many open files))

Here's where attempting to read an OPMN file is failing due to lack of
resources. That file is used by processes that need to talk to OPMN.
Maybe there's too many of them?

Another thing OPMN does is "Enables gathering of host and Oracle
Application Server process statistics and tasks." Maybe gathering those
statistics over a period of time and examining them will provide some
ideas about the underlying causes of the problem?

There's too much uninformed guesswork above. What do Oracle support say?
 
M

Martin Gregorie

Your problem /appears/ to be that your application or IAS is holding
open too many files. This may be merely a symptom of the underlying
cause. To me it doesn't immediately look like a memory leak in the JVM.
You don't say what OS you're using, but if its one of the unices, have
you used sar to see what's happening in the computer?

If you run sar with the -v reporting option you can track how many file
handles and inodes are open. If the number gradually rises until the 'too
many files' error occurs, there's probably a programming error -
something is opening files but never closing them.
 
K

Krist

You don't say what OS you're using, but if its one of the unices, have
you used sar to see what's happening in the computer?

If you run sar with the -v reporting option you can track how many file
handles and inodes are open. If the number gradually rises until the 'too
many files' error occurs, there's probably a programming error -
something is opening files but never closing them.

Hi Sir,
We run Linux Redhat 4 Update 2, JDK 1.5 U15. Attached below is the
output of sar -v. (but today the error not occur)

As additional information, this 'too many files' error seems to occur
just after I put 2 JVMs being load balanced (by the apps server) to
run the applications.
With 1 JVM this error never occur. (ulimit already 65536)
Could this be because 2 JVM ?

Thank you,
Krist

Linux 2.6.9-22.ELsmp 02/20/2010

12:00:01 AM dentunusd file-sz inode-sz super-sz %super-sz dquot-
sz %dquot-sz rtsig-sz %rtsig-sz
12:10:01 AM 143044 0 70170 0 0.00
0 0.00 0 0.00
12:20:01 AM 143046 0 70172 0 0.00
0 0.00 0 0.00
12:30:01 AM 138002 0 70138 0 0.00
0 0.00 0 0.00
12:40:01 AM 129253 0 69095 0 0.00
0 0.00 0 0.00
12:50:01 AM 129595 0 69097 0 0.00
0 0.00 0 0.00
01:00:01 AM 125588 0 68008 0 0.00
0 0.00 0 0.00
01:10:01 AM 124714 0 67789 0 0.00
0 0.00 0 0.00
01:20:01 AM 124719 0 67786 0 0.00
0 0.00 0 0.00
01:30:01 AM 124721 0 67786 0 0.00
0 0.00 0 0.00
01:40:01 AM 124769 0 67800 0 0.00
0 0.00 0 0.00
01:50:01 AM 124791 0 67804 0 0.00
0 0.00 0 0.00
02:00:01 AM 124793 0 67804 0 0.00
0 0.00 0 0.00
02:10:01 AM 124795 0 67805 0 0.00
0 0.00 0 0.00
02:20:01 AM 124818 0 67812 0 0.00
0 0.00 0 0.00
02:30:01 AM 124820 0 67812 0 0.00
0 0.00 0 0.00
02:40:01 AM 124822 0 67813 0 0.00
0 0.00 0 0.00
02:50:01 AM 124930 0 67878 0 0.00
0 0.00 0 0.00
03:00:01 AM 125071 0 67975 0 0.00
0 0.00 0 0.00
03:10:01 AM 125310 0 68119 0 0.00
0 0.00 0 0.00
03:20:01 AM 125789 0 68200 0 0.00
0 0.00 0 0.00
03:30:01 AM 126268 0 68327 0 0.00
0 0.00 0 0.00
03:40:01 AM 126647 0 68504 0 0.00
0 0.00 0 0.00
03:50:01 AM 126957 0 68635 0 0.00
0 0.00 0 0.00
04:00:01 AM 127647 0 68602 0 0.00
0 0.00 0 0.00
04:10:01 AM 177578 0 124786 0 0.00
0 0.00 0 0.00
04:20:01 AM 178907 0 124949 0 0.00
0 0.00 0 0.00
04:30:01 AM 180024 0 124922 0 0.00
0 0.00 0 0.00
04:40:01 AM 180807 0 125115 0 0.00
0 0.00 0 0.00
04:50:01 AM 181799 0 125285 0 0.00
0 0.00 0 0.00
05:00:01 AM 177477 0 120292 0 0.00
0 0.00 0 0.00
05:10:01 AM 178299 0 120180 0 0.00
0 0.00 0 0.00
05:20:02 AM 179401 0 120327 0 0.00
0 0.00 0 0.00
05:30:01 AM 180223 0 120261 0 0.00
0 0.00 0 0.00
05:40:01 AM 181359 0 120491 0 0.00
0 0.00 0 0.00
05:50:01 AM 181039 0 119211 0 0.00
0 0.00 0 0.00
06:00:01 AM 175933 0 112964 0 0.00
0 0.00 0 0.00
06:10:01 AM 177016 0 113186 0 0.00
0 0.00 0 0.00
06:20:01 AM 177383 0 112286 0 0.00
0 0.00 0 0.00
06:30:01 AM 178368 0 112111 0 0.00
0 0.00 0 0.00
06:40:01 AM 179406 0 112144 0 0.00
0 0.00 0 0.00
06:50:01 AM 180165 0 112326 0 0.00
0 0.00 0 0.00
07:00:01 AM 181079 0 112281 0 0.00
0 0.00 0 0.00
07:10:01 AM 182515 0 112228 0 0.00
0 0.00 0 0.00
07:20:01 AM 183327 0 112542 0 0.00
0 0.00 0 0.00
07:30:01 AM 183960 0 111947 0 0.00
0 0.00 0 0.00
07:40:01 AM 184804 0 112078 0 0.00
0 0.00 0 0.00
07:50:01 AM 185540 0 112291 0 0.00
0 0.00 0 0.00
08:00:01 AM 179356 0 105616 0 0.00
0 0.00 0 0.00
08:10:01 AM 166140 0 91830 0 0.00
0 0.00 0 0.00
08:20:01 AM 166129 0 91417 0 0.00
0 0.00 0 0.00
08:30:01 AM 165331 0 91088 0 0.00
0 0.00 0 0.00
08:40:01 AM 165561 0 91070 0 0.00
0 0.00 0 0.00
08:50:01 AM 165840 0 90992 0 0.00
0 0.00 0 0.00
09:00:01 AM 164196 0 89872 0 0.00
0 0.00 0 0.00
09:10:01 AM 164663 0 89682 0 0.00
0 0.00 0 0.00
09:20:01 AM 165727 0 89889 0 0.00
0 0.00 0 0.00
Average: 155612 0 92261 0 0.00
0 0.00 0 0.00
 
R

Roedy Green

I am trying to find out whether our app is experiencing memory leak by
doing verbose gc on 4 days , here is the summary : (the detail is too
long too attached)

Unless there is bug in the JVM, a memory leak should be impossible, no
matter what fool thing you did in your program. You can however
packrat.

See http://mindprod.com/jgloss/packratting.html
http://mindprod.com/jgloss/leak.html

To detect packratting, you need to sample your app over time to see
if its memory use is gradually increasing.

You can also get statistics on what kinds of object are being held.
You check if those numbers seem reasonable.

See http://mindprod.com/jgloss/profiler.html
for ways to glean information about what you app is doing.

--
Roedy Green Canadian Mind Products
http://mindprod.com

When a newbie asks for help tracking a bug in a code snippet, the problem is usually is the code he did not post, hence the value of an SSCCE.
see http://mindprod.com/jgloss/sscce.html
 
L

Lew

Krist wrote, quoted or indirectly quoted someone who said :
Roedy said:
Unless there is bug in the JVM, a memory leak should be impossible, no
matter what fool thing you did in your program. You can however
packrat.

In a Java context "memory leak" refers to packratting, just as in a Java
context "reference" refers to a pointer. The terminology may be confusingly
similar to, say, C++, but one must take the definitions as the apply to the
subject.
 
E

Eric Sosman

Krist wrote, quoted or indirectly quoted someone who said :



In a Java context "memory leak" refers to packratting, just as in a Java
context "reference" refers to a pointer. The terminology may be
confusingly similar to, say, C++, but one must take the definitions as
the apply to the subject.

Where did you find the official Java definition of "memory
leak?" The word "leak" does not appear in the index of the JLS
nor of the JVMS, nor (unless I've missed something, which is
possible) on any of the pages where those documents discuss
OutOfMemoryError or garbage collection. So, where is it, and
what exactly does it say a "memory leak" is?
 
L

Lew

Eric said:
Where did you find the official Java definition of "memory
leak?" The word "leak" does not appear in the index of the JLS

There is no official definition for "memory leak". However, you will observe
that in the Java context the use of the term "memory leak" for packratting is
nearly universal.

Where is the official definition for "memory leak" in other contexts?
 
L

Lew

There is no official definition for "memory leak". However, you will
observe that in the Java context the use of the term "memory leak" for
packratting is nearly universal.

But then, you knew that already.
Where is the official definition for "memory leak" in other contexts?

Here are some authoritative examples for the usage in the Java universe:

<http://www.ibm.com/developerworks/library/j-leaks/>

<http://java.sun.com/javase/6/webnotes/trouble/TSG-VM/html/memleaks.html>
"The jhat utility (see 2.5 jhat Utility) is useful when debugging
unintentional object retention (or memory leaks)."

<http://publib.boulder.ibm.com/infoc....express.doc/info/exp/ae/rprf_javamemory.html>
See the section "Detecting memory leaks"

You could have found these links with
<http://www.google.com/search?q=Java+"memory+leak">
in just a couple of minutes. GIYF.
 
A

Arne Vajhøj

Where did you find the official Java definition of "memory
leak?" The word "leak" does not appear in the index of the JLS
nor of the JVMS, nor (unless I've missed something, which is
possible) on any of the pages where those documents discuss
OutOfMemoryError or garbage collection. So, where is it, and
what exactly does it say a "memory leak" is?

I think it is the term most commonly used by Java developers to
explain the phenomenon.

It is a lot better than Roedys use of packrat.

Arne
 
E

Eric Sosman

There is no official definition for "memory leak". However, you will
observe that in the Java context the use of the term "memory leak" for
packratting is nearly universal.

Thanks, Lew. Part of what you snipped was your statement that
"[...] one must take the definitions as the [sic] apply to the
subject," and now we have "There is no official definition."
Much clearer, to be sure.
 
L

Lew

Eric said:
There is no official definition for "memory leak". However, you will
observe that in the Java context the use of the term "memory leak" for
packratting is nearly universal.

Thanks, Lew. Part of what you snipped was your statement that
"[...] one must take the definitions as the [sic] apply to the
subject," and now we have "There is no official definition."
Much clearer, to be sure.

The first comment uses "definition" in the sense that Merriam-Webster uses it,
that is, the definition as it is observed in actual use. The second, your
twist on it, uses "official" definition, a term you brought into to the
conversation, not me.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,057
Latest member
KetoBeezACVGummies

Latest Threads

Top