1. Get rid of all advertisements and get unlimited access to documents by upgrading to Premium Membership. Upgrade to Premium Now and also get a Premium Badge!

Memory leak in 10.2.0.3 OCI client on solaris

Discussion in 'General' started by vips4life, Jan 21, 2009.

  1. vips4life

    vips4life Active Member

    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    55
    Hi,

    We are using OCI client libraries to connect our C++ program to the Oracle Database. The program does a lot of selects, inserts and SP calls.
    Oracle client and Oracle server both are 10.2.0.3.

    We have been observing a memory leak of 4M bytes in the C++ program every few minutes since last few days. On debugging through Purify, libumem, and Sun Studio 12, we finally managed to narrow down the problem to the Oracle client library OCI calls.

    The Sun Studio leak check shows the following -
    Leak #37, Instances = 157, Bytes Leaked = 655004
    kpummapg + 0x00000098
    kghgex + 0x00000648
    kghfnd + 0x000005BC
    kghalo + 0x00000A6C
    kghgex + 0x000003BC
    kghfnd + 0x000005BC
    kghalo + 0x00000A6C
    kghgex + 0x000003BC
    kghfnd + 0x000005BC
    kghalo + 0x00000A6C
    kpuhhalo + 0x00000558
    kpugdesc + 0x00000AD4
    kpugparm + 0x00000374
    COCIResultSet::InterpretData() + 0x000001B4
    COCIResultSet::COCIResultSet(COCIStatement*,OCIStmt*,OCIError*) + 0x000000A4
    COCIStatement::prepareResult() + 0x00000190


    A select is executed, a resultset is fetched and the resultset is immeidately closed. The same piece of code has been running at various production systems without any problems. Most of the other sites are either 10.2.0.4 or 9i.

    On searching Metalink and various other forums, I found similar issues faced in 10.2.0.1.

    Could someone advise if there are any bugs corresponding to this which have been closed. Would upgrading to 10.2.0.4 solve the problem?

    Thanks.
     
  2. tyro

    tyro Forum Genius

    Messages:
    368
    Likes Received:
    20
    Trophy Points:
    260
    Location:
    India
    Hi, from what information you have given, it's not possible to make any conclusions. You can have a look at metalink Note 401436.1 for some information.

    Besides you can also consider using Valgrind tools for to automatically detect many memory management and threading bugs, and profile your programs in detail.
     
  3. vips4life

    vips4life Active Member

    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    55
    Thanks for the response Tyro.

    Valgrind only supports Linux, but as I mentioned our application is on Solaris and the problem has also been observed on Solaris.
    The Sun Studio leak analysis seems to indicate that some memory is leaked even when the resultset created is closed.

    Please let me know if there is any more information required to come to a conclusion. I can provide additional information or do additional checks if required.
     
  4. tyro

    tyro Forum Genius

    Messages:
    368
    Likes Received:
    20
    Trophy Points:
    260
    Location:
    India
    Hi, sorry about tat, i didn't notice u were mentioning solaris. Memory leaks as you would have discovered are extremely difficult to debug. People usually take the SR way, but tat might take too much time. I can only provide a few suggestions
    That is interesting,

    Please check the following in all machines.

    1. Check the 'ulimit -a' in all machines.
    2. Is the code compiled natively in all machines or compiled in one and copied to all ? If yes compile natively and try.
    3. What is compiler version you are using ? Is it SUN Studio ?
    4. What is the version solaris all machines?

    compiling the code natively in all machine may throw more clues. In the end if all fails, there is little option other than asking oracle.
     
  5. Naina

    Naina Guest

    Hi,

    I am facing a similar memory leak in my C++ program using OCCI.
    I have oracle version - 10.2.0.1.0.
    Did anybody find a solution to this problem ? Or, If somebody contacted Oracle about this ?

    Thanks,
    Naina