Possible memory leak in TagFileTagInfo class

Hello,
Our application is experiencing a memory leak in Weblogic, which is not happening in other application servers.
We are running Weblogic server 10.3 using the distributed jsf 1.2
Eclipse Memory Analyzer clearly points to TagFileTagInfo class as retaining a Map which holds all the memory. Furthermore, it shows that said map (called _tagFileInfoMap) is holding FileTagFileInfo class instances.
It could be possible that our application were doing something wrong, and that would cause the described behavior, however I doubt that as the other application servers where our application is deployed do not present this problem.
Any suggestion on how we should proceed to fix this problem?
Thanks
Juan

Hi,
Was this issue resolved by using wlappc?
Were you able to compile the tag files with wlappc? I tried compiling the jsps using wlappc, but it seems that the tool expects an ejb-jar file.
Any help on this is greatly appreciated.
Thanks
Hareesh

Similar Messages

  • Possible Memory Leak, many instances of macromedia.jdbc.oracle.OracleConnection, serviceFactory

    I'm using a plug-in for Eclipse to help identify possible memory leaks however we are having trouble interpreting the results.  The top, and pretty much the only, suspect is this...
    7,874 instances of "macromedia.jdbc.oracle.OracleConnection", loaded by "coldfusion.bootstrap.BootstrapClassLoader @ 0xf935218" occupy 604,781,904 (71.02%) bytes. These instances are referenced from one instance of "java.util.HashMap$Entry[]", loaded by "<system class loader>"
    Any ideas what could cause this many instances?  How do we track this back to a particular cfm or cfc?  Do these number seem high or is that normal?  The system in question normally only has 30-60 concurrent users.
    The one item I'm a little skeptical of is the use of the "coldfusion.server.ServiceFactory" and "coldfusion.sql.QueryTable" objects.  We use them for 1000s of different queries, even queries within large loops.  Could these be the problem?  Each time we need to execute a query we do a createObject for each of these objects, when done we close the connection.  I recently found a similar example where they close the recordSet first and then close the connection, we are not closing the recordSet.  Any help at all is much appreciated.

    It could simply be caused by the obvious: a query or queries making a large number of connections and/or consuming large resources on the Oracle database. Use Eclipse to search your application folder for queries. Can you identify any queries that could be the culprit? Is there a loop containing a method or an instance of a component that queries an Oracle database?
    What's your Coldfusion  version? If you're on CF8 or CF9 then the server monitor (in the Coldfusion Administrator) might tell you the process responsible for the high consumption.

  • Memory leak within FOProcessor class

    Hi all,
    I'm trying to use the XML Publisher API (5.6.2 and 5.6.3) to generate PDF documents from XSL templates and XML data in a J2EE environment (Jboss 4.0.5) with Struts but a memory leak occurs.
    It seems not to be a multithreading issue because the leak is there even if the PDF documents are generated one by one.
    I made many tests to isolate the leak and I have simplified my code as much as possible: it seems to happen within the FOProcessor class.
    One of the tests generates 4,500 PDF documents (one at a time) from an XML file (3 KB) and an XSL file (74 KB with blanks). Nothing else is done with the Jboss server during this test. The XSL file was created before the test from a RTF file with XML Publisher. The memory leak is around 70 KB for each PDF document (around 300 MB for the whole test).
    As you can see below from the heap histogram (taken at end of test after a full garbage collection) it seems that the XSL and XML elements/attributes are not released (and thus never garbage collected).
    Did I miss something or is there an actual problem with the XML/XSL parsing within the XML Publisher API?
    Thanks for your help.

    Object Histogram:
    Size    Count     Class description
    131376968 2353450 java.lang.Object[]
    60389464 937300  char[]
    48260304 335141  oracle.xml.parser.v2.XSLResultElement
    35690000 2230625 oracle.xml.util.FastVector
    24127104 1005296 java.lang.String
    16539120 413478  oracle.xml.parser.v2.XSLNode$AttrValueTmpl
    14757064 128058  int[]
    13348768 417149  java.lang.ref.Finalizer
    12701776 102220  * ConstMethodKlass
    12544808 23433   byte[]
    12204080 108965  oracle.xml.parser.v2.XSLText
    8344600 86584   java.util.Hashtable$Entry[]
    7363768 102220  * MethodKlass
    5592784 138700  * SymbolKlass
    5362256 335141  oracle.xml.parser.v2.XSLAttributeSet[]
    5267336 8135    * ConstantPoolKlass
    5234016 163563  java.util.TreeMap$Entry
    5121744 213406  java.util.Hashtable$Entry
    4900480 61256   oracle.xml.parser.v2.XPathStep
    4087120 51089   java.lang.reflect.Method
    3823216 40276   java.util.HashMap$Entry[]
    3524696 8135    * InstanceKlassKlass
    3378000 84450   java.util.Hashtable
    3064872 127703  java.util.HashMap$Entry
    2971904 6880    * ConstantPoolCacheKlass
    2968560 26505   oracle.xml.parser.v2.XSLValueOf
    2770656 24738   oracle.xml.parser.v2.XSLVariable
    2167520 27094   oracle.xml.parser.v2.XPathFunctionCall
    1880088 33573   oracle.xml.parser.v2.PathExpr
    1726360 61482   java.lang.String[]
    1573720 39343   java.util.HashMap
    1476576 30762   oracle.xml.parser.v2.XSLExprValue
    1460840 36521   java.util.TreeMap
    1319360 23560   oracle.xml.parser.v2.XPathConstantExpr
    1054976 16484   org.jboss.mx.server.InvocationContext
    1001264 3546    * MethodDataKlass
    887424  11049   short[]
    835680  8705    java.lang.Class
    830208  25944   oracle.xml.util.NSNameImpl
    705816  29409   java.util.ArrayList
    684152  4501    org.jboss.web.tomcat.tc5.session.SessionBasedClusteredSession
    670288  14071   java.lang.Object[]
    640832  10013   oracle.xml.parser.v2.XPathVarReference
    561056  35066   javax.management.modelmbean.DescriptorSupport
    556272  23178   EDU.oswego.cs.dl.util.concurrent.ConcurrentReaderHashMap$Entry
    552984  30451   java.lang.Class[]
    494760  2945    oracle.xml.parser.v2.XSLTemplate
    480792  20033   antlr.ANTLRHashString
    442576  27661   java.lang.Integer
    432096  4501    org.jboss.web.tomcat.statistics.ReplicationStatistics$TimeStatistic
    429040  10726   org.hibernate.hql.ast.tree.Node
    369880  9247    javax.management.modelmbean.ModelMBeanOperationInfo
    312384  19524   java.util.TreeMap$3
    305368  5453    java.net.URL
    287392  8981    org.jboss.mx.interceptor.ReflectedDispatcher
    259264  338     EDU.oswego.cs.dl.util.concurrent.ConcurrentReaderHashMap$Entry[]
    252280  4505    org.jboss.cache.lock.ReadWriteLockWithUpgrade
    238600  5965    org.jboss.mx.interceptor.PersistenceInterceptor
    238600  5965    org.jboss.mx.interceptor.AttributeDispatcher
    236616  9859    org.jboss.mx.server.AbstractMBeanInvoker$OperationKey
    219776  3434    java.lang.reflect.Constructor
    206880  6465    javax.management.modelmbean.ModelMBeanAttributeInfo
    193168  2259    java.lang.reflect.Method[]
    173184  5412    java.lang.ref.SoftReference
    164920  589     oracle.xml.parser.v2.XSLStylesheet
    164464  541     * ObjArrayKlassKlass
    152832  6368    org.dom4j.tree.DefaultAttribute
    149472  2076    java.lang.reflect.Field
    144160  4505    org.jboss.cache.Node
    143160  5965    org.jboss.mx.interceptor.ModelMBeanAttributeInterceptor
    140600  3515    org.apache.xerces.dom.DeferredTextImpl
    140224  2740    javax.management.modelmbean.ModelMBeanAttributeInfo[]
    139056  7658    boolean[]
    134664  3359    java.lang.String[][]
    131936  1178    oracle.xml.parser.v2.XSLCondition
    131936  1178    oracle.xml.parser.v2.XSLForEach
    129072  2668    javax.management.modelmbean.ModelMBeanOperationInfo[]
    128952  5373    EDU.oswego.cs.dl.util.concurrent.ConcurrentHashMap$Entry
    124776  1733    org.hibernate.hql.ast.tree.IdentNode
    115200  1800    javax.management.modelmbean.ModelMBeanInfoSupport
    113088  2356    oracle.xml.parser.v2.AdditiveExpr
    109416  4559    java.beans.PropertyChangeSupport
    108960  1135    java.io.ObjectStreamClass
    108120  4505    org.jboss.cache.lock.IdentityLock
    105864  345     long[]
    98752   3086    java.io.ObjectStreamClass$WeakClassKey
    97968   4082    java.util.Vector
    96672   2014    java.util.Properties
    94240   589     oracle.xml.parser.v2.XSLOutput
    90072   3753    javax.management.ObjectName$Property
    87432   3643    javax.management.MBeanParameterInfo
    82368   858     org.hibernate.hql.ast.tree.DotNode
    81248   5078    java.lang.Long
    78656   1229    org.hibernate.mapping.Column
    77664   4854    java.util.Collections$SynchronizedSet
    77448   3227    java.util.LinkedList$Entry
    73824   769     org.jboss.mx.modelmbean.XMBean
    73536   4596    java.util.Hashtable$KeySet
    72144   4509    EDU.oswego.cs.dl.util.concurrent.CopyOnWriteArraySet
    72144   4509    EDU.oswego.cs.dl.util.concurrent.CopyOnWriteArrayList
    72144   4509    org.jboss.cache.Fqn
    72080   4505    org.jboss.cache.lock.ReadWriteLockWithUpgrade$WriterLock
    72080   4505    org.jboss.cache.lock.LockStrategyRepeatableRead
    72080   4505    org.jboss.cache.lock.ReadWriteLockWithUpgrade$ReaderLock
    72080   4505    org.jboss.cache.lock.LockMap
    72016   4501    org.apache.catalina.session.StandardSessionFacade
    71776   4486    java.io.FileDescriptor
    70680   589     oracle.xml.parser.v2.XSLCallTemplate
    70680   589     oracle.xml.parser.v2.XSLApplyTemplates
    70224   154     org.hibernate.persister.entity.SingleTableEntityPersister
    68296   2774    javax.management.ObjectName$Property[]
    68160   1065    org.apache.xerces.dom.DeferredElementNSImpl
    67760   770     org.hibernate.loader.entity.EntityLoader
    66992   19      EDU.oswego.cs.dl.util.concurrent.ConcurrentHashMap$Entry[]
    65968   1178    oracle.xml.parser.v2.XPathFilterExpr
    65968   589     oracle.xml.parser.v2.XMLUTF8Reader
    64432   4027    java.util.HashSet
    63648   1326    oracle.xml.parser.v2.XMLNode[]
    63440   1586    org.hibernate.loader.DefaultEntityAliases
    61256   589     oracle.xml.parser.v2.XSLNode
    61256   589     oracle.xml.parser.v2.XMLReader
    60816   2534    org.apache.xerces.xni.QName
    57360   478     org.hibernate.hql.ast.tree.FromElement
    56976   1187    org.hibernate.mapping.Property
    56544   1178    oracle.xml.parser.v2.XSLNodeSetExpr
    56544   1178    oracle.xml.parser.v2.MultiplicativeExpr
    56544   1178    oracle.xml.parser.v2.EqualExpr
    54384   618     oracle.xml.parser.v2.XMLError
    49392   2783    javax.management.MBeanParameterInfo[]
    47648   1489    java.util.LinkedHashMap$Entry
    47120   589     oracle.xml.parser.v2.XMLByteReader[]
    ...

  • Memory leak in string class

    We have developed our application in Solaris 10 environment. While running Purify on that it shows leak in the string class. This leak is incremental and so process size keeps in increasing. If we replace string with char array, the leaks disappears and process size also becomes stable.
    Following is the snapshot of the memory leak stack reported by Purify:
    MLK: 4505 bytes leaked in 85 blocks
    * This memory was allocated from:
    malloc [rtlib.o]
    operator new(unsigned) [libCrun.so.1]
    void*operator new(unsigned) [rtlib.o]
    __rwstd::__string_ref<char,std::char_traits<char>,std::allocator<char> >*std::basic_string<char,std::char_traits<char>,std::allocator<char> >::__getRep(unsigned,unsigned) [libCstd.so.1]
    char*std::basic_string<char,std::char_traits<char>,std::allocator<char> >::replace(unsigned,unsigned,const char*,unsigned,unsigned,unsigned) [libCstd.so.1]
    std::basic_string<char,std::char_traits<char>,std::allocator<char> >&std::basic_string<char,std::char_traits<char>,std::allocator<char> >::operator=(const char*) [libCstd.so.1]
    Has anyone faced this problem earlier or is there any patch available for this?

    Over time, we have found and fixed memory leaks in the C++ runtime libraries.
    Get the latest patches for the compiler you are using. (You didn't say which one.) You can find all patches here:
    [http://developers.sun.com/sunstudio/downloads/patches/index.jsp]
    Also get the latest Solaris patch for the C++ runtime libraries, listed on the same web page.
    If that doesn't fix the problem, please file a bug report at
    [http://bugs.sun.com]
    with a test case that can be compiled and run to demonstrate the problem.

  • Possible memory leak in C++ code

    Hello,
    I have a Java application that calls through JNI, functions in a C++ dll that use the GroupWise API (COM based). After the application creates a number of accounts in GroupWise the memory footprint of the java.exe process reaches ~1.5GB of RAM on a 32 bit Windows OS. After reaching this value, the C++ code no longer works, meaning that connecting to GroupWise fails. If I restart the application at this point everything starts to work until it reached ~1.5 GB again.
    I am suspecting that the problem might be caused by a memory leak. I have taken a dump of the java process with jmap and analyzed it with jhat. If I have not released an object in C++ code, would this object be visible in the dump i took of the java.exe process? The biggest consumer from what i have seen in the dump is class [B      20353-instances      33259261-bytes.
    Has anyone else tried to track a memory leak in a JNI application? How did you achive this task, what tools did you use?
    Thank you,
    Ionut Marin.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

    Has anyone else tried to track a memory leak in a JNI application? How did you achive this task, what tools did you use?You write a library in C/C++ only which does NOT use JNI which implements the functionality you want to achieve in your java application.
    You write a wrapper for that which excercises it completely including be able to run it in a loaded state.
    Then you buy/find a C/C++ profiling tool and run it on the wrapper.
    You write you JNI code such that the ONLY thing it does is interface between java and the library above. It doesn't impleent business logic nor work flow.

  • Possible memory leak in e4x or HTTPService with e4x format

    Hello,
    I think I have found a memory leak in e4x.
    In very special cases (=xml) the player swallows the memory.
    The little test program connects to a web server for an xml
    file, and the result is converted to an array.
    The array is displayed in a DataGrid.
    There are two files:
    leaktest.xml doesn't leak in any cases (format: e4x or xml)
    pbentries.xml leaks when the format is e4x.
    Choose e4x format and check Use "Leak" file! Than the program
    leaks.
    For the whole test case (mxml file, html file and xml files)
    please contact me at
    [email protected]
    or
    [email protected]
    and I send a zip file as soon as possible.
    Probably there is a bug in my test program. If so than please
    send me a feedback.
    Thanks,
    Lacito
    ------ For the program cut here ------
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="
    http://www.adobe.com/2006/mxml"
    layout="absolute">
    <mx:Script>
    <![CDATA[
    import mx.managers.PopUpManager;
    import mx.core.Application;
    import mx.controls.Alert;
    import mx.rpc.events.FaultEvent;
    import mx.rpc.events.ResultEvent;
    import mx.rpc.http.mxml.HTTPService;
    protected var records_:Array = null;
    protected var httpService:HTTPService = null;
    [Bindable("recordsChange")]
    public function set records(_records:Array):void
    this.records_ = _records;
    var e:Event = new Event("recordsChange");
    dispatchEvent(e);
    public function get records():Array
    return records_;
    protected function getXML():void
    var resultFormat:String = cbResultFormat.selectedItem as
    String;
    var params:Object = new Object();
    httpService = new HTTPService();
    httpService.concurrency = "single";
    httpService.showBusyCursor = true;
    var lastIndex:int = url.lastIndexOf("/");
    var fileName:String = null;
    if(chbUseLeakFile.selected)
    // It leaks... :(
    fileName = "pbentries.xml";
    else
    // It doesn't leak... :)
    fileName = "leaktest.xml";
    var _url:String = url.substr(0, lastIndex+1) + fileName;
    httpService.url = _url;
    httpService.resultFormat = resultFormat;
    httpService.method = "POST";
    httpService.addEventListener(ResultEvent.RESULT,
    processResult);
    httpService.addEventListener(FaultEvent.FAULT,
    processFault);
    httpService.send(params);
    protected function processResult(e:ResultEvent):void
    var resultFormat:String = cbResultFormat.selectedItem as
    String;
    removeListeners();
    if(resultFormat==mx.rpc.http.HTTPService.RESULT_FORMAT_XML)
    setArrayFromXMLNode();
    else
    setArrayFromXML();
    destroyHttpService();
    // format= "e4x"
    protected function setArrayFromXML():void
    var xml_:XML = httpService.lastResult as XML;
    var ar:Array = new Array();
    var x:XML = null;
    var xl:XMLList = xml_.phonebookEntries[0].phonebookEntry;
    for each(x in xl)
    var record:Object = new Object();
    var prop:XML = null;
    var props:XMLList = x.children();
    for each(prop in props)
    record[prop.localName()] = prop.toString();
    ar.push(record);
    records = ar;
    // format= "xml"
    protected function setArrayFromXMLNode():void
    var xml_:XMLNode = httpService.lastResult as XMLNode;
    var ar:Array = new Array();
    var x:XMLNode = null;
    var xl:Array = xml_.lastChild.childNodes;
    for each(x in xl)
    var record:Object = new Object();
    var prop:XMLNode = null;
    var props:Array = x.childNodes;
    for each(prop in props)
    record[prop.localName] = prop.firstChild!=null ?
    prop.firstChild.nodeValue : null;
    ar.push(record);
    records = ar;
    protected function destroyHttpService():void
    httpService.clearResult(false);
    httpService.disconnect();
    httpService = null;
    protected function processFault(e:FaultEvent):void
    removeListeners();
    Alert.show(e.fault.faultString, e.fault.faultCode);
    destroyHttpService();
    protected function removeListeners():void
    httpService.removeEventListener(ResultEvent.RESULT,
    processResult);
    httpService.removeEventListener(FaultEvent.FAULT,
    processFault);
    protected function collect():void
    // Garbage Collection
    try
    new LocalConnection().connect('foo');
    new LocalConnection().connect('foo');
    catch(e:*)
    ]]>
    </mx:Script>
    <mx:ArrayCollection id="alRecords" source="{records}"
    />
    <mx:Label x="10" y="10" text="Result format:"
    id="lResultFormat"/>
    <mx:ComboBox x="104" y="8" id="cbResultFormat">
    <mx:Array>
    <mx:String>e4x</mx:String>
    <mx:String>xml</mx:String>
    </mx:Array>
    </mx:ComboBox>
    <mx:DataGrid id="dgRecords" x="10" y="36" width="936"
    height="437"
    dataProvider="{alRecords}"
    verticalScrollPolicy="auto"
    horizontalScrollPolicy="auto">
    </mx:DataGrid>
    <mx:Button x="355" y="496" label="Get xml" id="btnGetXML"
    click="{getXML();}" />
    <mx:Button x="155" y="496" label="GC" id="btnGC"
    click="{collect();}" />
    <mx:CheckBox x="276" y="10" label="Use
    &quot;LEAK&quot; file:" labelPlacement="left"
    id="chbUseLeakFile" selected="true"/>
    </mx:Application>

    Hello,
    After 3 months (and a new version of flex and flash player)
    my test program is still leaking.
    If somebody could confirm the leak it would be appreciated.
    Thanks,
    Lacito
    P.S.: I heard that Adobe had donated ActionScript 3 VM to
    Mozilla.org. Should I disturb them with my problem?

  • Possible memory leak in JSF � help needed

    Hi,
    We are developing a JSF application using the following:
    SUN JSF 1.1_02-b08
    Tomahawk 1.1.3
    Tomcat 5.5
    Our application includes pages with lists; these lists are held and extracted from backing beans.
    We are using these beans in request scope with <t:saveState> tag (to avoid holding the lists in the session all the time).
    We tested the application using JProbe and found out that each bean that was used in the saveState was added to the view (to the session) , each time we entered the page , and the bean was not released until the end of the session (instead of only one instance of the backing bean).
    After I found this problem, I added the following context params to the web.xml:
    com.sun.faces.NUMBER_OF_VIEWS_IN_SESSION = 1 (instead of the default 15)
    com.sun.faces.NUMBER_OF_VIEWS_IN_LOGICAL_VIEW_IN_SESSION = 1 (instead of the default 15)
    We tested the application again, and now no unnecessary instances of the beans were held in the session (in the view).
    BUT , now when we use the browser �Back� button, and returning to a page with a list, when selecting an item from the list, no action is performed (the list in the server side does not exist).
    My questions are:
    1)What is the meaning (difference) of each of the context param : NUMBER_OF_VIEWS_IN_SESSION , NUMBER_OF_VIEWS_IN_LOGICAL_VIEW_IN_SESSION
    2)What are the recommended values for these parameters, to minimize session memory, and to enable the usage of the browser �Back� button.
    Thank you all,
    Lior.

    Me too.
    Please somebody knows how can we avoid memory leak problems in JSF 1.1 ?
    Thansk in advanced

  • Possible Memory Leak in CF8

    Alright - not sure what type of problem this is but it is a
    problem. The scenario is this: I have an application that worked
    fine in CF7 (in terms of allocating and releasing memory) - but
    when I moved to 8 - my memory keeps growing and growing without
    anything being released (so it seems). This is a gigantic pain
    because everything works great in 8 except for memory management
    issues - I have tried all sorts of JVM argument combinations (for
    setting the garbage collection and heap sizes, GC intervals,
    etc...) - I cannot get jrun.exe to quit growing to the point it has
    to be restarted.
    Does anyone know what could be doing this? I can't turn
    memory monitor on or the app crawls - but for some reason the new
    architecture seems to disregard garbage collection (or at least on
    certain objects).
    I just find it extremelly frustrating that CF7 seems to be
    fine in terms of jrun.exe running fine with memory not going crazy
    - but CF8 just doesn't want to play nicely.
    Any help with this is greatly appreciated.
    Thanks,
    CM

    Thanks for your help ke4pym - figured it out (and this might
    help some others as well):
    We have a 2 tier web app with a database server and an
    application/web server - the database server is running
    Intersystems' Cache 5.2 and we have CF8 connected via the 'OTHER'
    selection in the datasource admin using a jdbc connection string
    and the Cache driver that ships iwth Cache. Works good - there are
    a couple benefits with doing this rather than using an ODBC
    connection (which uses a system DSN on the server and limits our
    connectivity to only queries - no stored procs or anything else -
    so essentially - the onty thing we could do with the ODBC
    connection is query the database).
    So we figured out how to connect using the jdbc connection
    and Cache driver which allowed us to then run stored proc's and
    whatever else we wanted to do in Cache via stored procedure calls -
    BUT - here is where the problem came up - for some reason - all the
    connection references or query data that was being used NEVER WAS
    RELEASED FROM MEMORY - it simply stayed there until we restarted
    the CF app server and refreshed everything. Once we put it back to
    the ODBC it works fine - doesn't use any memory for database calls
    (the main problem was that we have an email job that generates 1000
    or so reports for customers and emails them off - around 200 or so
    - the server would crash with an 'outofmemory exception' which we
    tracked down in the jre logs.
    So not sure if this is a bug or if it is just an unstable way
    of using these two technologies - but thank goodness we figured out
    that reverting back to the ODBC fixed all memory leaks (or whatever
    you want to call them). So take note anyone - IF YOU USE A
    CONNECTION STRING TO CONNECT TO A DATABASE AND SEEM TO EXPERIENCE
    MEMORY ISSUES WITH LARGE AMOUNTS OF INFORMATION BEING QUERIED FROM
    THE DATABASE - TRY USING AN ODBC CONNECTION (via a system DSN
    created in windows ODBC admin).
    Last thing - where did you find the HF2 - I only see HF1 for
    CF8 listed in the developer center - can you send a link please?
    Thanks for your help again ke4pym,
    CM

  • Possible memory leak in Oracle 12.1.0 C client

    Dear Oracle Users and Professionals,
    I want to report Oracle 12.1.0 C client memory leak when reconnect feature is on place. I have used Valgrind/massif tool to diagnostic our components and there was small memory leak in libclntsh.so.12.1 which is calling libc function getaddrinfo(). This seems to be not freed when connection is closed, but my application is still running and keep reconnect when needed.
    I sought a bit on internet and Oracle Portals about this and did not find any information that some has detected this particular issue.
    In the attachment is trace back from massif: comparison of two different time slots.
    We are developers and use only free available Oracle client versions. Our customer which will operate the system has available whole Oracle Support.
    If you can give me advice, to reach state where we will have no memory leak, it would be helpfull.
    Thank you very much
    Jan Kianicka
    ([email protected])

    Hi Jan,
        This forum is for questions about connecting to non-Oracle databases. For questions about the Oracle client connecting to Oracle databases then try either one of these forums - I am not sure which will be best -
    ODBC
    or
    General Database Discussions
    Regards,
    Mike

  • Possible Memory Leak in WLS6.1-SP2

    Hello,
    I need your help in getting to the bottom of a memory issue we are facing.
    We are running EJB based applications on Web Logic Server (WLS) 6.1 SP2 on Solaris
    8 servers using 1.3.1_03 JDK. There are several applications running, but lets
    use one of them as example.
    I am using the following JDK parameters:
    -XX:NewSize=96m -XX:MaxNewSize=96m -Xms384m -Xmx384m -XX:SurvivorRatio=2
    The memory values on Solaris, before the application is started, are as follows:
    Real memory = 4096M, Free memory = 2415M, Swap in use = 1059M, Swap free = 2322M
    When I start the applications, I can see the memory foot print for this application
    at around 540 Meg. Since JVM pre-allocates heap space, I expect this number to
    remain constant as the application is stressed. But this does not happen, and
    it puzzles me. I see the memory footprint of application go up, and that makes
    me believe that is a memory leak somewhere. Since heap space remains below the
    selected limit (384M), and the application does not over-run heap, it makes me
    believe that the memory leak is not happening in application code; rather it is
    Web Logic Server that is leaking memory.
    As the application runs, the memory footprint increase from 540M to almost 900M,
    to the point the system is left with very low free swap space, and the application
    (not necessarily this particular one) starts throwing OutOfMemoryError.
    At this point, it becomes impossible to recover and the only way out is to bounce
    WLS.
    Does it sound like a memory leak issue to you ? Do you agree that it look like
    a WLS memory leak?
    If anybody had similar experience, please help me with your advice. I would be
    very interested in knowing how you diagnosed the problem and what solution did
    you apply.
    Thanks,
    Asad Faizi

    The native OCI driver is not allocating out of the Java heap, but rather
    from the OS (or the c rtl) so the Java heap parameters do not affect it. I
    don't know if it is a problem that you see or just normal behavior.
    Peace,
    Cameron Purdy
    Tangosol, Inc.
    http://www.tangosol.com/coherence.jsp
    Tangosol Coherence: Clustered Replicated Cache for Weblogic
    "Asad Faizi" <[email protected]> wrote in message
    news:[email protected]...
    >
    Cameron,
    We are using Oracle-8.1.7r3 driver. Can you give me some more informationas to
    why do you suspect Oracle JDBC driver? Have you had similar experience ?How did
    you diagnose this and what did you do to fix it?
    Thanks,
    Asad Faizi
    "Cameron Purdy" <[email protected]> wrote:
    Probably a JDBC driver (Oracle OCI?).
    Peace,
    Cameron Purdy
    Tangosol, Inc.
    http://www.tangosol.com/coherence.jsp
    Tangosol Coherence: Clustered Replicated Cache for Weblogic
    "Asad Faizi" <[email protected]> wrote in message
    news:[email protected]...
    Hello,
    I need your help in getting to the bottom of a memory issue we arefacing.
    We are running EJB based applications on Web Logic Server (WLS) 6.1SP2 on
    Solaris
    8 servers using 1.3.1_03 JDK. There are several applications running,but
    lets
    use one of them as example.
    I am using the following JDK parameters:
    -XX:NewSize=96m -XX:MaxNewSize=96m -Xms384m -Xmx384m -XX:SurvivorRatio=2
    The memory values on Solaris, before the application is started, areas
    follows:
    Real memory = 4096M, Free memory = 2415M, Swap in use = 1059M, Swapfree =
    2322M
    When I start the applications, I can see the memory foot print forthis
    application
    at around 540 Meg. Since JVM pre-allocates heap space, I expect thisnumber to
    remain constant as the application is stressed. But this does not
    happen,
    and
    it puzzles me. I see the memory footprint of application go up, andthat
    makes
    me believe that is a memory leak somewhere. Since heap space remainsbelow
    the
    selected limit (384M), and the application does not over-run heap,it
    makes me
    believe that the memory leak is not happening in application code;rather
    it is
    Web Logic Server that is leaking memory.
    As the application runs, the memory footprint increase from 540M toalmost
    900M,
    to the point the system is left with very low free swap space, andthe
    application
    (not necessarily this particular one) starts throwing OutOfMemoryError.
    At this point, it becomes impossible to recover and the only way outis to
    bounce
    WLS.
    Does it sound like a memory leak issue to you ? Do you agree that itlook
    like
    a WLS memory leak?
    If anybody had similar experience, please help me with your advice.I
    would be
    very interested in knowing how you diagnosed the problem and what
    solution
    did
    you apply.
    Thanks,
    Asad Faizi

  • Possible Memory Leak in C-API

    I can start my C_API JMS application and just create a JMS context. Looking at the windows task manager I see the memory footprint slowly grow.
    I'm not a Java wizard so I haven't found the right tools set for diagnosing this.
    Thanks for any help

    Has anyone else tried to track a memory leak in a JNI application? How did you achive this task, what tools did you use?You write a library in C/C++ only which does NOT use JNI which implements the functionality you want to achieve in your java application.
    You write a wrapper for that which excercises it completely including be able to run it in a loaded state.
    Then you buy/find a C/C++ profiling tool and run it on the wrapper.
    You write you JNI code such that the ONLY thing it does is interface between java and the library above. It doesn't impleent business logic nor work flow.

  • OCIServerAttach possible memory leak

    Hi
    For the last day I'm stuck in this case...and I'm pretty sure it is a memory leak:
    I have a multithreaded application, in C++. First I create a threaded environment (OCIEnvCreate in OCI_THREADED mode) in the main application thread. Next i start multiple threads, and in each one I open a new session to the Oracle database, using OCIServerAttach and next OCIBeginSession.
    I'm testing the case when the threads keep failing and they are restarted. For the tests I use an invalid schema (a dummy name that's not present in tnsnames.ora) when calling OCIServerAttach. In this case the statement fails and I call OCIServerDetach, which it should release the memory allocated in OCIServerAttach, but it seems that it doesn't do that...I watched the application with a memory leak detection tool and i keep getting memory leaks in OCIServerAttach....
    I read about this exact problem in some older Oracle releases, 8i. Now I'm using Oracle 9.2 with 9.2.0.4 patch installed.
    Please help me with any idea, cause i'm getting desperate...
    marius

    exactly :) it doesn't seem like it has leaks :) but...
    i made a test where i restarted 4 threads about 2000 - 3000 times (each time executing OCIServerAttach - OCIServerDetach)...and i got about 400 leaks. it's not for each thread...i don't get it
    here is the code:
    - open a new session:
    bool CORCLSession::beginSession(IN OCIEnv* phEnv,
                                            IN const char* pszConnectString)
         if (true == m_fConnected)
              endSession();
         m_phEnv = phEnv;
         strcpy(m_szConnectString, pszConnectString);
         char szUserName[MAX_CONNECT_STRING];
         char szPassword[MAX_CONNECT_STRING];
         char szSchema[MAX_CONNECT_STRING];
         splitConnectString(m_szConnectString, szUserName, szPassword, szSchema);
         /* allocate an error handle */
         m_nRetCode = OCIHandleAlloc((dvoid *)m_phEnv,
                                            (dvoid **)&m_phError,
                                            OCI_HTYPE_ERROR, 0, (dvoid **) 0);
         handleRetCode(CORCLException::OSES_BEGINSESSION);
         /* allocate a server handle */
         m_nRetCode = OCIHandleAlloc ((dvoid *)m_phEnv, (dvoid **)&m_phServer,
                             OCI_HTYPE_SERVER, 0, (dvoid **) 0);     
         handleRetCode(CORCLException::OSES_BEGINSESSION);
         /* create a server context */
         m_nRetCode = OCIServerAttach (m_phServer, m_phError,
                                            (text *)szSchema, strlen(szSchema),
                                            OCI_DEFAULT);
         handleRetCode(CORCLException::OSES_BEGINSESSION);
         m_fAttach = true;
         /* allocate a service handle */
         m_nRetCode = OCIHandleAlloc((dvoid *)m_phEnv,
                                            (dvoid **)&m_phSvcCtx,
                                            OCI_HTYPE_SVCCTX, 0, (dvoid **) 0);
         handleRetCode(CORCLException::OSES_BEGINSESSION);
         /* set the server attribute in the service context handle*/
         m_nRetCode = OCIAttrSet((dvoid *)m_phSvcCtx, OCI_HTYPE_SVCCTX,
                                       (dvoid *)m_phServer,
                                       (ub4) 0, OCI_ATTR_SERVER, m_phError);
         handleRetCode(CORCLException::OSES_BEGINSESSION);
         /* allocate a user session handle */
         m_nRetCode = OCIHandleAlloc((dvoid *)m_phEnv,
                                            (dvoid **)&m_phUserSession,
                                            OCI_HTYPE_SESSION, 0, (dvoid **) 0);
         handleRetCode(CORCLException::OSES_BEGINSESSION);
         /* set username attribute in user session handle */
         m_nRetCode = OCIAttrSet((dvoid *)m_phUserSession, OCI_HTYPE_SESSION,
                                       (dvoid *)szUserName, (ub4)strlen(szUserName),
                                       OCI_ATTR_USERNAME, m_phError);
         handleRetCode(CORCLException::OSES_BEGINSESSION);
         /* set password attribute in user session handle */
         m_nRetCode = OCIAttrSet((dvoid *)m_phUserSession, OCI_HTYPE_SESSION,
                                       (dvoid *)szPassword, (ub4)strlen(szPassword),
                                       OCI_ATTR_PASSWORD, m_phError);
         handleRetCode(CORCLException::OSES_BEGINSESSION);
         /*begin session !*/
         m_nRetCode = OCISessionBegin(     m_phSvcCtx, m_phError, m_phUserSession,
                                                 OCI_CRED_RDBMS, OCI_DEFAULT);
         handleRetCode(CORCLException::OSES_BEGINSESSION);
         /* set the user session attribute in the service context handle*/
         m_nRetCode = OCIAttrSet((dvoid *)m_phSvcCtx, OCI_HTYPE_SVCCTX,
                                       (dvoid *)m_phUserSession, (ub4) 0,
                                       OCI_ATTR_SESSION, m_phError);
         handleRetCode(CORCLException::OSES_BEGINSESSION);
         m_fConnected = true;
         return true;
    - closing a session:
    void CORCLSession::endSession()
         if (m_fAttach)
              // first detach the server
              m_nRetCode = OCIServerDetach(m_phServer, m_phError, OCI_DEFAULT);
              m_fAttach = false;
         if(m_fConnected)
              m_nRetCode = OCISessionEnd(     m_phSvcCtx, m_phError,
                                                 m_phUserSession, OCI_DEFAULT);
              m_fConnected = false;
         if (m_phServer != NULL)
              // now de-alloc the server handle
              m_nRetCode = OCIHandleFree((dvoid*)m_phServer, OCI_HTYPE_SERVER);
              m_phServer = NULL;
         if (m_phError != NULL)
              m_nRetCode = OCIHandleFree((dvoid*)m_phError, OCI_HTYPE_ERROR);
              m_phError = NULL;
         if (m_phUserSession != NULL)
              m_nRetCode = OCIHandleFree((dvoid*)m_phUserSession , OCI_HTYPE_SESSION);
              m_phUserSession = NULL;
         if (m_phSvcCtx != NULL)
              m_nRetCode = OCIHandleFree((dvoid*)m_phSvcCtx , OCI_HTYPE_SVCCTX);
              m_phSvcCtx = NULL;
    }

  • Possible Memory Leak... Real problem. Please Help

    Hello,
    About a couple of months ago I started getting a little concerned with my MacBook Pro's Hard Drive space, I deleted a bunch of stuff, after noticing I only had less than 1 Gb left, then I purchased an external HD and have used it to back up, and also to remove stuff from my hard drive in the computer. But now, I have noticed a problem that rather concerns me, If I put my computer to sleep after a normal day of work, and usage, when I wake it up it seems fine, and it runs about the same (a little less efficient, but not too much) then I realize that I am missing about 1-2 Gbs in Hard Drive Space. If I restart the computer, That memory comes back... and then If I keep using the computer, it leaks memory little by little.
    I have tried running anti-viruses and spyware software but that does not seem to work against this issue, unless I am doing something wrong. I have also tried to update all my software and keep my processes and running applications to a minimum. Finally, I tried leaving the computer on... without doing anything, connected to the internet... It leaked some more memory. I did the same, but without the internet... and then it did not leak anymore. I have no clue how this happen or how to fix it. I have tried most of the things I know could have possibly helped, but seems like isolating the problem to the internet does not really help me, since I need it for work.
    I would appreciate any suggestions or help, Thanks!!

    You are describing the natural process of virtual memory and Apple's use of a sleep image. Look in /var/vm for these files. It is not uncommon to have a sleep image of a couple of GB. Think about it. You have a computer that has data on a hard drive. When you start up the machine, that data needs to move from the hard drive to RAM and then, in some cases, back to the hard drive as virtual memory. This is when you do not have enough physical RAM to hold everything you are doing. Now, what happens when the machine goes to sleep? Well, you have data in RAM that in most cases will remain there as long as there is power. On a laptop, it is possible for the contents of RAM to be written to a file in the event of a battery depletion. THis is the suspended hibernation feature that Apple has. Commonly, there is one swapfile and one sleepimage file located in /var/vm.
    If you are missing a lot of space, you might instead want to check out your log files. It is possible that something caused a high number of log entries to be recorded and you have an incredibly large log file. Also, if your machine is not running between 3 and 4 a.m., you are missing the default maintenance scripts that run and rotate log files. Look in /var/log for unusually large logs.
    Hope this helps.

  • Possible memory leak in Weblogic 7.0

    We have developed an EJB application on Weblogic 7.0 running on HP-UX 11.0. Some
    JSP/Javabean programs, that lookup EJB compoments for services, are developed
    on the Resin web server to serve browser requests. Both Resin and Weblogic are
    running on the same HP machine. JDK version is 1.3.1_06 for HP-UX.
    The real memory is 2GB. Tha parameters to start Resin server are
    -showversion -verbose:gc -Xms384m -Xmx384m -Xoptimize
    The parameters to startup Weblogic are in the following:
    -server -showversion -verbose:gc -Xms768m -Xmx768m -XX:NewSize=256m -XX:SurvivorRatio=6
    -Xoptimize -XdoCloseWithReadPending
    In our observations, the peak traffic is during the working hours. Only few users
    (less than 40 users) stay in our system in the night and holidays.
    And in our observations, the weblogic will do the GC if necessary. But some memory
    are lost after each GC even not in the peak time. Thus, after running two or three
    days, there are only lillte free memory for use, and the Weblogic begins to take
    much time (10-30 seconds ) doing GC more often and often. At last, an OutOfMemory
    error generated.
    I hope that Weglogic can serve all the time.
    Does anybody han as experience on this problem?

    Thanks for your kinfness.
    We have wrote some single-user applications to test the Weblogic 7.0. We doubt
    it is JDBC driver's problem.
    We downloaded the Informix JDBC driver 2.21_JC2 to replace the older version 2.20_JC1
    and retest our applications. The memory usage curve looks much better and the
    applications run over three days.
    We will continue to observe the execution. Maybe the JDBC driver is the real problem.
    "Aravind Krishnasamy" <[email protected]> wrote:
    I am not sure whether it's an application problem or application server
    problem. Both are possible. I am not familar with HP Java Version.
    It may be a problem due to loitering object. You can try doing testing
    with
    single user and the memory needs for the user.
    NoteThe memory level before the test and after the test
    Foce GC and you need to GC same level of HEAP Used, Profiling tools will
    be
    helpful to find application problem
    Aravind
    "Wen-Hung Yeh" <[email protected]> wrote in message
    news:[email protected]...
    We have developed an EJB application on Weblogic 7.0 running on HP-UX11.0. Some
    JSP/Javabean programs, that lookup EJB compoments for services, aredeveloped
    on the Resin web server to serve browser requests. Both Resin and Weblogicare
    running on the same HP machine. JDK version is 1.3.1_06 for HP-UX.
    The real memory is 2GB. Tha parameters to start Resin server are
    -showversion -verbose:gc -Xms384m -Xmx384m -Xoptimize
    The parameters to startup Weblogic are in the following:
    -server -showversion -verbose:gc -Xms768m -Xmx768m -XX:NewSize=256m-XX:Su
    rvivorRatio=6
    -Xoptimize -XdoCloseWithReadPending
    In our observations, the peak traffic is during the working hours.Only
    few users
    (less than 40 users) stay in our system in the night and holidays.
    And in our observations, the weblogic will do the GC if necessary.But
    some memory
    are lost after each GC even not in the peak time. Thus, after runningtwo
    or three
    days, there are only lillte free memory for use, and the Weblogic beginsto take
    much time (10-30 seconds ) doing GC more often and often. At last,an
    OutOfMemory
    error generated.
    I hope that Weglogic can serve all the time.
    Does anybody han as experience on this problem?

  • Very high memory usage..possible memory leak?  Solaris 10 8/07 x64

    Hi,
    I noticed yesterday that my machine was becoming increasingly slow, where once it was pretty snappy. It's a Compaq SR5250NX with 1GB of RAM. Upon checking vmstat, I noticed that the "Free" column was ~191MB. Now, the only applications I had open were FireFox 2.0.11, GAIM, and StarOffice. I closed all of them, and the number reported in the "Free" column became approximately 195MB. "Pagefile" was about 5.5x that size. There were no other applications running and it's a single user machine, so I was the only one logged in. System uptime: 9 days.
    I logged out, logged back in, to see if that had an affect. It did not. Rebooted and obviously, that fixed it. Now with only FireFox, GAIM, and a terminal open, vmstat reports "Free" as ~450MB. I've noticed if I run vmstat every few seconds, the "Free" total keeps going down. Example:
    unknown% vmstat
    kthr      memory            page            disk          faults      cpu
    r b w   swap  free  re  mf pi po fr de sr cd s0 s1 s2   in   sy   cs us sy id
    0 0 0 870888 450220  9  27 10  0  1  0  8  2 -0 -0 -0  595 1193  569 72  1 28
    unknown% vmstat
    kthr      memory            page            disk          faults      cpu
    r b w   swap  free  re  mf pi po fr de sr cd s0 s1 s2   in   sy   cs us sy id
    0 0 0 870880 450204  9  27 10  0  1  0  8  2 -0 -0 -0  596 1193  569 72  1 28
    unknown% vmstat
    kthr      memory            page            disk          faults      cpu
    r b w   swap  free  re  mf pi po fr de sr cd s0 s1 s2   in   sy   cs us sy id
    0 0 0 870828 450092  9  27 10  0  1  0  8  2 -0 -0 -0  596 1193  570 71  1 28
    unknown%Output of prstat -u Kendall (my username ) is as follows:
       PID USERNAME  SIZE   RSS STATE  PRI NICE      TIME  CPU PROCESS/NLWP
      2026 Kendall   124M   70M sleep   59    0   0:01:47 1.4% firefox-bin/7
      1093 Kendall    85M   77M sleep   59    0   0:07:15 1.1% Xsun/1
      1802 Kendall    60M   15M sleep   59    0   0:00:08 0.1% gnome-terminal/2
      1301 Kendall    93M   23M sleep   49    0   0:00:30 0.1% java/14
      1259 Kendall    53M   15M sleep   49    0   0:00:32 0.1% gaim/1
      2133 Kendall  3312K 2740K cpu1    59    0   0:00:00 0.0% prstat/1
      1276 Kendall    51M   12M sleep   59    0   0:00:11 0.0% gnome-netstatus/1
      1247 Kendall    46M   10M sleep   59    0   0:00:06 0.0% metacity/1
      1274 Kendall    51M   13M sleep   59    0   0:00:05 0.0% wnck-applet/1
      1249 Kendall    56M   17M sleep   59    0   0:00:07 0.0% gnome-panel/1
      1278 Kendall    48M 9240K sleep   59    0   0:00:05 0.0% mixer_applet2/1
      1245 Kendall  9092K 3844K sleep   59    0   0:00:00 0.0% gnome-smproxy/1
      1227 Kendall  8244K 4444K sleep   59    0   0:00:01 0.0% xscreensaver/1
      1201 Kendall  4252K 1664K sleep   59    0   0:00:00 0.0% sdt_shell/1
      1217 Kendall    55M   16M sleep   59    0   0:00:00 0.0% gnome-session/1
       779 Kendall    47M 2208K sleep   59    0   0:00:00 0.0% gnome-volcheck/1
       746 Kendall  5660K 3660K sleep   59    0   0:00:00 0.0% bonobo-activati/1
      1270 Kendall    49M   10M sleep   49    0   0:00:00 0.0% clock-applet/1
      1280 Kendall    47M 8904K sleep   59    0   0:00:00 0.0% notification-ar/1
      1199 Kendall  2928K  884K sleep   59    0   0:00:00 0.0% dsdm/1
      1262 Kendall    47M 2268K sleep   59    0   0:00:00 0.0% gnome-volcheck/1
    Total: 37 processes, 62 lwps, load averages: 0.11, 0.98, 1.63System uptime is 9 hours, 48 minutes. I'm just wondering why the memory usage seems so high to do...nothing. It's obviously a real problem as the machine turned very slow when vmstat was showing 195MB free.
    Any tips, tricks, advice, on which way to go with this?
    Thanks!

    Apologies for the delayed reply. School has been keeping me nice and busy.
    Anyway, here is the output of prstat -Z:
       PID USERNAME  SIZE   RSS STATE  PRI NICE      TIME  CPU PROCESS/NLWP
      2040 Kendall      144M   76M sleep   59    0   0:04:26 2.0% firefox-bin/10
    28809 Kendall     201M  193M sleep   59    0   0:42:30 1.9% Xsun/1
      2083 Kendall      186M   89M sleep   49    0   0:02:31 1.2% java/58
      2260 Kendall       59M   14M sleep   59    0   0:00:00 1.0% gnome-terminal/2
      2050 Kendall       63M   21M sleep   49    0   0:01:35 0.6% realplay.bin/4
      2265 Kendall     3344K 2780K cpu1    59    0   0:00:00 0.2% prstat/1
    29513 Kendall     71M   33M sleep   39    0   0:07:25 0.2% gaim/1
    28967 Kendall     56M   18M sleep   59    0   0:00:24 0.1% gnome-panel/1
    29060 Kendall     93M   24M sleep   49    0   0:02:58 0.1% java/14
    28994 Kendall     51M   13M sleep   59    0   0:00:23 0.1% wnck-applet/1
    28965 Kendall     49M   14M sleep   59    0   0:00:33 0.0% metacity/1
       649 noaccess   164M   46M sleep   59    0   0:09:54 0.0% java/23
    28996 Kendall     51M   12M sleep   59    0   0:00:50 0.0% gnome-netstatus/1
      2264 Kendall    1352K  972K sleep   59    0   0:00:00 0.0% csh/1
    28963 Kendall  9100K 3792K sleep   59    0   0:00:03 0.0% gnome-smproxy/1
    ZONEID    NPROC  SWAP   RSS MEMORY      TIME  CPU ZONE
         0           80          655M  738M    73%       1:18:40 7.7% global
    Total: 80 processes, 322 lwps, load averages: 0.27, 0.27, 0.22Sorry about the bad formatting, it's copied from the terminal.
    In any event, we can see that FireFox is sucking up 145MB (??!?!!? crazy...) XSun, 200MB, and java 190MB. I'm running Java Desktop System (Release 3) so I assume that is what accounts for the the high memory usage RE: java process. But, XSun, 200MB?
    Is this normal and I just need to toss another gig in, or what?
    Thanks

Maybe you are looking for