Memory leak linux

I'm running Ubuntu Linux and it looks like I see a memory leak that I'm not seeing when I ran it on my PC.
I get heap exception everntually. I was using sam maxm heap size of 500M.
Is there anything I have to do special for linux?
Thanks

morgalr wrote:
Yes, my crystal ball says to fix the leak you observe in Linux, and it will fix any potential problem you have not viewed in Windows yet.(chuckle) Your comment expresses something that flicked through my mind even reading the title. The thought that flicked through my mind, did not quite have the eloquence of your words.

Similar Messages

  • Oracle 8.1.5 Linux Memory Leak?

    We have been running Oracle 8.1.5 Server and Client on Redhat 6.1
    kernel 2.2.12-20
    glibc-2.1.2-11
    Blackdown's JDK 1.2 RC3
    We are having bad memory leaks and we have verified that they are
    not in our source code using a memory profiler for Java-linux.
    We are using the JDBC calls and the OCI JDBC driver.
    We think that the memory leak is in libocijdbc8.so but we're not
    sure. It could also be in glibc but the 2.1.2-11 version should
    be pretty stable. It could also be in the Blackdown jvm.
    Anyone have any ideas?
    null

    Oracle8iR2's JDBC works fine with Oracle8.1.5.
    You can download the new JDBC driver.
    null

  • Memory Leak in Linux

    Hi friends,
    Is anyone worked on any of the tools to identify and optimise Java Memory Leak in Linux environment?

    Hi friends,
    Is anyone worked on any of the tools to identify and
    optimise Java Memory Leak in Linux environment?Hi,
    I've been using Optimizeit on linux, and I like it.
    /Kaj

  • Memory leak in image rings on Linux

    Hello all,
    I have a very serious problem I didn't have in previous version of my soft and one of the only addition I've made recently is to use image rings. The soft uses 6Mb more every minute. If I remove the rings, it stops. It could be a wrong lead, so I'm trying to write a test case, but is there a list of identified memory leaks somewhere ?
    THanks.
    Solved!
    Go to Solution.

    OK guys, there's a very serious leak on Linux, confirmed by the code below. Every time you change the value of a picture ring, either by clicking on the arrow of the picture ring or right-click on it (callback to SetCtrlVal), it uses 1 extra Mb of mem for a 512x512 pixel image !!!
    Here's a sample code:
    // Right-click the ring to cause memory leak
    #include <stdio.h>
    #include <stdlib.h>
    #include <cvirte.h>
    #include <userint.h>
    #define RND_COLOR (((rand()<<16) ^ (rand()<<8) ^ rand()) & 0xFFFFFF)
    // (int)((double)(0xFFFFFF)*rand()/RAND_MAX)
    static int Pnl=0,
    Text, Ring, // Controls
    NbVals=16, // Number of images in the ring
    Width=512, Height=512; // Of the Canvas and image ring
    // Returns memory used by process in 4Kb page:
    // TotalSize Resident Share Text Lib Data Dirty
    // See "man proc" section statm
    static char* ReadOffMemoryStatus(void) {
    static char statm[80];
    statm[0]='\0';
    #ifdef _NI_linux_
    FILE *f = fopen("/proc/self/statm","r");
    if (f)
    fgets (statm, 79, f),
    fclose(f);
    #endif
    return statm;
    static void Prepare(const int Nb) {
    Point polyPoints[10]={{0,0}};
    char Str[10];
    int i, Bitmap;
    int Canvas=NewCtrl(Pnl, CTRL_CANVAS, "", 0, 0);
    SetCtrlAttribute(Pnl, Canvas, ATTR_DRAW_POLICY, VAL_UPDATE_IMMEDIATELY);
    SetCtrlAttribute(Pnl, Canvas, ATTR_WIDTH, Width);
    SetCtrlAttribute(Pnl, Canvas, ATTR_HEIGHT, Height);
    // SetCtrlAttribute(Pnl, Canvas, ATTR_ENABLE_ANTI_ALIASING, 1); // No compile on Linux
    SetCtrlAttribute(Pnl, Canvas, ATTR_PICT_BGCOLOR, RND_COLOR /*VAL_TRANSPARENT*/);
    SetCtrlAttribute(Pnl, Canvas, ATTR_PEN_FILL_COLOR, RND_COLOR);
    SetCtrlAttribute(Pnl, Canvas, ATTR_PEN_COLOR, RND_COLOR);
    SetCtrlAttribute(Pnl, Canvas, ATTR_PEN_WIDTH, 7);
    for (i=0; i<10; i++)
    polyPoints[i].x=(Width*rand()/RAND_MAX),
    polyPoints[i].y=(Height*rand()/RAND_MAX);
    sprintf(Str, "%d", Nb);
    // CanvasStartBatchDraw(Pnl, Canvas);
    // This sometimes doesn't work on Linux
    CanvasDrawPoly (Pnl, Canvas, 10, polyPoints, 1, VAL_DRAW_FRAME_AND_INTERIOR);
    CanvasDrawLine (Pnl, Canvas, MakePoint(Width-1,0), MakePoint(0, Height-1));
    SetCtrlAttribute(Pnl, Canvas, ATTR_PEN_COLOR, VAL_BLACK);
    SetCtrlAttribute(Pnl, Canvas, ATTR_PEN_FILL_COLOR, VAL_WHITE);
    CanvasDrawText(Pnl, Canvas, Str, VAL_APP_META_FONT,
    MakeRect (2, 2, VAL_KEEP_SAME_SIZE, VAL_KEEP_SAME_SIZE), VAL_UPPER_LEFT);
    // CanvasEndBatchDraw(Pnl, Canvas);
    GetCtrlBitmap(Pnl, Canvas, 0, &Bitmap);
    DiscardCtrl (Pnl, Canvas);
    InsertListItem(Pnl, Ring, Nb, NULL, Nb); // The value is the color, so remember which one you use
    SetCtrlBitmap (Pnl, Ring, Nb, Bitmap);
    DiscardBitmap (Bitmap);
    int CVICALLBACK cb_Change(int panel, int control, int event,
    void *callbackData, int eventData1, int eventData2) {
    static int i=0;
    switch (event) {
    case EVENT_RIGHT_CLICK:
    case EVENT_RIGHT_DOUBLE_CLICK:
    SetCtrlVal(Pnl, Ring, i=(i+1)%NbVals);
    // No break;
    case EVENT_COMMIT:
    SetCtrlVal(Pnl, Text, ReadOffMemoryStatus());
    break;
    return 0;
    int CVICALLBACK cb_Quit(int panel, int control, int event,
    void *callbackData, int eventData1, int eventData2) {
    switch (event) {
    case EVENT_COMMIT: QuitUserInterface (0); break;
    return 0;
    int main (int argc, char *argv[]) {
    int i, Quit;
    if (InitCVIRTE (0, argv, 0) == 0) return -1;
    Pnl = NewPanel (0, "Test image ring", 20, 20, Height+20, Width);
    Text = NewCtrl (Pnl, CTRL_STRING_LS, "Memory use (in 4Kb pages)", 0, 0);
    Ring = NewCtrl (Pnl, CTRL_PICTURE_RING, "", 20, 0);
    Quit = NewCtrl (Pnl, CTRL_SQUARE_BUTTON_LS, "", 50, 50);
    SetCtrlAttribute(Pnl, Ring, ATTR_HEIGHT, Height);
    SetCtrlAttribute(Pnl, Ring, ATTR_WIDTH, Width);
    SetCtrlAttribute (Pnl, Ring, ATTR_CTRL_MODE, VAL_HOT);
    SetCtrlAttribute(Pnl, Ring, ATTR_CALLBACK_FUNCTION_POINTER, cb_Change);
    for (i=0; i<NbVals; i++) Prepare(i);
    SetCtrlAttribute(Pnl, Text, ATTR_WIDTH, 250);
    SetCtrlAttribute(Pnl, Text, ATTR_LABEL_LEFT, 250);
    SetCtrlAttribute(Pnl, Text, ATTR_LABEL_TOP, 0);
    SetCtrlAttribute(Pnl, Quit, ATTR_CALLBACK_FUNCTION_POINTER, cb_Quit);
    SetCtrlAttribute(Pnl, Quit, ATTR_VISIBLE, 0);
    SetCtrlAttribute(Pnl, Quit, ATTR_SHORTCUT_KEY, VAL_ESC_VKEY);
    SetPanelAttribute(Pnl, ATTR_CLOSE_CTRL, Quit);
    DisplayPanel (Pnl);
    RunUserInterface ();
    return 0;
    There are other issues as well:
     - CanvasDrawPoly sometimes doesn't work.
     - The anti-aliasing on a canvas doesn't compile.
    Is there anything more recent than CVI 2010 for Linux ?!?

  • Memory leak in OCCI/libclnts on Linux RHEL 5.5 ? Please advise...

    Hi all,
    Starting with some background:
    I have an application that has been running on 32-bit Linux server for years without problem, a few weeks ago it was ported to 64-bit RHEL 5.5 (compiled with -m32). Now with the application in the new environment some processes are growing in memorysize.
    I have tried to pinpoint the memory leak with Valgrind and have numerous leaks reported in "libclntsh.so", "libocci.so" and "libnnz11.so"
    Examples:
    ==30114== Use of uninitialised value of size 4
    ==30114== at 0xA61BAD7: ztcedecb (in /soe3/opt/oracle-1/product/32bit-client-11.2.0.2/lib/libclntsh.so.11.1)
    ==30114== by 0xA61B1E2: ztcedencbk (in /soe3/opt/oracle-1/product/32bit-client-11.2.0.2/lib/libclntsh.so.11.1)
    ==30114== by 0xA61AA0A: ztcebn (in /soe3/opt/oracle-1/product/32bit-client-11.2.0.2/lib/libclntsh.so.11.1)
    ==30114== by 0xA61A561: ztcen (in /soe3/opt/oracle-1/product/32bit-client-11.2.0.2/lib/libclntsh.so.11.1)
    ==30114== by 0x8DA9725: ztceenc (in /soe3/opt/oracle-1/product/32bit-client-11.2.0.2/lib/libclntsh.so.11.1)
    ==30114== by 0x8E68920: ztcrbm (in /soe3/opt/oracle-1/product/32bit-client-11.2.0.2/lib/libclntsh.so.11.1)
    ==30114== by 0x8E684D5: ztcrbh (in /soe3/opt/oracle-1/product/32bit-client-11.2.0.2/lib/libclntsh.so.11.1)
    ==30114== by 0x8E68393: ztcrbp (in /soe3/opt/oracle-1/product/32bit-client-11.2.0.2/lib/libclntsh.so.11.1)
    ==30114== by 0x8E682C6: ztcr2seed (in /soe3/opt/oracle-1/product/32bit-client-11.2.0.2/lib/libclntsh.so.11.1)
    ==30114== by 0x8E6827F: ztcrseed3 (in /soe3/opt/oracle-1/product/32bit-client-11.2.0.2/lib/libclntsh.so.11.1)
    ==30114== by 0x8DAA24A: ztcsh (in /soe3/opt/oracle-1/product/32bit-client-11.2.0.2/lib/libclntsh.so.11.1)
    ==30114== by 0x99727D7: kpucpcreate (in /soe3/opt/oracle-1/product/32bit-client-11.2.0.2/lib/libclntsh.so.11.1)
    And:
    ==30114== Conditional jump or move depends on uninitialised value(s)
    ==30114== at 0x8E69BBC: ztvo5ke (in /soe3/opt/oracle-1/product/32bit-client-11.2.0.2/lib/libclntsh.so.11.1)
    ==30114== by 0x8D55E68: kpu8lgn (in /soe3/opt/oracle-1/product/32bit-client-11.2.0.2/lib/libclntsh.so.11.1)
    ==30114== by 0x8D53E56: kpuauthxa (in /soe3/opt/oracle-1/product/32bit-client-11.2.0.2/lib/libclntsh.so.11.1)
    ==30114== by 0x8D536DB: kpuauth (in /soe3/opt/oracle-1/product/32bit-client-11.2.0.2/lib/libclntsh.so.11.1)
    ==30114== by 0x996EB99: kpucpinithstnode (in /soe3/opt/oracle-1/product/32bit-client-11.2.0.2/lib/libclntsh.so.11.1)
    ==30114== by 0x996FFB1: kpucpcrecons (in /soe3/opt/oracle-1/product/32bit-client-11.2.0.2/lib/libclntsh.so.11.1)
    ==30114== by 0x9972871: kpucpcreate (in /soe3/opt/oracle-1/product/32bit-client-11.2.0.2/lib/libclntsh.so.11.1)
    ==30114== by 0x9821048: OCIConnectionPoolCreate (in /soe3/opt/oracle-1/product/32bit-client-11.2.0.2/lib/libclntsh.so.11.1)
    ==30114== by 0x7BFB896: oracle::occi::ConnectionPoolImpl::initialise(oracle::occi::EnvironmentImpl*, void*, unsigned int, void*, unsigned int, void*, unsigned int, unsigned int, unsigned int, unsigned int) (in /soe3/opt/oracle-1/product/32bit-client-11.2.0.2/lib/libocci.so.11.1)
    ==30114== by 0x7BFBB79: ZN6oracle4occi18ConnectionPoolImplC9EPNS015EnvironmentImplERKSsS5_S5_jjj (in /soe3/opt/oracle-1/product/32bit-client-11.2.0.2/lib/libocci.so.11.1)
    ==30114== by 0x7BFBAC7: oracle::occi::ConnectionPoolImpl::ConnectionPoolImpl(oracle::occi::EnvironmentImpl*, std::string const&, std::string const&, std::string const&, unsigned int, unsigned int, unsigned int) (in /soe3/opt/oracle-1/product/32bit-client-11.2.0.2/lib/libocci.so.11.1)
    ==30114== by 0x7BF2C13: oracle::occi::EnvironmentImpl::createConnectionPool(std::string const&, std::string const&, std::string const&, unsigned int, unsigned int, unsigned int) (in /soe3/opt/oracle-1/product/32bit-client-11.2.0.2/lib/libocci.so.11.1)
    And:
    ==30114== Conditional jump or move depends on uninitialised value(s)
    ==30114== at 0xAC3B2A5: CMP_RecomputeLength (in /soe3/opt/oracle-1/product/32bit-client-11.2.0.2/lib/libnnz11.so)
    ==30114== by 0xAC3B9EC: CMP_Divide (in /soe3/opt/oracle-1/product/32bit-client-11.2.0.2/lib/libnnz11.so)
    ==30114== by 0xAC3B5BA: CMP_ModularReduce (in /soe3/opt/oracle-1/product/32bit-client-11.2.0.2/lib/libnnz11.so)
    ==30114== by 0xAC3A2E6: Alg_ComputeModQ_GHash (in /soe3/opt/oracle-1/product/32bit-client-11.2.0.2/lib/libnnz11.so)
    ==30114== by 0xAC3AA30: A_X931RandomGenerateBytes (in /soe3/opt/oracle-1/product/32bit-client-11.2.0.2/lib/libnnz11.so)
    ==30114== by 0x8E681F0: ztcr2rnd (in /soe3/opt/oracle-1/product/32bit-client-11.2.0.2/lib/libclntsh.so.11.1)
    ==30114== by 0x8DAA260: ztcsh (in /soe3/opt/oracle-1/product/32bit-client-11.2.0.2/lib/libclntsh.so.11.1)
    ==30114== by 0x8CD0125: kpusattr (in /soe3/opt/oracle-1/product/32bit-client-11.2.0.2/lib/libclntsh.so.11.1)
    ==30114== by 0x8CE96CD: OCIAttrSet (in /soe3/opt/oracle-1/product/32bit-client-11.2.0.2/lib/libclntsh.so.11.1)
    ==30114== by 0x7BF6184: oracle::occi::ConnectionImpl::openConnection(OCIEnv*, OCIError*, void*, unsigned int, void*, unsigned int, void*, unsigned int, void*, unsigned int, unsigned int, void*, unsigned int, oracle::occi::Connection::Purity, oracle::occi::StatelessConnectionPool::PoolType) (in /soe3/opt/oracle-1/product/32bit-client-11.2.0.2/lib/libocci.so.11.1)
    ==30114== by 0x7BF9C29: ZN6oracle4occi14ConnectionImplC9EPNS018ConnectionPoolImplERKSsS5_ (in /soe3/opt/oracle-1/product/32bit-client-11.2.0.2/lib/libocci.so.11.1)
    ==30114== by 0x7BF9AD1: oracle::occi::ConnectionImpl::ConnectionImpl(oracle::occi::ConnectionPoolImpl*, std::string const&, std::string const&) (in /soe3/opt/oracle-1/product/32bit-client-11.2.0.2/lib/libocci.so.11.1)
    There has been quite a few changes due to the new server. New compiler (gcc) from version 2.96 to 4.1.2, new version of oracle client 10g to 11g (11.2.0.2), new version of OCCI (also 11.2.0.2). The applications sourcecode is pretty much unchanged though, and that is why I turn to all of you for help.
    Is there anyone who knows anything about this problem and how to even start to fix this leak (if it even is in OCCI)?
    I can supply sourcecode and/or logs if needed. It is quite a lot of complex code so it might take me a while to sort out the relevant code though...

    Thanks for your input! Tough this post is from some time ago this is still an issue for me I'm afraid, so I appreciate all the help I can get.
    I have stripped down the code to just the basic functions needed to replicate the problem. The pool creation and connections are the same as in our application (which is unchanged since before the porting). Though the following code makes no indications of a leak when run through Valgrind, it still grows when checked in "top". It could be that I stripped the code too much, but this is pretty much what our application does. It creates a database lock (not in this code), creates connection, (read table), terminates connection and release lock every 6 seconds to check if there is any new assignments added...
    #include <iostream>
    #include <string>
    #include <occi.h>
    using namespace oracle::occi;
    using namespace std;
    Environment *env;
    ConnectionPool *connPool;
    Connection *con;
    int x, loopnr;
    string usr = "test_user";
    string pwd = "test_pw";
    string url = "dbtest";
    void run(int x) { // Run loops
    for(int i=0; i<x; i++){ // Loop connect and disconnect x number of times
    try {
    fflush(stdout); // Update console row for count value
    con = connPool->createConnection (usr, pwd); // Connect
    usleep(100000);
    connPool->terminateConnection (con); // Disconnect
    cout << "\r"; // Update console row for count value
    cout << loopnr << endl; // Print number of loops done
    usleep(100000);
    loopnr++; // Count number of loops done
    catch(SQLException ex) { // Exception handling
    cout<<"SQLException"<<endl;
    cout<<"Error number: "<< ex.getErrorCode() << endl;
    cout<<ex.getMessage() << endl;
    int main(int argc,char* argv[]) {
    cout << "IN --- main()\n";
    if(argc == 2) { // Read number of loops as argument...
    x = atoi(argv[1]);
    else { // ...or run loop 200 times if no args
    x = 200;
    try{
    env = Environment::createEnvironment (Environment::DEFAULT); // Create environment
    loopnr = 1;
    connPool = env->createConnectionPool(usr, pwd, url, 1, 2, 1); // Create pool
    run(x); // Run loops
    catch(SQLException ex) { // Exception handling
    cout<<"SQLException"<<endl;
    cout<<"Error number: "<< ex.getErrorCode() << endl;
    cout<<ex.getMessage() << endl;
    env->terminateConnectionPool (connPool); // Cleanup Pool when done
    Environment::terminateEnvironment (env); // Cleanup Environment when done
    cout << "\nUT --- main()\n";
    return 0;
    Above code is built with the following makefile:
    ORACLE_HOME=/opt/oracle/product/32bit-client-11.2.0.2
    CXXFLAGS = -Wall -m32 -g -fPIC \
    -I$(ORACLE_HOME)/rdbms/public
    LDLIBS = -L$(ORACLE_HOME)/lib/ -locci \
    -L$(ORACLE_HOME)/rdbms/lib/ -lclntsh
    LDFLAGS = -m32
    default: all
    Sample: Sample.cc
    all: Sample
    clean:
    rm -f Sample *.o
    Hopefully someone can make sense out of this....
    Edited by: StLa on 2011-nov-23 04:57

  • Memory leak under GNU/Linux when using exec()

    Hi,
    We detected that our application was taking all the free memory of the computer when we were using intensively and periodically the method exec() to execute some commands of the OS. The OS of the computer is a GNU/Linux based OS.
    So, in order to do some monitoring we decided to wrote a simple program that called exec() infinite number of times, and using the profiler tool of Netbeans we saw a memory leak in the program because the number of surviving generations increased during all the execution time. The classes that have more surviving generations are java.lang.ref.Finalizer, java.io.FileDescriptor and byte[].
    We also decided to test this simple program using Windows, and in that OS we saw that the memory leak disappeared: the number of surviving generations was almost stable.
    I attach you the code of the program.
    import java.io.BufferedReader;
    import java.io.IOException;
    import java.io.InputStream;
    import java.io.InputStreamReader;
    public class testExec
        public static void main(String args[]) throws IOException, InterruptedException
            Runtime runtime = Runtime.getRuntime();
            while (true)
                Process process = null;
                InputStream is = null;
                InputStreamReader isr = null;
                BufferedReader br = null;
                try
                    process = runtime.exec("ls");
                    //process = runtime.exec("cmd /c dir");
                    is = process.getInputStream();
                    isr = new InputStreamReader(is);
                    br = new BufferedReader(isr);
                    String line;
                    while ((line = br.readLine()) != null)
                        System.out.println(line);
                finally
                    process.waitFor();
                    if (is != null)
                        is.close();
                    if (isr != null)
                        isr.close();
                    if (br != null)
                        br.close();
                    if (process != null)
                        process.destroy();
    }¿Is anything wrong with the test program we wrote? (we know that is not usual to call infinite times the command ls/dir, but it's just a test)
    ¿Why do we have a memory leak in Linux but not in Windows?
    I will appreciate any help or ideas. Thanks in advance.

    Hi Joby,
    From our last profiling results, we haven't found yet a proper solution. We think that probably the problem is caused by the byte[]'s/FileInputStreams created by the class UNIXProcess that manage the stdin, stdout and stderr streams. It seems that these byte arrays cannot be removed correctly by the garbage collector and they become bigger and bigger, so at the end they took all the memory of the system.
    We downloaded the last version of OpenJDK 6 (build b19) and modified UNIXProcess.java.linux so when we call its method destroy(), we assign to null those streams. We did that because we wanted to indicate to the garbage collector that these objects could be removed, as we saw that the close() methods doesn't do anything on their implementation.
    public void destroy() {
         // There is a risk that pid will be recycled, causing us to
         // kill the wrong process!  So we only terminate processes
         // that appear to still be running.  Even with this check,
         // there is an unavoidable race condition here, but the window
         // is very small, and OSes try hard to not recycle pids too
         // soon, so this is quite safe.
         synchronized (this) {
             if (!hasExited)
              destroyProcess(pid);
            try {
                stdin_stream.close();
                stdout_stream.close();
                stderr_stream.close();
                // LINES WE ADDED
                stdin_stream = null;
                stdout_stream = null;
                stderr_stream = null;
            } catch (IOException e) {
                // ignore
                e.printStackTrace();
        }But this didn't work at all. We saw that we were able to execute for a long time our application and that the free memory of the system wasn't decreasing as before, but we did some profiling with this custom JVM and the test application and we still see more or less the same behaviour: lots of surviving generations, at some point increase of the used heap to the maximum allowed, and finally the crash of the test app.
    So sadly, we still don't have a solution for that problem. You could try to compile OpenJDK 6, modify it, and try it with your program to see if the last version works for you. Compiling OpenJDK 6 in Linux is quite easy: you just have to download the source and the binaries from here and configure your environment with something like this:
    export ANT_HOME=/opt/apache-ant-1.7.1/
    export ALT_BOOTDIR=/usr/lib/jvm/java-6-sun
    export ALT_OUTPUTDIR=/tmp/openjdk
    export ALT_BINARY_PLUGS_PATH=/opt/openjdk-binary-plugs/
    export ALT_JDK_IMPORT_PATH=/usr/lib/jvm/java-6-sun
    export LD_LIBRARY_PATH=
    export CLASSPATH=
    export JAVA_HOME=
    export LANG=C
    export CC=/usr/bin/gcc-4.3
    export CXX=/usr/bin/g++-4.3Hope it helps Joby :)
    Cheers.

  • Memory Leak while using -Xrunhprof option in Linux OS

    While using the follwing option in my application there is memory leak in JVM in Linux OS.
    -Xrunhprof:heap=all,cpu=times,monitor=y,file=/home/gemini/dilip/www2.log,thread=yIs this a bug ??

    Little lost here. Looks like you are facing memory leaks in Tuxedo 7.1 WS
    client code when it talks with Tuxedo 6.x? Is this correct?
    If so, try installing latest rolling patch for Tuxedo 7.1.
    We recently fixed couple of memory leaks in interop area. One was related to
    compression.
    _shailesh
    Scott Orshan <[email protected]> wrote in message
    news:[email protected]..
    If you are running with the latest patch, then report these problems to
    Support, giving them sample code so that they can reproduce the problem.
    Scott
    Thomas Winter wrote:
    Hi Scott,
    as an additional information:
    The guys at the server side changed something (their
    formaly useing the old 6.3 libraries at server side)
    and surprise... the client has no memory leak anymore.
    But, if more than one thread at the same time use the atmi calls
    there is still some memory consumption.
    The workaround is to use a mutex object to make sure, that
    only one thread use the atmi calls.
    AFAIS Tuxedo has an Problem with Multithreading.
    Thx
    Thomas

  • Detect memory leak in JNI so files for linux and Solaris

    I have to find the memory leaks in the JNI for solaris and linux but the issue is
    i need to find the leaks in the so files.I have solved the issues of leaks using Purify
    on windows but not getting appropriate support for linux. Any pointers to tools will help.I tried Valgrind on linux but it is not giving me the exact location of leak as in purify and also the support for purify is for 32 bit only.Valgrind is not showing any functions in .so files.JNI is not supported in Purify for Solaris? Please Help.

    amol28 wrote:
    I have to find the memory leaks in the JNI for solaris and linux but the issue is
    i need to find the leaks in the so files.I have solved the issues of leaks using Purify
    on windows but not getting appropriate support for linux. Any pointers to tools will help.I tried Valgrind on linux but it is not giving me the exact location of leak as in purify and also the support for purify is for 32 bit only.Valgrind is not showing any functions in .so files.JNI is not supported in Purify for Solaris? Please Help.If you have written the JNI, the JNI itself (java calls, methods, etc) to be OS agnostic then it shouldn't matter. In that case you check the windows code (not jni), the linux code (not jni) and the jni code itself independent of each other.
    If you haven't made the JNI OS agnostic the question would be why not?

  • Memory Leak in Linux OS

    Using JNI1.2 for C++ and JAVA communication. And the Java application is a multithread application and monitoring JBoss application server using JMX. In each 5 minute interval the C++ application is invoking a method of java class and for each method call its creating a thread and retrieving the value from JBoss.
    the Code in run method of thread is as follows
    Object obj = context.lookup( "ejb/mgmt/MEJB" );
              ManagementHome home = (ManagementHome) PortableRemoteObject.narrow(obj,ManagementHome.class);
              server = home.create();
    //after that am retrieving the value
    But for each iteration the memory is increasing by 2MB of JVM . Its looks like a memory leak in JVM. The JVM version am using is 1.4.2.6.
    Could any one suggest me what may be the problem. THis problem is not occuring in Window OS.
    Thanks in advance.

    The JVM version am using is 1.4.2.6.Give it a try with 1.4.2_08.

  • Firefox 4.0b13pre (2011-03-11) on Linux appears to have a memory leak.

    FireFox with 12 tabs open (cnn, msnbc, the.register.co.uk, slashdot, biowar, infoworld, facebook, ebaumsworld, chase online, housereparitalk, meritline, and chicagobusiness) has a memory leak and, before a restart, had used almost 3GB of resident memory. The CPU utilization (4 cores) had gone up to almost 7. Unfortunately, I'll have to go back to Chrome until this bug is fixed as I can't have this affecting my machine like this.

    It would be helpful if Mozilla could provide a memory profiling tool that would help us civilians track down memory problems either in the core products or in extensions. The suggestions to create new profiles, re-add extensions, and do A/B (C/D/E) testing along the way, while accurate, aren't practical when we discover that FF 4 on Win 7 is using north of 1GB of memory.

  • Memory leak using xslprocessor.valueof in 11.1.0.6.0 - 64bit ??

    My company has made the decision to do all of our internal inter-system communication using XML. Often we may need to transfer thousands of records from one system to another and due to this (and the 32K limit in prior versions) we're implementing it in 11g. Currently we have Oracle 11g Enterprise Edition Release 11.1.0.6.0 on 64 bit Linux.
    This is a completely network/memory setup - the XML data comes in using UTL_HTTP and is stored in a CLOB in memory and then converted to a DOMDocument variable and finally the relevant data is extracted using xslprocessor.valueof calls.
    While this is working fine for smaller datasets, I've discovered that repeated calls with very large documents cause the xslprocessor to run out of memory with the following message:
    ERROR at line 1:
    ORA-04030: out of process memory when trying to allocate 21256 bytes
    (qmxdContextEnc,)
    ORA-06512: at "XDB.DBMS_XSLPROCESSOR", line 1010
    ORA-06512: at "XDB.DBMS_XSLPROCESSOR", line 1036
    ORA-06512: at "XDB.DBMS_XSLPROCESSOR", line 1044
    ORA-06512: at "SCOTT.UTL_INTERFACE_PKG", line 206
    ORA-06512: at line 28
    Elapsed: 00:03:32.45
    SQL>
    From further testing, it appears that the failure occurs after approximately 161,500 calls to xslprocessor.valueof however I'm sure this is dependent on the amount of server memory available (6 GB in my case).
    I expect that we will try and log a TAR on this, but my DBA is on vacation right now. Has anyone else tried calling the xslprocessor 200,000 times in a single session?
    I've tried to make my test code as simple as possible in order to track down the problem. This first block simply iterates through all of our offices asking for all of the employees at that office (there are 140 offices in the table).
    DECLARE
    CURSOR c_offices IS
    SELECT office_id
    FROM offices
    ORDER BY office_id;
    r_offices C_OFFICES%ROWTYPE;
    BEGIN
    OPEN c_offices;
    LOOP
    FETCH c_offices INTO r_offices;
    EXIT WHEN c_offices%NOTFOUND;
    utl_interface_pkg.get_employees(r_offices.office_id);
    END LOOP;
    CLOSE c_offices;
    END;
    Normally I'd be returning a collection of result data from this procedure, however I'm trying to make things as simple as possible and make sure I'm not causing the memory leak myself.
    Below is what makes the SOAP calls (using the widely circulated UTL_SOAP_API) to get our data and then extracts the relevant parts. Each office (call) should return between 200 and 1200 employee records.
    PROCEDURE get_employees (p_office_id IN VARCHAR2)
    l_request utl_soap_api.t_request;
    l_response utl_soap_api.t_response;
    l_data_clob CLOB;
    l_xml_namespace VARCHAR2(100) := 'xmlns="' || G_XMLNS_PREFIX || 'EMP.wsGetEmployees"';
    l_xml_doc xmldom.DOMDocument;
    l_node_list xmldom.DOMNodeList;
    l_node xmldom.DOMNode;
    parser xmlparser.Parser;
    l_emp_id NUMBER;
    l_emp_first_name VARCHAR2(100);
    l_emp_last_name VARCHAR2(100);
    BEGIN
    --Set our authentication information.
    utl_soap_api.set_proxy_authentication(p_username => G_AUTH_USER, p_password => G_AUTH_PASS);
    l_request := utl_soap_api.new_request(p_method => 'wsGetEmployees',
    p_namespace => l_xml_namespace);
    utl_soap_api.add_parameter(p_request => l_request,
    p_name => 'officeId',
    p_type => 'xsd:string',
    p_value => p_office_id);
    l_response := utl_soap_api.invoke(p_request => l_request,
    p_url => G_SOAP_URL,
    p_action => 'wsGetEmployees');
    dbms_lob.createtemporary(l_data_clob, cache=>FALSE);
    l_data_clob := utl_soap_api.get_return_clob_value(p_response => l_response,
    p_name => '*',
    p_namespace => l_xml_namespace);
    l_data_clob := DBMS_XMLGEN.CONVERT(l_data_clob, 1); --Storing in CLOB converted symbols (<">) into escaped values (&lt;, &qt;, &gt;).  We need to CONVERT them back.
    parser := xmlparser.newParser;
    xmlparser.parseClob(parser, l_data_clob);
    dbms_lob.freetemporary(l_data_clob);
    l_xml_doc := xmlparser.getDocument(parser);
    xmlparser.freeparser(parser);
    l_node_list := xslprocessor.selectNodes(xmldom.makeNode(l_xml_doc),'/employees/employee');
    FOR i_emp IN 0 .. (xmldom.getLength(l_node_list) - 1)
    LOOP
    l_node := xmldom.item(l_node_list, i_emp);
    l_emp_id := dbms_xslprocessor.valueOf(l_node, 'EMPLOYEEID');
    l_emp_first_name := dbms_xslprocessor.valueOf(l_node, 'FIRSTNAME');
    l_emp_last_name := dbms_xslprocessor.valueOf(l_node, 'LASTNAME');
    END LOOP;
    xmldom.freeDocument(l_xml_doc);
    END get_employees;
    All of this works just fine for smaller result sets, or fewer iterations (only the first two or three offices). Even up to the point of failure the data is being extracted correctly - it just eventually runs out of memory. Is there any way to free up the xslprocessor? I've even tried issuing DBMS_SESSION.FREE_UNUSED_USER_MEMORY but it makes no difference.

    Replying to both of you -
    Line 206 is the first call to xslprocessor.valueof:
    LINE TEXT
    206 l_emp_id := dbms_xslprocessor.valueOf(l_node, 'EMPLOYEEID');
    This is one function inside of a larger package (the UTL_INTERFACE_PKG). The package is just a grouping of these functions - one for each type of SOAP interface we're using. None of the others exhibited this problem, but then none of them return anywhere near this much data either.
    Here is the contents of V$TEMPORARY_LOBS immediately after the crash:
    SID CACHE_LOBS NOCACHE_LOBS ABSTRACT_LOBS
    132 0 0 0
    148 19 1 0
    SID 132 is a SYS session and SID 148 is mine.
    I've discovered with further testing that if I comment out all of the xslprocessor.valueof calls except for the first one the code will complete successfully. It executes the valueof call 99,463 times. If I then uncomment one of those additional calls, we double the number of executions to a theoretical 198,926 (which is greater than the 161,500 point where it usually crashes) and it runs out of memory again.

  • Huge memory leaks after upgrading from kernel 2.6.38(?)

    My system began leaking memory some months ago and I've little to no idea what is causing it. The closest hint I can give is that I think these problems started around upgrading from Linux 2.6.38 to 2.6.39 and have continued with 3.0 aswell. Sometimes my whole system freezes due to extensive swapping (HDD usage led stays lit), sometimes it stops after consuming almost all of my 4 GB RAM.
    I think the leak has to come from inside the kernel because all sysmon apps claim no application is eating too much RAM yet the system memory consumption is at 100 % or even using swap. Even after I kill Xorg the memory usage will stay at least at 2.0 GB, when it should be less than half a gig.
    I'd like to guess the blame is on Nouveau, because it was giving me a hell of a time back with Linux 2.6.39. It had a habit of freezing my system when re-enabling suspended compositing (both with Kwin and Mutter). Also video playback was corrupted sometimes. These probs have since been fixed with Linux 3.0.
    I cannot name any spesific app that might trigger this memory leaking. I don't play any games and mainly use Firefox, Chromium and VLC day in, day out.
    There seems to be absolutely no way of reclaiming the reserved memory than rebooting the whole system. I have even tried unloading Nouveau.
    I am currently running the [testing] repo with ~daily upgrades.
    Last edited by Verge (2011-08-16 14:04:09)

    OK, this kind of surprised me. No wonder I couldn't find any relevant stuff while googling for kernel issues. I have had Strigi disabled for some time now because it is miserably broken, but I now disabled the whole Nepomuk too. Let's see if my problem now goes away or what...
    The release of KDE 4.7 Beta 1 actually lines up with the launch of Linux 2.6.39 so this really might be the case. I moved to KDE 4.7 already with the first beta.
    Last edited by Verge (2011-08-16 14:30:37)

  • JBoss EAP 6 On JRockit - Memory Leak

    hello team.
    I have memory leak problem on jboss and jrockit.
    My Environment :
    1. OS :          
    CentOS release 6.4 (Final)
    2. JRockit :     
    java version "1.6.0_45"
         Java(TM) SE Runtime Environment (build 1.6.0_45-b06)
         Oracle JRockit(R) (build R28.2.7-7-155314-1.6.0_45-20130329-0641-linux-x86_64, compiled mode)
    3. Application Server:
    JBoss EAP 6.2.0.GA
    4. Application
    Large EJB Application (100 and more EJB Beans (Stateless, Stateful,  MDB, Timers and so on)
    Everything works fine on older application server versions (4.3 , 4.2)
    But now I have Problem
    Of course I know that problem is new version - and i have discussion on JBoss forums.
    but guys I have question about jrockit with you:
    What is the option "Other" in memory ??
    [jboss@jboss-new bin]$ jrcmd 17114  print_memusage
    17114:
    Total mapped                       8457864KB           (reserved=2983100KB)
    -              Java heap              3145728KB           (reserved=0KB)
    -              GC tables            105232KB         
    -          Thread stacks       46412KB           (#threads=138)
    -          Compiled code       1048576KB           (used=12257KB)
    -               Internal                   1480KB         
    -                     OS       170324KB         
    -                  Other       3639056KB         
    -            Classblocks         10496KB           (malloced=9631KB #28393)
    -        Java class data       289536KB           (malloced=192391KB #133697 in 28393 classes)
    - Native memory tracking     1024KB           (malloced=294KB #10)
    [jboss@jboss-new bin]$
    This size increases every time - and took entire amount of RAM.
    Thank in Advance.
    Regards,
    Paata Lominadze

    Not sure what the 'other' is, but it is probably best shown by using an example. By using displayMap we can display a memory map of various JVM subsystems and libraries that are loaded, including third-party libraries.
    ./jrcmd 4523 print_memusage displayMap
    Total mapped                  3984796KB           (reserved=2978740KB)
    -              Java heap       524288KB           (reserved=0KB)
    -              GC tables        17548KB         
    -          Thread stacks        20276KB           (#threads=39)
    -          Compiled code      1048576KB           (used=14224KB)
    -               Internal         1672KB         
    -                     OS       146924KB         
    -                  Other      2092648KB         
    -            Classblocks         7424KB           (malloced=7381KB #20064)
    -        Java class data       124416KB           (malloced=124411KB #91048 in 20064 classes)
    - Native memory tracking         1024KB           (malloced=118KB #10)
    +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
        OS                          *java    r x 0x0000000000400000.(     76KB)
        OS                          *java    rw  0x0000000000612000.(      4KB)
        OS                        *[heap]    rw  0x00000000007c1000.(    132KB)
       INT                           Poll    r   0x000000007fffe000 (      4KB)
       INT                         Membar    rw  0x000000007ffff000.(      4KB)
       MSP              Classblocks (1/2)    rw  0x00000000df8c0000 (   6912KB)
       MSP              Classblocks (2/2)    rw  0x00000000dff80000 (    512KB)
      HEAP                      Java heap    rw  0x00000000e0000000.( 524288KB)
        OS                    *ld-2.12.so    r x 0x0000003664400000.(    128KB)
        OS                    *ld-2.12.so    r   0x000000366461f000 (      4KB)
        OS                    *ld-2.12.so    rw  0x0000003664620000 (      4KB)
        OS                   **ld-2.12.so    rw  0x0000003664621000.(      4KB)
       OS           *gconv-modules.cache    r   0x00007f8f2e4a0000 (     28KB)
    THREAD                     Stack 4630    rwx 0x00007f8f2e4a7000 (      8KB)
    THREAD                     Stack 4630        0x00007f8f2e4a9000 (     12KB)
    THREAD                     Stack 4630    rwx 0x00007f8f2e4ac000 (    244KB)
       MSP         Java class data (5/37)    rw  0x00007f8f2e4e9000 (  14336KB)
       MSP         Java class data (9/37)    rw  0x00007f8f2fa40000 (   5888KB)
                                             rw  0x00007f8f30000000 (    188KB)
                                                 0x00007f8f3002f000 (  65348KB)
                                             rw  0x00007f8f34000000 (    132KB)
                                                 0x00007f8f34021000 (  65404KB)
                                             rw  0x00007f8f38000000 (    412KB)
                                                 0x00007f8f38067000.(  65124KB)
       MSP        Java class data (10/37)    rw  0x00007f8f3c034000 (  34048KB)
                                             rw  0x00007f8f3e174000 (   8200KB)
       MSP        Java class data (11/37)    rw  0x00007f8f3e976000 (    256KB)
        OS                     *libhpi.so    rw  0x00007f8fb37fc000 (      8KB)
        OS                    **libhpi.so    rw  0x00007f8fb37fe000 (      4KB)
      CODE                  Compiled code    rwx 0x00007f8fb37ff000 (     64KB)
      CODE                  Compiled code    rwx 0x00007f8fb380f000 (    128KB)
      CODE                  Compiled code    rwx 0x00007f8fb382f000 (     64KB)
      MSP        Java class data (37/37)    rw  0x00007f8ff83a1000 (    512KB)
        GC Modified Union Set (committed)    rw  0x00007f8ff8421000 (    132KB)
        GC                     Card table    rw  0x00007f8ff8442000 (   1024KB)
        GC        Object bits (committed)    rw  0x00007f8ff8542000 (   8196KB)
    Here
    - thread is thread related (such as thread stacks)
    - int, internal use (such as pointer pages)
    - heap, chunk used by JRockit for the Java heap
    - os, mapped directly from the operating system, such as third party DLLs or shared objects
    - msp, memory space. a memory space is a native heap with a specific purpose, for example native memory allocation inside the JVM
    - gc, garbage collection related, for example live bits
    - code, compiled code
    The 'other' memory space looks to me (from the blank entries in the above print-out) like they are a memory pages to are still not used. When the JVM starts it mappes an amount of memory. To my knowledge JRockit uses mmap (mmap(2) - Linux manual page), which creates a new mapping in the virtual address space. JRockit reserves an amount of memory (Java Heap (heap where your object instances go) + its own runtime (all the others)).
    To see where the growth is in the various memory spaces, you can use 'print_memusage baseline', after which you can execute print_memusage again, for example,
    ./jrcmd 4523 print_memusage scale=M
    4523:
    Total mapped                     3896MB      +4MB (reserved=2905MB -3MB)
    -              Java heap          512MB           (reserved=0MB)
    -              GC tables           17MB         
    -          Thread stacks           19MB           (#threads=39)
    -          Compiled code         1024MB           (used=14MB +1MB)
    -               Internal            1MB         
    -                     OS          143MB         
    -                  Other         2043MB         
    -            Classblocks            7MB           (malloced=7MB #20596 +532)
    -        Java class data          126MB      +4MB (malloced=125MB +4MB #93640 +2592 in 20596 classes)
    - Native memory tracking            1MB           (malloced=0MB #20 +10)
    Note the additional column that prints out the difference in memory usage in relation to the baseline. You can also monitor native allocations by using trace_alloc_sites, memory allocations can then be displayed with different levels of detail using the level argument.
    ./jrcmd 4523 print_memusage trace_alloc_sites=true
    4523:
    Total mapped                  3989660KB   +4864KB (reserved=2974732KB -4008KB)
    -              Java heap       524288KB           (reserved=0KB)
    -              GC tables        17548KB         
    -          Thread stacks        20276KB           (#threads=39)
    -          Compiled code      1048576KB           (used=15265KB +1040KB)
    -               Internal         1672KB         
    -                     OS       146924KB         
    -                  Other      2092648KB         
    -            Classblocks         7680KB    +256KB (malloced=7669KB +287KB #20596 +532)
    -        Java class data       129024KB   +4608KB (malloced=128967KB +4555KB #93640 +2592 in 20596 classes)
    - Native memory tracking         1024KB           (malloced=236KB +118KB #20 +10)
    ./jrcmd 4523 print_memusage level=3
    4523:
    Total mapped                  3989660KB   +4864KB (reserved=2974732KB -4008KB)
    -              Java heap       524288KB           (reserved=0KB)
    -              GC tables        17548KB         
    -          Thread stacks        20276KB           (#threads=39)
    -          Compiled code      1048576KB           (used=15265KB +1040KB)
    -               Internal         1672KB         
    -                     OS       146924KB         
    -                  Other      2092648KB         
    -            Classblocks         7680KB    +256KB (malloced=2KB -7379KB #4 -20060) Not fully traced
    -        Java class data       129024KB   +4608KB (malloced=26KB -124385KB #16 -91032 in 20596 classes) Not fully traced.
    - Native memory tracking         1024KB           (malloced=118KB #10) Not fully traced.
         gather_memorymap_database                     memtrace.c: 206         91KB     +91KB (#1 +1)
               gather_memory_usage                  osal_mspace.c:5142          7KB      +7KB (#4 +4)
      msGatherMSpacesUsageDatabase                  osal_mspace.c:6128          2KB      +2KB (#1 +1)
      msGatherMSpacesUsageDatabase                  osal_mspace.c:6134         16KB     +16KB (#1 +1)
    Note this is more on the JVM level, in your case in might be beneficial to investigate what is happening on the java heap. By using print_object_summary you can get insight how memory on the heap is used on a per-class basis. To get to the bottom of where the memory leak is you can use the memory-leak-detector (an example of its use can be found here Middleware Snippets: Fast, Faster, JRockit). You can also obtain a heapdump that can be analyzed by using for example MAT (see for an example here Middleware Snippets: Visualizing Class Loading). To obtain a heapdump you can run the command, for example,
    [weblogic@machine1 bin]$ ./jrcmd 4523 runsystemgc full=true fullcompact=true
    4523:
    [weblogic@machine1 bin]$ ./jrcmd 4523 hprofdump filename=/home/weblogic/dump.hprof
    4523:
    Wrote dump to /home/weblogic/dump.hprof
    Note that this first issues a full GC by using the runsystemgc command.

  • Memory Leak Issue in OBIEE 11g

    Hi,
    We have OBIEE 11.1.1.5 installed on a 32-bit Windows Server. We had almost 10GB of free space yesterday, but after a few users logged in, the free space started coming down until we were left with no space at all.
    Since then we have removed all the files that we could and created more and more space, but OBIEE seems to be eating it all up. I have seen a few posts for such issues with the Linux Systems. Has anyone faced this with windows? Also, is there any solution for this.
    Thanks,
    Naman

    Hi Naman,
    Oracle has provided set of patches to avoid memory leaks.
    1) For memory leak with OPMN, apply the following patches:
    Patch:12920592: OPMN HAS MEMORY LEAK
    Patch:12989751: OPMN MEMORY STILL GAINS AFTER APPLYING PATCH#12920592
    2) For the Presentation Server (sawserver) issue, apply the patch:
    Patch:13102881: DATALAYOUT METADATA IMPLEMENTATION HEAP INTENSIVE
    Rgds,
    Dpka

  • HTTPService + XML Load + Memory Leak

    Hi all....
    I have noticed a memory leak in my application. This leak was
    not apparent when the application was completed some months back
    which is what left me a little confused as all I have done since
    was upgrade to Flex 3 and possibly updated / changed my Flash
    player.
    I think I have found the cause to this problem (below) but am
    not 100% sure that it is the "actual" problem or any reasons to
    back my thoughts up, so have listed what I have checked / tried
    along the way (maybe I have missed something)....
    My Discovery Process:
    I started profiling my application but did not find anything
    out of the ordinary. I did a code walk-through double checking I
    had cleaned up after myself, removing and even nulling all items
    etc but still to now success - the leak is still there.
    I have profiled the app in the profiler for reasonably long
    periods of time.
    All the classes etc being used within the app are consistent
    in size and instance amount and there is no sign of any apparent
    leak.
    I am using a HTTPService that is loading XML data which I am
    refreshing every 5 seconds. On this 5 second data refresh some
    class instances are incremented but are restored to the expected
    amount after a GC has occurred. The GC seems to take longer, the
    longer the app is running, therefore more and more instances are
    being added to the app, but when the GC eventually runs it "seems"
    to clear these instances to the expected amount.
    After scratching my head for a while I decided to make a copy
    of my application, rip everything out, and focus in my data load,
    where I found a problem!
    I have now just a HTTPService that loads an XML file every 5
    seconds, and this is all I currently have in the app (as I ripped
    the rest of the code out), e.g:
    Code:
    <mx:Application xmlns:mx="
    http://www.adobe.com/2006/mxml"
    ....... creationComplete="initApp()" >
    <mx:HTTPService
    id="httpServiceResults"
    url="
    http://myIP:myPort/myRoot/myXML.cfm"
    resultFormat="e4x"
    result="httpResultHandler(event)" />
    <script....... >
    private var timerPulse:Timer;
    private function initApp():void
    httpServiceResults.send();
    timerPulse = new Timer(5000, 0);
    private function httpResultHandler(event:ResultEvent):void
    timerPulse.start();
    timerPulse.addEventListener(TimerEvent.TIMER, timerRefresh);
    public function timerRefresh(eventObj:TimerEvent):void
    timerPulse.stop();
    timerPulse.removeEventListener(TimerEvent.TIMER,
    timerRefresh);
    timerPulse.reset();
    httpServiceResults.send();
    </script>
    </mx:Application>
    This is pretty much the code I am currently using and it
    leaks.
    I ran and monitored this in both the profiler and the
    activity / task manager, and after running the app for 1800 seconds
    (30 min) in the profiler, the memory size grew from 50mg to 165mg
    just sending the HTTPService.
    I tried loading the service in multiple ways including in AS
    rather than MXML creating new instances of it each time, resetting
    it, nulling it etc... but nothing prevented this memory increase.
    I then tried to load the XML using different methods such as
    using the URLRequest and URLLoader which again caused a memory
    leak.
    What still confuses me is that this leak did not exist in the
    previous version and not a great deal has changed since then apart
    from upgrading to Flex 3 and possibly upgrading my Flash payer
    (which I believe is a possible cause)
    After looking into this issue a bit more deeply, I read a few
    blogs / forums and other people are experiencing the same problems
    - even with a lot bigger leaks in some cases all when reloading
    large sets of XML data into Flex - however, I as of yet found no
    solution to this leak - people with a similar problem believe it is
    not due to a memory leak more a GC error, and others pointing
    towards the Flash Player itself that is leaking - I don't really
    know.
    Findings so far during investigation of this issue:
    * App leaks for both HTTPService and ULRRequest / URLLoader
    methods
    * App only leaks when calling a data loader
    * The size of the leak seems to depend on the size of the
    XML being loaded
    * The size of the leak also seems to be affected by the
    applications heaviness - the greater seems to enhance the leak
    An interesting factor I have noticed is that if I copy the
    XML from my "myXML.cfm" that I link to in my HTTPService and copy
    the contents of the file into my own XML file stored within the
    Flex project root itself: ""myXML.xml"" the leak disappears... like
    it seems to link when loading the XML over a network, however as my
    network knowledge is not great I am not sure what to make of this -
    any ideas???
    Could the connection to the XML document cause leaks??? is
    there anything else that could cause this leak??? have I something
    in my code sample that could cause this leak??? or could any of the
    other things I have mentioed cause this leak???
    Any help / ideas would be greatly appreciated.
    Thanks,
    Jon.

    I also observed heavy memory leak from using httpservice with
    XML data. I am using Flex3 builder under Linux. My Flex application
    polls httpservice every 10 seconds. The reply is a short XML
    message less than 100 bytes. This simple polling will consume 30+
    MB of memory every hour. I leave it idling for several hours and it
    took 200 MB of memory. No sign of garbage collection at all.

Maybe you are looking for