Observed Memory Leak When Invoking Controls in Workshop 8.1 sp3

Hello,
We have developed a website using Bea Portal 8.1 sp3. In testing we have observed severe memory leaking problems which occur also in the production environment where WebLogic is not being run in debug mode. The troubleshooting was started by profiling the testing environment (running in debug mode) using JProfiler. The leak was isolated to occur especially in control method invocation via InvocationHandler call. The object being leaked was character array. After further study we noticed that the method call which this framework InvocationHandler was delegating had especially large return value. Namely a map consisting of ~5Mb of content. After reviewing our own code for possible leak source and coming up with nothing obviously wrong we started to suspect that something was leaking memory in the WebLogic framework code. As the leaked object was character array we suspected that the framework was calling toString() method of the return value and the string was never released. To prove this we constructed a small test program which just demonstrated passing large object as arguments and return values in invocations to WebLogic Workshop control from page flow. The memory consumption in WebLogic monitor and console output proved that indeed the toString() method was invoked 1 times in invocation per argument and 2 times per return value. Furthermore by returning empty string in one test and string of several megabytes in other from toString() one could observe exactly matching memory leaking. Manual running of the garbage collector did not release the memory.
To resolve this problem we have tried to alter the Workshop logging configuration in WorkshopLogCfg.xml. Lowering the log level to debug in categories caused much more invocations to the toString() of the arguments. We did not monitor the memory leaking in this test. Raising all the category levels to fatal did not have effect compared to the original settings. Also removing all categories did not have effect on toString() calls.
We have established quite reliably that this leak occurs with our configuration both in development environment (Windows XP) and testing environment (Redhat Linux) both running WebLogic in debug mode. Both of these environments have out of the box log configuration. We have also observed memory leaking in production environment but it has not yet been profiled to see whether the leak is 100% surely due to this same problem.
We have not yet tested this in sp5 nor sp6. Switching service packs is not solution for as in the moment as we are not able to switch the service pack in production environment due to reasons which are out of our control.
We would appreciate confirmation whether this issue is real and any solutions available like configuration modification, patching or switching service pack. Also links to existing articles about this issue would be nice to have.
We can provide the testing code and some screenshots of memory usage via email. You can request it from tommi.laukkanen at xiiris.com.
best regards,
Tommi Laukkanen / WM-data Finland / Digital Media (tommi.laukkanen at wmdata.fi or tommi.laukkanen at xiiris.com)
Artti Jaakkola / WM-data Finland / Digital Media (artti.jaakkola at wmdata.fi)
PS. This is the console out from the test page flow invoking the control:
We have manually thrown and catched exceptions in toString() method to get the stack trace printed to console out.
java.lang.Exception
at Test.ControlTest.TestControlImpl$TestContainer.toString(TestControlImpl.jcs:43)
at com.bea.wlw.runtime.core.context.WlwThreadContext.logReturn(WlwThreadContext.java:430) <---------------------
at com.bea.wlw.runtime.core.context.WlwThreadContext.endInvocation(WlwThreadContext.java:637)
at com.bea.wlw.runtime.core.container.Invocable.invoke(Invocable.java:445)
at com.bea.wlw.runtime.core.container.Invocable.invoke(Invocable.java:396)
at com.bea.wlw.runtime.core.container.Invocable.invoke(Invocable.java:248)
at com.bea.wlw.runtime.jcs.container.JcsContainer.invoke(JcsContainer.java:84)
at com.bea.wlw.runtime.core.bean.BaseContainerBean.invokeBase(BaseContainerBean.java:198)
at com.bea.wlw.runtime.core.bean.SLSBContainerBean.invoke(SLSBContainerBean.java:103)
at com.bea.wlwgen.StatelessContainer_ly05hg_ELOImpl.invoke(StatelessContainer_ly05hg_ELOImpl.java:99)
at com.bea.wlwgen.GenericStatelessSLSBContAdpt.invokeOnBean(GenericStatelessSLSBContAdpt.java:62)
at com.bea.wlw.runtime.core.bean.BaseDispatcherBean.runAsInvoke(BaseDispatcherBean.java:153)
at com.bea.wlw.runtime.core.bean.BaseDispatcherBean.invoke(BaseDispatcherBean.java:54)
at com.bea.wlw.runtime.core.bean.SyncDispatcherBean.invoke(SyncDispatcherBean.java:160)
at com.bea.wlw.runtime.core.bean.SyncDispatcher_k1mrl8_EOImpl.invoke(SyncDispatcher_k1mrl8_EOImpl.java:100)
at com.bea.wlw.runtime.core.dispatcher.Dispatcher.remoteDispatch(Dispatcher.java:161)
at com.bea.wlw.runtime.core.dispatcher.ServiceHandleImpl.invoke(ServiceHandleImpl.java:436)
at com.bea.wlw.runtime.core.dispatcher.WlwProxyImpl._invoke(WlwProxyImpl.java:326)
at com.bea.wlw.runtime.core.dispatcher.WlwProxyImpl.invoke(WlwProxyImpl.java:315)
at $Proxy19.testMethod(Unknown Source)
at Test.ControlTest.ControlTestController.begin(ControlTestController.jpf:58)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at com.bea.wlw.netui.pageflow.FlowController.invokeActionMethod(FlowController.java:1507)
at com.bea.wlw.netui.pageflow.FlowController.getActionMethodForward(FlowController.java:1433)
at com.bea.wlw.netui.pageflow.FlowController.internalExecute(FlowController.java:764)
at com.bea.wlw.netui.pageflow.PageFlowController.internalExecute(PageFlowController.java:211)
at com.bea.wlw.netui.pageflow.FlowController.execute(FlowController.java:594)
at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
at com.bea.wlw.netui.pageflow.PageFlowRequestProcessor.process(PageFlowRequestProcessor.java:650)
at com.bea.wlw.netui.pageflow.AutoRegisterActionServlet.process(AutoRegisterActionServlet.java:527)
at com.bea.wlw.netui.pageflow.PageFlowActionServlet.process(PageFlowActionServlet.java:152)
at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:507)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:996)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:419)
at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:28)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:27)
at com.bea.p13n.servlets.PortalServletFilter.doFilter(PortalServletFilter.java:351)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:27)
at weblogic.servlet.internal.RequestDispatcherImpl.forward(RequestDispatcherImpl.java:316)
at com.bea.wlw.netui.pageflow.PageFlowRequestProcessor.superForward(PageFlowRequestProcessor.java:1301)
at com.bea.wlw.netui.pageflow.PageFlowRequestProcessor$DefaultHttpRedirector.forward(PageFlowRequestProcessor.ja
va:1317)
at com.bea.wlw.netui.pageflow.PageFlowRequestProcessor.doForward(PageFlowRequestProcessor.java:1199)
at com.bea.wlw.netui.pageflow.PageFlowRequestProcessor.process(PageFlowRequestProcessor.java:637)
at com.bea.wlw.netui.pageflow.AutoRegisterActionServlet.process(AutoRegisterActionServlet.java:527)
at com.bea.wlw.netui.pageflow.PageFlowActionServlet.process(PageFlowActionServlet.java:152)
at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:507)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:996)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:419)
at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:28)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:27)
at com.bea.p13n.servlets.PortalServletFilter.doFilter(PortalServletFilter.java:351)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:27)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:6458)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:118)
at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3661)
at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2630)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:219)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:178)
java.lang.Exception
at Test.ControlTest.TestControlImpl$TestContainer.toString(TestControlImpl.jcs:43)
at com.bea.wlw.runtime.core.request.ExecResponse.toString(ExecResponse.java:53)
at com.bea.wlw.runtime.core.bean.SyncDispatcherBean.invoke(SyncDispatcherBean.java:269) <---------------------
at com.bea.wlw.runtime.core.bean.SyncDispatcher_k1mrl8_EOImpl.invoke(SyncDispatcher_k1mrl8_EOImpl.java:100)
at com.bea.wlw.runtime.core.dispatcher.Dispatcher.remoteDispatch(Dispatcher.java:161)
at com.bea.wlw.runtime.core.dispatcher.ServiceHandleImpl.invoke(ServiceHandleImpl.java:436)
at com.bea.wlw.runtime.core.dispatcher.WlwProxyImpl._invoke(WlwProxyImpl.java:326)
at com.bea.wlw.runtime.core.dispatcher.WlwProxyImpl.invoke(WlwProxyImpl.java:315)
at $Proxy19.testMethod(Unknown Source)
at Test.ControlTest.ControlTestController.begin(ControlTestController.jpf:58)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at com.bea.wlw.netui.pageflow.FlowController.invokeActionMethod(FlowController.java:1507)
at com.bea.wlw.netui.pageflow.FlowController.getActionMethodForward(FlowController.java:1433)
at com.bea.wlw.netui.pageflow.FlowController.internalExecute(FlowController.java:764)
at com.bea.wlw.netui.pageflow.PageFlowController.internalExecute(PageFlowController.java:211)
at com.bea.wlw.netui.pageflow.FlowController.execute(FlowController.java:594)
at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
at com.bea.wlw.netui.pageflow.PageFlowRequestProcessor.process(PageFlowRequestProcessor.java:650)
at com.bea.wlw.netui.pageflow.AutoRegisterActionServlet.process(AutoRegisterActionServlet.java:527)
at com.bea.wlw.netui.pageflow.PageFlowActionServlet.process(PageFlowActionServlet.java:152)
at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:507)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:996)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:419)
at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:28)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:27)
at com.bea.p13n.servlets.PortalServletFilter.doFilter(PortalServletFilter.java:351)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:27)
at weblogic.servlet.internal.RequestDispatcherImpl.forward(RequestDispatcherImpl.java:316)
at com.bea.wlw.netui.pageflow.PageFlowRequestProcessor.superForward(PageFlowRequestProcessor.java:1301)
at com.bea.wlw.netui.pageflow.PageFlowRequestProcessor$DefaultHttpRedirector.forward(PageFlowRequestProcessor.ja
va:1317)
at com.bea.wlw.netui.pageflow.PageFlowRequestProcessor.doForward(PageFlowRequestProcessor.java:1199)
at com.bea.wlw.netui.pageflow.PageFlowRequestProcessor.process(PageFlowRequestProcessor.java:637)
at com.bea.wlw.netui.pageflow.AutoRegisterActionServlet.process(AutoRegisterActionServlet.java:527)
at com.bea.wlw.netui.pageflow.PageFlowActionServlet.process(PageFlowActionServlet.java:152)
at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:507)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:996)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:419)
at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:28)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:27)
at com.bea.p13n.servlets.PortalServletFilter.doFilter(PortalServletFilter.java:351)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:27)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:6458)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:118)
at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3661)
at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2630)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:219)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:178)
java.lang.Exception
at Test.ControlTest.TestControlImpl$TestContainer.toString(TestControlImpl.jcs:43)
at java.lang.String.valueOf(String.java:2131)
at java.lang.StringBuffer.append(StringBuffer.java:370)
at com.bea.wlw.runtime.core.context.WlwThreadContext.logInvoke(WlwThreadContext.java:363) <---------------------
at com.bea.wlw.runtime.core.context.WlwThreadContext.startInvocation(WlwThreadContext.java:608)
at com.bea.wlw.runtime.core.container.Invocable.invoke(Invocable.java:414)
at com.bea.wlw.runtime.core.container.Invocable.invoke(Invocable.java:396)
at com.bea.wlw.runtime.core.container.Invocable.invoke(Invocable.java:248)
at com.bea.wlw.runtime.jcs.container.JcsContainer.invoke(JcsContainer.java:84)
at com.bea.wlw.runtime.core.bean.BaseContainerBean.invokeBase(BaseContainerBean.java:198)
at com.bea.wlw.runtime.core.bean.SLSBContainerBean.invoke(SLSBContainerBean.java:103)
at com.bea.wlwgen.StatelessContainer_ly05hg_ELOImpl.invoke(StatelessContainer_ly05hg_ELOImpl.java:99)
at com.bea.wlwgen.GenericStatelessSLSBContAdpt.invokeOnBean(GenericStatelessSLSBContAdpt.java:62)
at com.bea.wlw.runtime.core.bean.BaseDispatcherBean.runAsInvoke(BaseDispatcherBean.java:153)
at com.bea.wlw.runtime.core.bean.BaseDispatcherBean.invoke(BaseDispatcherBean.java:54)
at com.bea.wlw.runtime.core.bean.SyncDispatcherBean.invoke(SyncDispatcherBean.java:160)
at com.bea.wlw.runtime.core.bean.SyncDispatcher_k1mrl8_EOImpl.invoke(SyncDispatcher_k1mrl8_EOImpl.java:100)
at com.bea.wlw.runtime.core.dispatcher.Dispatcher.remoteDispatch(Dispatcher.java:161)
at com.bea.wlw.runtime.core.dispatcher.ServiceHandleImpl.invoke(ServiceHandleImpl.java:436)
at com.bea.wlw.runtime.core.dispatcher.WlwProxyImpl._invoke(WlwProxyImpl.java:326)
at com.bea.wlw.runtime.core.dispatcher.WlwProxyImpl.invoke(WlwProxyImpl.java:315)
at $Proxy19.testMethod2(Unknown Source)
at Test.ControlTest.ControlTestController.begin(ControlTestController.jpf:59)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at com.bea.wlw.netui.pageflow.FlowController.invokeActionMethod(FlowController.java:1507)
at com.bea.wlw.netui.pageflow.FlowController.getActionMethodForward(FlowController.java:1433)
at com.bea.wlw.netui.pageflow.FlowController.internalExecute(FlowController.java:764)
at com.bea.wlw.netui.pageflow.PageFlowController.internalExecute(PageFlowController.java:211)
at com.bea.wlw.netui.pageflow.FlowController.execute(FlowController.java:594)
at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
at com.bea.wlw.netui.pageflow.PageFlowRequestProcessor.process(PageFlowRequestProcessor.java:650)
at com.bea.wlw.netui.pageflow.AutoRegisterActionServlet.process(AutoRegisterActionServlet.java:527)
at com.bea.wlw.netui.pageflow.PageFlowActionServlet.process(PageFlowActionServlet.java:152)
at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:507)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:996)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:419)
at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:28)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:27)
at com.bea.p13n.servlets.PortalServletFilter.doFilter(PortalServletFilter.java:351)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:27)
at weblogic.servlet.internal.RequestDispatcherImpl.forward(RequestDispatcherImpl.java:316)
at com.bea.wlw.netui.pageflow.PageFlowRequestProcessor.superForward(PageFlowRequestProcessor.java:1301)
at com.bea.wlw.netui.pageflow.PageFlowRequestProcessor$DefaultHttpRedirector.forward(PageFlowRequestProcessor.ja
va:1317)
at com.bea.wlw.netui.pageflow.PageFlowRequestProcessor.doForward(PageFlowRequestProcessor.java:1199)
at com.bea.wlw.netui.pageflow.PageFlowRequestProcessor.process(PageFlowRequestProcessor.java:637)
at com.bea.wlw.netui.pageflow.AutoRegisterActionServlet.process(AutoRegisterActionServlet.java:527)
at com.bea.wlw.netui.pageflow.PageFlowActionServlet.process(PageFlowActionServlet.java:152)
at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:507)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:996)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:419)
at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:28)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:27)
at com.bea.p13n.servlets.PortalServletFilter.doFilter(PortalServletFilter.java:351)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:27)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:6458)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:118)
at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3661)
at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2630)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:219)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:178)
Message was edited by:
tlaukkan
Message was edited by:
tlaukkan
Message was edited by:
tlaukkan

Hi
I did not find any known issues on this. But since you can replicate the issue, could you please contact BEA Support and open a case and have this followed?
Since we may have to do some testing/profiling etc with different service packs with your sample, it would be better to follow up via a support case.
Thanks
Vimala

Similar Messages

  • Memory Leak when running Contacts

    I am having a big memory leak when running the app Contacts on a MB Air. It gobbles up 2 GB of ram in just a few minutes forcing a reboot. I have re-installed Mountain Lion 10.8.2 and it still leaks memory. Watching Activity Monitor shows the rapid increase in Ram being gobbled up by Contacts. Used Mackeeper to clear cache as well as ran Cocktail, all to no avail. Any tips would be greatly appreciated.

    The size of oracle.exe is not an indication of how the Java VM GC works; so you are not comparing apples to apples. It'll be too long to explain here but in my upcoming book (see hereafter), I gave a detailled explanation of the various memory areas the Java VM uses and how these are GCed and also how you can meausre their size (not all, though).
    In short you want to use OracleRuntime methods such as
    OracleRuntime.getSessionSize(); --> get he current size of Sessionspace
    OracleRuntime.getNewspaceSize(); --> get he current size of Newspace
    there are other memory areas described in the book
    http://www.oracle.com/technology/pub/articles/mensah_dws.html
    http://www.elsevier.com/wps/find/bookdescription.cws_home/706089/description#description
    Sample chapter: http://www.oracle.com/technology/books/pdfs/mensah_ch1.pdf
    Kuassi

  • App Memory Leak When Open iPhoto

    Hi everyone,
    Does anyone have experienced app memory leak when open iPhoto?  My free memory immediate dropped from 5000 mb to 15mb when I open iPhoto and the app never open.  If I force to quit iPhoto, all return to normal and everything work fine.  I only have iPhoto app running, not sure what caused the memory leak??? 
    Looking for help. 
    Thanks
    JHML

    Actually the new library was a test to see if the problem occurred only with your current library or with all libraries.  The fact that switching libraries cleared up the problem is just serendipitous. 

  • Memory leak when using Threads?

    I did an experiment and noticed a memory leak when I was using threads.. Here's what I did.
    ======================================
    while( true )
         Scanner sc = new Scanner(System.in);
         String answer;
         System.out.print("Press Enter to continue...");
         answer = sc.next();
         new TestThread();
    ========================================
    And TestThead is the following
    ========================================
    import java.io.*;
    import java.net.*;
    public class TestThread extends Thread
    public TestThread() { start(); }
    public void run() {  }
    =====================================
    When I open windows Task Manager, every time a new thread starts and stops, the java.exe increases the Mem Usage.. Its a memory leak!? What is going on in this situation.. If I start a thread and the it stops, and then I start a new thread, why does it use more memory?
    -Brian

    MoveScanner sc = new
    Scanner(System.in);out of the
    loop.Scanner sc = new Scanner(System.in);
    while (true) {
    That won't matter in any meaningful way.
    Every loop iteration creates a new Scanner, but it also makes a Scanner eligible for GC, so the net memory requirement of the program is constant.
    Now, of course, it's possible that the VM won't bother GCing until 64 MB worth of Scanners have been created, but we don't care about that. If we're allowing the GC 64 MB, then we don't care how it uses it or when it cleans it up.

  • Memory Leak when TOMCAT connects to Oracle 10g RAC using JDBC Thin driver.

    We had experienced Memory leak when a Oracle 10g (10.2.0.3) RAC node was evicted. TOMCAT app server is connecting to the Oracle 10g RAC database instances using JDBC 10.2.0.3 thin driver.
    Anyone had similar experience?
    Any ideas? Any bugs reported/fixed?
    Thanks,
    Raj

    If you're doing XA, we absolutely do not support
    driver-level load-balancing OR failover. Use neither.
    For non-XA, you can use driver-level failover. For
    non-XA, you could set load-balancing, but it won't
    help because we get connections from the driver,
    and keep them indefinitely, so the driver never gets
    the chance to affect which connections the pool
    uses after that.

  • Memory Leak with Picture Control

    Hi all
    There is bug with Picture Control
    When you insert you picture data in loop into the shift register, memory leak
    Can somebody to prevent this bug?
    Run attached example and look at Task Manager
    Attachments:
    Picture Memory Leak Example.vi ‏24 KB

    I believe David properly called the cause of this memory consumption.
    In reply # 52 of thsi thread,
    http://forums.ni.com/ni/board/message?board.id=BreakPoint&message.id=5&jump=true
    I posted an example that inserts 130 FP object images in a picture and moves them around (it is a random walk where each object is assigned a letter and the program terminates when all of the letters required to spell out "Hello World" wander into the trap at the bottom.)
    A snippet of the code follows.
    A) Start with a blank picture
    B) Inster all of the images
    C) show the updated image.
    Other links to LV Picture control examples can be found in this thread.
    http://forums.ni.com/ni/board/message?board.id=BreakPoint&message.id=14&jump=true
    Ben
    Message Edited by Ben on 01-14-2007 08:58 AM
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction
    Attachments:
    Many_Objects.JPG ‏24 KB

  • Memory Leak in WebBrowser Control

    I am building a Windows Phone 8 app with a WebBrowser Control in it.
    I have a list of URLs, whenever I navigate through this list of URLs in WebBrowser control, large amount of memory is being used and not released. After some point my app
    is crashing due to high memory consumption (OutOfMemoryException).
    Memory is cleared when the entire application is closed and restarted.
    My question is how we can release the memory being used by WebBrowser control without completely shutting down the app.
    I have tried calling dispose method each time before navigating to another URL.
    I have confirmed the memory usage by running Windows Phone Application analysis.
    Thanks in advance!

    For the sample you provided there is no memory leak.  You should perform the Memory Profiling test yourself to confirm this.  First run the Memory profiling for navigating from the first page to the next.  Then stop profiling and look at the
    results.  Then do another Memory Profile but this time cycle through all the pages.  You will see memory is not accumulated.
    Jeff Sanders (MSFT)
    @jsandersrocks - Windows Store Developer Solutions
    @WSDevSol
    Getting Started With Windows Azure Mobile Services development?
    Click here
    Getting Started With Windows Phone or Store app development?
    Click here
    My Team Blog: Windows Store & Phone Developer Solutions
    My Blog: Http Client Protocol Issues (and other fun stuff I support)

  • Memory leak when using JMS Cache Coordination

    We have two Weblogic Server 8.1 processes running Java 1.4.2 on Solaris using TOPLink 10.1.3 with JMS Cache Coordination. We observe that heap is filled with uncollectable instances of TOPLink-mapped classes. In our production system, under full load, this completely fills a 3.6 GB heap in 30 minutes, requiring a process restart. The problem goes away if we turn off cache coordination.
    It appears that these instances are UnitOfWork or some other kind of toplink-created clone. We have not yet been able to successfully analyse this problem with a heap profiler.
    Has anyone else experienced this this problem? Any suggestions for debugging?
    Thanks in advance.

    We do set the command manager to asychronous mode. (Our debug tracing confirms that the CommandPropagator method asynchronousPropagateCommand() is invoked, not synchronousPropagateCommand().) We started with asynchronous messaging and actually have never tried running in a synchronous mode.
    The Java bug I referenced in my last post (which I have confirmed with a stand-alone test case) indicates that, for Java 1.4.2 and earlier, is is never ok to not start() a Thread -- it will always produce a memory leak. So I am quite surprised than anyone on a pre-1.5 Java had ever had success with synchronous cache coordination messaging. Do you think it is possible all of the pre-release tests and existing customers installations of 10.1.3 cache coordination are using Java 1.5 ?!
    Our heap profiling indicates that the instances of CommandPropagator which are pinned (i.e., those not started) are allocated in the run() method of CommandPropagator itself. So it seems that the instance of CommandPropagator, after it is started, allocates another one in its run method. Looking at the bytecodes for the run() method (using javap -c) shows that in one branch of the code a second CommandPropagator is indeed allocated and then handed off to the launchContainerRunnable method of a ServerPlatform.
    Since these secondary CommandPropagators are the ones which are not started, we have looked into the WebLogic_8_1_Platform class and found that its implementation launchContainerRunnable (inherited from ServerPlatformBase) does a
    new Thread(runnable).start()where the argument runnable is the CommandPropagator.
    So the CommandPropagator itself is not started(), but is instead run an another Thread.
    We are experimenting with a custom ServerPlatform which overrides launchContainerRunnable:
        server.setServerPlatform(
            new WebLogic_8_1_Platform(server)
                public void launchContainerRunnable(Runnable runnable)
                   if (runnable instanceof Thread) ((Thread)runnable).start();
                   else super.launchContainerRunnable(runnable);
        );  This starts the argument Runnable directly if it is actually a Thread. Our early, small-scale tests indicate that this change eliminates the memory leak. We are testing now in a production-replicate environment under full load.
    But this feels like a hack. I have no idea what TOPLink behavior other than cache coordination flows through this method. Does anyone know what else this ServerPlatform method is used for? Is there a better way to do this? Are there any adverse conquences to our hack? Any suggestions would be appreciated.
    Thanks in advance.

  • Memory leak when browsing through records

    Hello,
    I have a problem with any page containing the component related to each other on three or more levels. (1st level ADF Table, 2nd level ADF Table and 3rd level ADF Form)
    By navigating through the records of the first level, there is refreshment at other levels (using partial triggers), but suddenly there is loss of memory (memory leak) for components of type Select One Choice.
    Precisely, the problem appears when browsing another Show Detail Item in the same page.
    Screenshot showing the Data Control in my page: [http://www.infotun.net/usersimages/1/adf/structure.jpg]
    Capture screen representing the initial state where all is well: [http://www.infotun.net/usersimages/1/adf/initial.jpg]
    Capture screen representing the final state after memory loss: [http://www.infotun.net/usersimages/1/adf/final.jpg]
    I'm using JDeveloper Studio 11.1.1.2.0
    JDK: 1.6.0_14
    Operating System: Windows 7.
    Any help/advice is highly appreciated !
    Thanks
    Edited by: InfoTun on 10 juin 2012 16:22
    Edited by: InfoTun on 10 juin 2012 16:26

    Hi,
    the screenshot does not indicate a memory leak. Memory leaks show by the server memory consumption that leads to slow performance or stale applications. Your issue seems to be different from that and doesn't really explain in the screen shots. If you have a support contract then customer support is the recommendation I like to give
    Frank

  • Photoshop CS6 memory leak when idle and nothing open

    Photoshop CS6 runs away with memory after being used and then going idle. If I open up PS and leave it, it will be ok but as soon as I open any file it will go up in memory usage (which is normal) but when I close all files and hide PS the memory will stay high never goes back down. When I close PS and re-open (no files open) again it idles at 300Mb memory but when I open a file then close it and then hide/idle PS it raises and stays around 1.25-1.5 GB if not more.
    I have tried to Purge All, and even hide all menus to no avail. I have even tried to close Suitcase (eleminiate any font issues) and still same problem. I am running PS bone stock, no extra plug-ins. 
    Any ideas on why it would be doing this would be greatly appreciated!
    My Computer:
    Photoshop 13.0.1
    MacBookPro
    OS 10.6.8
    CPU: 2.66 GHz Intel Core 2 Duo
    Mem: 4 GB 1067 MHz DDR3
    HD: 300GB (30GB Free)

    Photoshop is not supposed to free memory when you close documents -- that's normal, because the memory gets reused.
    Yes, opening a file makes the memory usage go up - because space is needed for the document and it's window.
    None of what you said describes a leak, and sounds like perfectly normal behavior.

  • Huge memory leak when closing PDF from Hyperlink

    I was wondering if anyone else has experienced this issue with Adobe Reader 11.0.10 on Windows 7 64bit:
    1. I have a list of hyperlinks in an Access Table to certain PDF files on a local network folder.
    2. Clicking the hyperlink opens the corresponding PDF.
    The PDF file opens just fine, and renders normally. The issue is when I attempt to close the PDF. This results in an instant Memory leak that will grow to 4GB in under 10 seconds. System crashes completely. I can reproduce the crash in Safe Mode as well. I am able to open/close the PDF from its source location normally without incident. Clean Uninstall/Reinstall produces the same results.
    Downgrade to Adobe 10 fixes the problem completely. I can reproduce the problem on all computers on my network (all running windows 7 32bit or 64bit) by upgrading to Reader 11.0.10.
    I prefer to keep my software updated to prevent vulnerabilities, so any help would be appreciated.

    That is very strange because it is a 32-bit program and cannot (according to popular wisdom) grow over 2 GB. Also, if it were to reach 2 GB it would simply crash, not break the system.
    Do you have a screen shot showing the 4 GB? There might be clues there what is happening.

  • Memory leak when "Use JSSE SSL" is enabled

    I'm investigating a memory leak that occurs in WebLogic 11g (10.3.3 and 10.3.5) when "Use JSSE SSL" is checked using the Sun/Oracle JVM and JCE/JSSE providers. The leak is reproducible just by hitting the WebLogic Admin Console login page repeatedly using SSL. Running the app server under JProfiler shows byte arrays (among other objects) leaking from the socket handling code. I thought it might be a general problem with the default JSSE provider, but Tomcat does not exhibit the problem.
    Anyone else seeing this?

    Yes, we are seeing it as well on Oracle 11g while running a GWT 2.1.1 application using GWT RPC. Our current fix is to remove the JSSE SSL configuration check, however this might not be an option if you really need it for your application. Have you found anything else about it?

  • Memory leak when refreshing table models

    Hi,
    I have a memory leak in a GUI app, and i have traced the problem down to some JTables I have which display data from a database (I used Netbeans profiler to look at the number of objects created for different classes, and there are a large number of classes like com.mysql.jdbc.ResultSet, com.mysql.jdbc.Statement, com.mysql.jdbc.Field[] accumulating, aswell as lots of byte[] and char[] arrays). The allocation stack traces for these objects seem to point to my table models where I do a lot of database lookups to create the model.
    Every time I am refreshing the tables, the Heap Space increases by a few MegaBytes, and a load of objects get created and retained. After refreshing the tables a number of times, the heap eventually gets filled and I get OutOfMemory error.
    The problem is I don't understand how this is happening - when the tables are refreshed, the code I use is something like this:
    setModel(new MyTableModel());
    So theoretically each time I refresh, the old model should be garbage collected (because setting the new model means there are no references to the old model), but I get the feeling that all the models are accumulating in the heap and not being collected. I dont understand why this could be - I was wondering if anyone had any ideas? (PS My table models dont use any static fields)
    Cheers,
    james

    Hi JacobsB,
    The reason I'm setting new models (which I dont normally do) is that each time the table is refreshed, the number and type of columns may change. Since altering the column model is quite complicated (there is no convenient removeColumn() method of any of the standard model classes) and involves messing around with the column model, which ends up screwing up the whole model (e.g. column renderers, column count, column class etc.) I decided it was actually easier to just create a new model instead! Is there a way to alter the column structure another way?
    later,
    James

  • Memory leak when using DB_DBT_MALLOC in CDB.

    Hello!
    Recently when I'm using Berkeley DB CDB and set the value Dbt DB_DBT_MALLOC, I noticed that the app's memory keeps growing during the db.get while;
    I found that many codes on the internet use the syntax free(value.get_data()), but when I tried to free the value.get_data(), I always got an interruption error.
    It's OK when I'm using the DB_DBT_USERMEM flag. So I just get very confused about the DB_DBT_MALLOC and DB_DBT_REALLOC.
    And also, I wonder why there's no memory leak problem when we use the single thread BDB. I think BDB cannot free the value.data pointer too in single thread before the app finish using it, then why our apps don't need to free the data afterwards?
    Thanks a lot in advance!

    You should use free() to free the DBT memory allocated via DB_DBT_MALLOC. You should do that after each Db::get() operation (and of course after finishing processing/using the data), otherwise you will loose the pointer to the memory previously allocated if you happen to reuse the DBT with DB_DBT_MALLOC (the data field will point to a new memory address).
    Alternatively you could use DB_DBT_REALLOC or DB_DBT_USERMEM.
    Note that there are small structures that BDB creates in the environment regions that only get freed/cleaned when the environment is closed.
    If you suspect that there is a memory leak inside the BDB code, make sure you rebuild Berkeley DB using the following configuration options (along with the others you use) when building: enable-debug, enable-umrw. Than, run the program under a memory leak detection utility, like Valgrind (allow the application to open and close the BDB environment) and see if there are any leaks reported.
    If memory leaks are reported, then put together a small stand-alone test case program that demonstrates the leaks, and post it here.
    Regards,
    Andrei

  • Memory leak when running in database

    I am somewhat new to java and very new to java in the db. I just ran into a problem with what appears to be a memory leak. I have a substantial java program used to parse XML files. I developed this app in jDeveloper and for testing purposes created a method that would connect to the database so that I could run the app from jDeveloper instead of having to deploy it everytime i needed to run it. When deployed the application uses the existing connection to connect to the db.
    I am running Oracle 9i on a windows 2k machine.
    When I run the application through jDeveloper the javaw.exe process takes up roughly 20mb of RAM and doesn't increase. I also watched the oracle.exe process and there was little to no increase in the RAM that it was using.
    When deployed to a db and run through a java stored procedure the RAM used by the oracle.exe process sky rockets, jumping from 70mb to 139mb at about 2mb per second.
    Hopefully this will make some sense to someone as posting code would be somewhat difficult considering the size of the project. Is there something I'm missing? I've tried calling the garbage collector explicity but it has had no effect. I have made sure that all my cursors, statements, resultsets are closing. I have a number of Vecotors which are all being de-allocated(as far as i can tell). Are there any known issues with the garbage collector in a 9i DB?
    Thanks
    Butch Wesley

    The size of oracle.exe is not an indication of how the Java VM GC works; so you are not comparing apples to apples. It'll be too long to explain here but in my upcoming book (see hereafter), I gave a detailled explanation of the various memory areas the Java VM uses and how these are GCed and also how you can meausre their size (not all, though).
    In short you want to use OracleRuntime methods such as
    OracleRuntime.getSessionSize(); --> get he current size of Sessionspace
    OracleRuntime.getNewspaceSize(); --> get he current size of Newspace
    there are other memory areas described in the book
    http://www.oracle.com/technology/pub/articles/mensah_dws.html
    http://www.elsevier.com/wps/find/bookdescription.cws_home/706089/description#description
    Sample chapter: http://www.oracle.com/technology/books/pdfs/mensah_ch1.pdf
    Kuassi

Maybe you are looking for

  • ERP6 upgrade, PREPARE error

    Hello! Have anyone seen this PREPARE error message before? During phase RUN_RSPTBFIL_PREP,  error message "2EETG011 Kein Upgrade aktiv". I can't find any SAP note about this specific problem. The source system is 4.6B, the target will be a non-unicod

  • How to connect java project to sql server 2008 r2 database

    i want to create an java application which has to create a database and later access it. My problem is that i am not able to connect sql server 2008 r2 database driver on to the netbeans.i have sql server 2008 r2 installed on my system.please suggest

  • Partner profiles error

    iam configurin ale idoc's when iam configuring at the time of partner profiles distribution(bd64) it is giving error like user name and pass word is wrong ..... re enter... plese help me  thanks srikanth vipparla

  • Hit Counter Size

    Is it possible to change the size of the iweb hit counter? /Erik

  • Upload photos from ipad to website

    Other that iCab is there any way to upload a photo taken by the camera on an iPad to a website?  Is the only way to do this is to create an application that is installed on the iPad and then accesses the camera itself on the same device? I need a thr