Skip to Main Content

memory leak within their JAVA code

Danv-OracleDec 18 2015 — edited Dec 18 2015

By examining the headdump from an database, we can see the leak and with the help of Oracle JAVA support initially identified it was related to customers Code NOT using the free() when using the getclobval() function.

---Description provided to the customer in the SR----------------

The Heapdumps from Production confirmed last week was that the Statements that we were focusing on were not triggering leaks from the same areas as what is being seen on your Production environment.
Even if we fix the issue seen on the statements included in the standalone testcase , it is not even a factor on your Production JDBC sessions.

As I had indicated in my earlier update , the Production connection pooled sessions are still showing close to 90% of its leaks in the "koh dur heap d" / "qmxtgCrBufClob" heaps.
Memory allocations from this heap is usually done when using :
a) getclobval()  and a corresponding free() is not called.
c) dbms_xmlschema.inPlaceEvolve

My preference would be to defer tracing ( being a last resort and a hit-and-miss approach ) and instead work with Development Team to check if a code walkthrough reveals any other instances where getclobVals() are called and the corresponding free() is not called.
If it comes down to tracing , we can pick up a few top sessions and get Memory Snapshots before and after an hour's duration and hopefully we can find the statements of interest.


The customer has NOT been able to locate the getclobval() and corresponding free() mismatch in their code.  So they want to attempt to trace their application to pinpoint the segment of code causing the problem.

QUESTION for this group

We are at the last resort and need to trace to help the customer locate their leak.  The JAVA support group pointed us to “How to Troubleshoot Native Memory Leak in Java Applications on Solaris (Doc ID 1320890.1)” and possibly using matrace and libnjamd tools.  We are not JAVA experts and need some guidance or exact commands to help guide the customer on how best to trace their code.

Customer would like to test this tracing as soon as Tuesday 12/22.

Any help would be appreciated!

Post Details
Added on Dec 18 2015