WebLogic Server - Apparent Memory Leak in Java Heap due to Weblogic JMS 'C' Api
(Doc ID 1310342.1)
Last updated on AUGUST 26, 2022
Applies to:Oracle WebLogic Server - Version 10.3.3 and later
Information in this document applies to any platform.
In the context of WebLogic Server 10.3.3.0.0
You might be facing an issue with memory leak in the Java Heap when using the WebLogic JMS "C" API.
You might then suspect a memory leak in the Weblogic JMS calls while using a QueueBrowser. It was observed that the java client which directly calls the wljmsclient.jar/wlclient.jar does not exhibit this memory leak. However the C++ version which calls the Weblogic JMS "C" API displays this memory leak.
You might think that the C++ version of the code which was invoking WLS JMS C code in turn was giving instances of a memory leak on java heap.. Further review of the WLS code base revealed that the JNI function is being called inside the JMS "C" code provided with WLS.
Studying the heap histograms produced using jhat. These are the numbers that jhat produced, for the top 6 classes, after 200000 iterations of a reproducer.
|Class||Iteration 16900||Iteration 110000||Iteration 152200||Iteration 200000|
This clearly shows that the JMSEnumeration and JMSQueueBrowser classes are not being removed at all. Each iteration allocates one each of these classes, and then destroys or closes the connection object. The above shows evidence that the allocated objects from classes JMSEnumeration and JMSQueueBrowser are never removed.
The JMSEnumeration and JMSQueueBrowser classes show growth that is exactly linear with the number of iterations. So while [C, [B, [I, and "[Ljava.lang.Object" all show evidence of having been garbage-collected, the other two classes have not been.
That's good evidence that the references to JMSEnumeration and JMSQueueBrowser objects in the Java heap are not being deleted at the appropriate time, while references for all the other Java objects apparently *are* being deleted, and later garbage-collected.
Customer suspected a memory leak in the Weblogic JMS calls while using a QueueBrowser. It was observed that the java client which directly calls the wljmsclient.jar/wlclient.jar does not exhibit this memory leak. However the C++ version which calls the Weblogic JMS "C" API displays this memory leak.
To view full details, sign in with your My Oracle Support account.
Don't have a My Oracle Support account? Click to get started!
In this Document