Memory Leak in OCCI library
Hi,
I am using OCCI library and oracle XE. There is noticeable amount memory leak in CreateEnvironment and CreateConneaction API funtions. I am not sure whether it is known problem. If the oracle server is down my application has to retry several times using these above mentioned methods and memory grows significantly.
Here is a simple program which creates environment and create connection and terminates immediately in a while loop. We see huge memory leak.
I have downloaded occi_gcc343,
Here is sample program which i tried.
#include <iostream>
#include <occi.h>
using namespace oracle::occi;
using namespace std;
int main(int argc, char* argv[])
Environment *env = NULL;
Connection *conn = NULL;
while(1)
Environment *env = Environment::createEnvironment(Environment::DEFAULT);
Connection *conn = env->createConnection ("cvo","cvo123","XE");
sleep(3);
env->terminateConnection (conn);
Environment::terminateEnvironment(env);
getchar();
return 0;
Please let me know if there is any patch available or is there anyway overcome from this problem.
Thanks,
Can't really speak about the memory leak issue that you suspect with the library, but do note that that you do not need to terminate the environment in a reconnect loop. terminateEnvironment is meant to be called at program exit, not disconnect. This may help with the memory issue somewhat.
Similar Messages
-
Hi ,
I am working in Solaris 9 x86, with Oracle installed on it.I am getting memory leaks reported in occi library.
Machine Details:
Hostname: ALEXANDER
Hostid: 2ed11ae9
Release: 5.9
Kernel architecture: i86pc
Application architecture: i386
Hardware provider:
Domain:
Kernel version: SunOS 5.9 Generic 112234-10 Nov 2003
Database Version :
Oracle Database 10g Enterprise Edition Release 10.1.0.3.0 - Production
With the Partitioning, OLAP and Data Mining options
Compiler Version:
CC: Sun C++ 5.5 Patch 113819-09 2004/08/03.
Compiler arguments:
CC -w -g Main.cpp -I$ORACLE_INCLUDE -o Main -lclntsh -locci
I started with the demo apps for occi that comes with Oracle.
After running the executables and checking with the bcheck utility I receive the errors due to memory leak.
bcheck -all ./Main
Actual leaks report (actual leaks: 2 total size: 43 bytes)
<rtc> Memory Leak (mel):
Found leaked block of size 31 bytes at address 0x812d6f8
At time of allocation, the call stack was:
[1] operator new() at 0xd7906718
[2] operator new[]() at 0xd7905ab8
[3] oracle::occi::StatementImpl::do_setSQL() at 0xda13e681
[4] oracle::occi::StatementImpl::StatementImpl() at 0xda13e1bf
[5] oracle::occi::ConnectionImpl::createStatement() at 0xda136863
[6] occidml::executeSelectStatement() at line 46 in "Main.h"
[7] main() at line 12 in "Main.cpp"
<rtc> Memory Leak (mel):
Found leaked block of size 12 bytes at address 0x8084c40
At time of allocation, the call stack was:
[1] operator new() at 0xd7906718
[2] std::vector<OCIParam*,std::allocator<OCIParam*> >::__insert_aux() at 0xda145c19
[3] std::vector<OCIParam*,std::allocator<OCIParam*> >::resize() at 0xda145443
[4] oracle::occi::StatementImpl::initParamVec() at 0xda144e70
[5] oracle::occi::ResultSetImpl::next() at 0xda146404
[6] main() at line 15 in "Main.cpp"
If any body needs more info , pls send me your email address so that I can send my source files.can you post this in the OCCI forum?
-
these are the chunks from the file I made through valgrind a memory check software.
these are the kind of leak or error you could say; that were reported by the software or a library to check memory leaks if u want i could send you the whole file please help
==22982== Memcheck, a memory error detector for x86-linux.
==22982== Copyright (C) 2002-2004, and GNU GPL'd, by Julian Seward et al.
==22982== Using valgrind-2.2.0, a program supervision framework for x86-linux.
==22982== Copyright (C) 2000-2004, and GNU GPL'd, by Julian Seward et al.
==22982== For more details, rerun with: -v
==22982==
==22982== Syscall param times(buf) contains unaddressable byte(s)
==22982== at 0x1E4522: times (in /lib/tls/libc-2.3.4.so)
==22982== by 0x1BF22146: kghinp (in /usr/app/oracle/oracle/product/10.2.0/db_1/lib/libclntsh.so.10.1)
==22982== by 0x1BB6FBA6: kpuinit0 (in /usr/app/oracle/oracle/product/10.2.0/db_1/lib/libclntsh.so.10.1)
==22982== by 0x1BB6EED9: kpuenvcr (in /usr/app/oracle/oracle/product/10.2.0/db_1/lib/libclntsh.so.10.1)
==22982== Address 0x0 is not stack'd, malloc'd or (recently) free'd
==22982==
==22982== Invalid read of size 16
==22982== at 0x1C8E9B18: (within /usr/app/oracle/oracle/product/10.2.0/db_1/lib/libnnz10.so)
==22982== Address 0x1CA35F60 is 112 bytes inside a block of size 127 alloc'd
==22982== at 0x1B904984: malloc (vg_replace_malloc.c:131)
==22982== by 0x1BE1E6B5: nlpainzert (in /usr/app/oracle/oracle/product/10.2.0/db_1/lib/libclntsh.so.10.1)
==22982== by 0x1BE1D3B7: nlpaparse (in /usr/app/oracle/oracle/product/10.2.0/db_1/lib/libclntsh.so.10.1)
==22982== by 0x1BE1E513: nlpardfile (in /usr/app/oracle/oracle/product/10.2.0/db_1/lib/libclntsh.so.10.1)
==22982==
==22982== Use of uninitialised value of size 16
==22982== at 0x1C8E988E: (within /usr/app/oracle/oracle/product/10.2.0/db_1/lib/libnnz10.so)
==22982== by 0x1BDC2593: ztchn (in /usr/app/oracle/oracle/product/10.2.0/db_1/lib/libclntsh.so.10.1)
==22982== by 0x1BDC24C1: ztch (in /usr/app/oracle/oracle/product/10.2.0/db_1/lib/libclntsh.so.10.1)
==22982== by 0x1BDC57D5: ztcrsgstk (in /usr/app/oracle/oracle/product/10.2.0/db_1/lib/libclntsh.so.10.1)
==22982==
==22982== Use of uninitialised value of size 4
==22982== at 0x1BD79DA0: ztced_einit (in /usr/app/oracle/oracle/product/10.2.0/db_1/lib/libclntsh.so.10.1)
==22982== by 0x1BD79EC5: ztcedgks (in /usr/app/oracle/oracle/product/10.2.0/db_1/lib/libclntsh.so.10.1)
==22982== by 0x1BD79497: ztcedi (in /usr/app/oracle/oracle/product/10.2.0/db_1/lib/libclntsh.so.10.1)
==22982== by 0x1BD785F7: ztcebi (in /usr/app/oracle/oracle/product/10.2.0/db_1/lib/libclntsh.so.10.1)
==22982==
==22982== Conditional jump or move depends on uninitialised value(s)
==22982== at 0x1C83BE39: CMP_OctetStringToCMPInt (in /usr/app/oracle/oracle/product/10.2.0/db_1/lib/libnnz10.so)
==22982== by 0x1C82E155: Alg_ComputeModQ_GHash (in /usr/app/oracle/oracle/product/10.2.0/db_1/lib/libnnz10.so)
==22982== by 0x1C837582: A_X931RandomGenerateBytes (in /usr/app/oracle/oracle/product/10.2.0/db_1/lib/libnnz10.so)
==22982== by 0x1BDC4DF9: ztcr2rnd (in /usr/app/oracle/oracle/product/10.2.0/db_1/lib/libclntsh.so.10.1)
==22982==
==22982== Conditional jump or move depends on uninitialised value(s)
==22982== at 0x1BEE0BDF: kzsrepw (in /usr/app/oracle/oracle/product/10.2.0/db_1/lib/libclntsh.so.10.1)
==22982== by 0x1BBB38B5: kpu8lgn (in /usr/app/oracle/oracle/product/10.2.0/db_1/lib/libclntsh.so.10.1)
==22982== by 0x1BBADA00: kpuauthxa (in /usr/app/oracle/oracle/product/10.2.0/db_1/lib/libclntsh.so.10.1)
==22982== by 0x1BBAD53E: kpuauth (in /usr/app/oracle/oracle/product/10.2.0/db_1/lib/libclntsh.so.10.1)
==22982==
==22982== Use of uninitialised value of size 4
==22982== at 0x1BD7A382: ztceai (in /usr/app/oracle/oracle/product/10.2.0/db_1/lib/libclntsh.so.10.1)
==22982== by 0x1BD785F7: ztcebi (in /usr/app/oracle/oracle/product/10.2.0/db_1/lib/libclntsh.so.10.1)
==22982== by 0x1BD77EC5: ztcei (in /usr/app/oracle/oracle/product/10.2.0/db_1/lib/libclntsh.so.10.1)
==22982== by 0x1BDC65B1: ztvo5pe (in /usr/app/oracle/oracle/product/10.2.0/db_1/lib/libclntsh.so.10.1)
==22982== by 0x1BD77F64: ztcen (in /usr/app/oracle/oracle/product/10.2.0/db_1/lib/libclntsh.so.10.1)
==22982==
==22982== Conditional jump or move depends on uninitialised value(s)
==22982== at 0x1BD79022: ztceb_unpadding (in /usr/app/oracle/oracle/product/10.2.0/db_1/lib/libclntsh.so.10.1)
==22982== by 0x1BD788D4: ztcebf (in /usr/app/oracle/oracle/product/10.2.0/db_1/lib/libclntsh.so.10.1)
==22982== by 0x1BD78010: ztcef (in /usr/app/oracle/oracle/product/10.2.0/db_1/lib/libclntsh.so.10.1)
==22982== by 0x1BD77D07: ztcedec (in /usr/app/oracle/oracle/product/10.2.0/db_1/lib/libclntsh.so.10.1)
==22982==
==22982== Mismatched free() / delete / delete []
==22982== at 0x1B905043: operator delete(void*) (vg_replace_malloc.c:156)
==22982== by 0x1B95C23C: oracle::occi::ConnectionImpl::~ConnectionImpl() (in /usr/app/oracle/oracle/product/10.2.0/db_1/lib/libocci.so.10.1)
==22982== by 0x1B95A094: oracle::occi::EnvironmentImpl::terminateConnection(oracle::occi::Connection*) (in /usr/app/oracle/oracle/product/10.2.0/db_1/lib/libocci.so.10.1)
==22982== by 0x8050DE4: DBConnection::CloseEnv(DBError*) (in /home/jaka/IRIS/EXE/test.exe)
==22982== Address 0x1CA59618 is 0 bytes inside a block of size 5 alloc'd
==22982== at 0x1B904D39: operator new[](unsigned) (vg_replace_malloc.c:139)
==22982== by 0x1B95A86E: oracle::occi::ConnectionImpl::setUserName(void*, unsigned, bool) (in /usr/app/oracle/oracle/product/10.2.0/db_1/lib/libocci.so.10.1)
==22982== by 0x1B95B14D: oracle::occi::ConnectionImpl::openConnection(OCIEnv*, OCIError*, void*, unsigned, void*, unsigned, void*, unsigned, void*, unsigned, unsigned) (in /usr/app/oracle/oracle/product/10.2.0/db_1/lib/libocci.so.10.1)
==22982== by 0x1B95EFB5: oracle::occi::ConnectionImpl::ConnectionImpl(oracle::occi::EnvironmentImpl*, std::string const&, std::string const&, std::string const&) (in /usr/app/oracle/oracle/product/10.2.0/db_1/lib/libocci.so.10.1)
==22982==
==22982== ERROR SUMMARY: 1524 errors from 165 contexts (suppressed: 27 from 2)
==22982== malloc/free: in use at exit: 960761 bytes in 309 blocks.
==22982== malloc/free: 2699 allocs, 2390 frees, 1313176 bytes allocated.
==22982== For counts of detected errors, rerun with: -v
==22982== searching for pointers to 309 not-freed blocks.
==22982== checked 20880568 bytes.
==22982==
==22982== LEAK SUMMARY:
==22982== definitely lost: 0 bytes in 0 blocks.
==22982== possibly lost: 0 bytes in 0 blocks.
==22982== still reachable: 960561 bytes in 308 blocks.
==22982== suppressed: 200 bytes in 1 blocks.
==22982== Reachable blocks (those to which a pointer was found) are not shown.
==22982== To see them, rerun with: --show-reachable=yes
now if any body can help me removing this memory leak or is this the problem of OCCI
apparently it seems to be OCCI's library issue but i could be wrong please help
hoping to see a response
Message was edited by:
kjaka=============================================
#include <iostream>
#include <string>
#include <vector>
#include <occi.h>
using namespace std;
using namespace oracle::occi;
int main()
Environment* env;
env = Environment::createEnvironment(Environment::OBJECT);
cout << "Enviorment created " << endl;
Connection* conn;
Statement *stmt;
ResultSet *rs;
vector<MetaData> vMD;
vector<MetaData> vArgMD;
int dataType;
char tmpChar[1024];
Statement::Status status;
try
conn = env->createConnection("iris","tpstps", "iris10gr1");
cout << "connection created " << endl;
stmt = conn->createStatement();
string sStmt = "begin :1 := PKGNETWORK.spGetNetworkInfoByIP(:2, :3); end;";
// 1st sp
stmt->setSQL(sStmt);
stmt->registerOutParam(1, OCCIINT);
stmt->setString(2,"192.168.6.12");
stmt->setMaxParamSize(2,20);
stmt->registerOutParam(3,OCCICURSOR);
status = stmt->execute();
int retVal = stmt->getInt(1);
rs = stmt->getCursor(3);//use ResultSet to fetch rows
vMD = rs->getColumnListMetaData();
dataType = vMD[0].getInt(MetaData::ATTR_DATA_TYPE);
cout << "Attribute count : " << vMD[0].getAttributeCount() << endl;
dataType=vMD[0].getInt(MetaData::ATTR_DATA_TYPE);
cout << "Attribute type : " << dataType << endl;
cout << "Attribute name : " << vMD[0].getString(MetaData::ATTR_NAME)<< endl;
cout << "Size : " << vMD.size() << endl;
while (rs->next())
cout << "next row";
cout << "NetID : " << rs->getString(1).c_str() << endl;
cout << " vector filled for SP1" << endl;
cin >> tmpChar;
vMD.clear();
stmt->closeResultSet(rs);
conn->terminateStatement(stmt);
cout << "1st sp executed" << endl;
// 2nd sp
string sStmt1 = "begin :1 := PKGJUNK.SpGetTblAccount(:2); end;";
stmt = conn->createStatement();
stmt->setSQL(sStmt1);
stmt->registerOutParam(1, OCCIINT);
stmt->registerOutParam(2,OCCICURSOR);
status = stmt->execute();
retVal = stmt->getInt(1);
rs = stmt->getCursor(2);//use ResultSet to fetch rows
int loop = 1;
vMD = rs->getColumnListMetaData();
dataType = vMD[0].getInt(MetaData::ATTR_DATA_TYPE);
cout << "Attribute count : " << vMD[0].getAttributeCount() << endl;
dataType=vMD[0].getInt(MetaData::ATTR_DATA_TYPE);
cout << "Attribute type : " << dataType << endl;
cout << "Attribute name : " << vMD[0].getString(MetaData::ATTR_NAME)<< endl;
cout << "Size : " << vMD.size() << endl;
while (rs->next())
cout << "next row";
cout << "NetID : " << rs->getString(1).c_str() << endl;
stmt->closeResultSet(rs);
cout << "2nd sp executed" << endl;
conn->terminateStatement(stmt);
// sp-3
string sStmt2 = "begin :1 := PKGONELINK.spValidateAccount(:2,:3,:4,:5,:6); end;";
stmt = conn->createStatement();
stmt->setSQL(sStmt2);
stmt->registerOutParam(1, OCCIINT);
stmt->setString(2,"37863 ");
stmt->setMaxParamSize(2,100);
stmt->registerOutParam(3,OCCISTRING, 20);
stmt->registerOutParam(4,OCCISTRING, 2);
stmt->registerOutParam(5,OCCISTRING, 3);
stmt->registerOutParam(6,OCCISTRING, 3);
status = stmt->execute();
cout << "3rd sp executed" << endl;
conn->terminateStatement(stmt);
conn->flushCache();
env->terminateConnection(conn);
vMD.clear();
cout << "Demo completed...data deleted" << endl;
cin >> tmpChar;
catch (SQLException &ex)
{//cleanup
cout << "Error, cleaning up..." << ex.getMessage() << endl;
conn->terminateStatement(stmt);
env->terminateConnection(conn);
cout << "terminating env" << endl;
Environment::terminateEnvironment(env);
// throw;//will be caught by outer handler
Environment::terminateEnvironment(env);
return 0;
===================================================
this is not the same program but still this program gives the same amount of memory leak, this memory leak is reported in each program that uses OCCI
this program was made with the help of the sample program posted at the OTN website
"Calling PLSQL functions/procedures";
hoping for a reply soon -
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 -
Is there a memory leak in IXML library?
Hi,
I wonder if there is a memory leak in the IXML library. Using the memory inspector I observed that memory consumed while building a DOM-tree is never released. Is there some special cleanup method I have to call to free all memory consumed by my DOM tree? I tried to explicitly remove the node to free memory, but that seems not to work (look at my example report below).
Regards,
Michael
REPORT Z_IXML_TEST .
data:
lr_ixml type ref to if_ixml,
lr_dom type ref to if_ixml_document,
lr_element type ref to if_ixml_element,
l_rc type i.
class cl_ixml definition load.
lr_ixml = cl_ixml=>create( type = 0 ).
lr_dom = lr_ixml->create_document( ).
at this point you see 1 string in Memory Inspector after creating a snapshot
lr_element = lr_dom->create_element( name = 'root' ).
call method lr_element->set_attribute( name = 'attrName1' value = 'attrValue1' ).
call method lr_element->set_value( value = 'value1' ).
call method lr_dom->append_child( new_child = lr_element ).
at this point you see 5 strings in Memory Inspector after creating a snapshot
l_rc = lr_dom->remove_child( old_child = lr_element ).
lr_element->remove_node( ).
lr_dom->remove_node( ).
free lr_element.
free lr_dom.
free lr_ixml.
at the latest at this point you would expect 1 string again, but there are still 5!Answer in
SAP Note 1081257 Memory leak in the iXML library -
Client-side Memory leak while executing PL/SQL and reading from a view
Iam noticing memory leaks in OCCI while performing the following:
Sample function()
1. Obtain a connection
2. Create a statement to execute a PL/SQL procedure
3 Execute the statement created in step #2
4. Terminate the statement created in step #2
5. Create a statement to read from a view which was populated
by executing stored procedure in step #3
6. Execute the statement created in step #5
7. Terminate the statement created in step #5
8. Release the connection
The PL/SQL populates a view with fixed 65,000 records for every execution. PL/SQL opens a cursor, loads 65000 records and populates the target view and closes the cursor at the end. If i invoke the above function it results in memory leak of 4M for every call. I tried several variants such as:
1. Disabling statement caching
2. Using setSQL instead of newly creating second SQL statement
3. Obtaining two separate connections for these two activities (PL/SQL exec and View read)
4. Breaking the sample function into two, one for each of these activities (PL/SQL exec and View read).
All the combinations results in the same behaviour of 4M memory leak.
Iam using Oracle 10g Client/Server 10.2.0.1.0.
Is there any known limitations in this area?Yes. Iam closing the result set and terminating the statement.
My program contains layers of inhouse wrapper classes, which will take some time for
me to present it in pure OCCI calls, to be posted here for your understanding.
After some more debugging, i found that if the connection level statement caching is set to
0, the memory leak is much lower than before.
Thanks.
Message was edited by:
user498920 -
Memory leak using 10.2.0.3 OCCI client on Solaris 10
Hi,
We are using OCCI 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 on Solaris 10.
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.Please ... one post and one post only in the group most appropriate to your inquiry. Please open an SR at metalink.
-
Our application is in C++ which interfaces with Oracle 10g database using OCCI. The mapping objects are created using OTT. The type of these mappisng objects in PersistentObject. Our development machine(Solaris 8) and database machine are different. So we have installed the "instantclient-basiclite-solaris6432-10.2.0.3-20070101.zip" to use OTT and OCCI on development machine. We are running purify in our application, Purify is reporting memory leaks on these OTT generated POObjects (type used is transient Objects), despite the fact that we are deleting these objects appropriately. .
Since OTT generated code uses the STL data structures vector list etc.
STL are not standard across platforms and hence you can ignore these warnings. -
ITunes 11 Memory leak when search box is clicked, large library
Mac pro running 10.7 8-core 14gb ram, itunes library on a striped array
scrolling performance is a huge improvement but the app hangs when the search bock is clicked on
and it goes into a massive memory leak, see attached screen grab
works fine in mountain lion with a smaller library, so I assume its choking on my 140,000 tunes ?I have the same problem. iTunes will eat up 80gb of space if I leave it running; eventually I have to force quit it, and slowly after that the hard drive space returns.
I wasn't sure if it was choking on the search tool, but I have a fairly large library also, so it would make sense.
Anyone got any good fixes for this? -
Memory Leaks Unresponsive Mouse
2009 8 core Mac Pro w/ 24 GB of RAM, ATI Radeon 4870, and a SeriTek PCIe eSATA card (card only has drives connected when running a manual drive clone). When running Toast 10 or Parallels 9, my RAM will fill up (I use a program called Menu Meters to monitor stuff). This machine worked just fine under OS 10.9 and earlier - no issues like this at all. ClamXAV will also completely fill the RAM up (the meter will be full green, instead of part green, then mostly grey when Toast or Parallels fills it up). I have to use Terminal to purge it so that the machine is usable.
The other thing that happens is that sometimes when the computer wakes up or I am in the middle of doing something, the mouse will still move, but the dock will not pop open and the left button the mouse doesn't respond. The right button will open the right click menu, but will not respond normally at all. I have tried a different Magic Mouse, but the problem is the same.
I thought that it may be a problem with the factory RAM and the Kingston RAM not playing nicely together. So I ran it with just the factory 8 GB and then ran it with the Kingston 16 GB - the problem persists no matter which RAM is installed. All of the RAM also passes the memory tests in Rember and TechTool.
So, I need to find out if someone thinks that maybe the bluetooth module may be going bad causing the mouse issues. I also need to find out what is causing the memory leaks. I followed the steps that someone gave on this site to boot into safe mode, repair permissions, reset PRAM, then reset SMC (or the other way around - I did it like they said to). It did nothing to fix the problem.
I need some guidance here. As I stated early on, the machine worked perfectly with OS 10.9. I have WAY too much software that I use, so doing a completely fresh install is out of the question - I don't have time to reload everything. This problem is annoying and I know that I am not the only one having these issues. Any input will be greatly appreciated. Thanks in advance.Here is the EtreCheck report:
Problem description:
Memory leaks when using Toast 10 or Parallels 9. Mouse also become unresponsive (it will move, but left button does not work and dock will not pop open - mouse problem happens independent of the RAM being filled up - different mouse was tried with same result).
EtreCheck version: 2.1.5 (108)
Report generated January 9, 2015 at 9:20:59 PM MST
Click the [Support] links for help with non-Apple products.
Click the [Details] links for more information about that line.
Click the [Adware] links for help removing adware.
Hardware Information: ℹ️
Mac Pro (Early 2009) (Verified)
Mac Pro - model: MacPro4,1
2 2.26 GHz Quad-Core Intel Xeon CPU: 8-core
24 GB RAM Upgradeable
DIMM 1
4 GB DDR3 ECC 1066 MHz ok
DIMM 2
4 GB DDR3 ECC 1066 MHz ok
DIMM 3
2 GB DDR3 ECC 1066 MHz ok
DIMM 4
2 GB DDR3 ECC 1066 MHz ok
DIMM 5
4 GB DDR3 ECC 1066 MHz ok
DIMM 6
4 GB DDR3 ECC 1066 MHz ok
DIMM 7
2 GB DDR3 ECC 1066 MHz ok
DIMM 8
2 GB DDR3 ECC 1066 MHz ok
Bluetooth: Old - Handoff/Airdrop2 not supported
Wireless: en2: 802.11 a/b/g/n
Video Information: ℹ️
ATI Radeon HD 4870 - VRAM: 512 MB
AL2216W 1680 x 1050 @ 60 Hz
System Software: ℹ️
OS X 10.10.1 (14B25) - Uptime: 2:4:35
Disk Information: ℹ️
HL-DT-ST BD-RE WH12LS39
HL-DT-ST DVDRAM GH24NS90
SAMSUNG HD103SJ disk1 : (1 TB)
EFI (disk1s1) <not mounted> : 210 MB
OS 10.10.1 (disk1s2) / : 999.35 GB (410.30 GB free)
Recovery HD (disk1s3) <not mounted> [Recovery]: 650 MB
SAMSUNG HD103SJ disk2 : (1 TB)
EFI (disk2s1) <not mounted> : 210 MB
Extra Storage (disk2s2) /Volumes/Extra Storage : 999.86 GB (554.20 GB free)
SAMSUNG HD103SJ disk3 : (1 TB)
EFI (disk3s1) <not mounted> : 210 MB
Extra Storage 2 - Scratch (disk3s2) /Volumes/Extra Storage 2 - Scratch : 999.86 GB (39.54 GB free)
WDC WD5001AALS-00LWTA0 disk0 : (500.11 GB)
EFI (disk0s1) <not mounted> : 210 MB
BOOTCAMP (disk0s2) /Volumes/BOOTCAMP : 499.90 GB (275.71 GB free)
USB Information: ℹ️
Shuttle Technology Inc. E-USB Bridge
Sony C6606
Apple, Inc. Keyboard Hub
Apple Inc. Apple Keyboard
Apple Inc. BRCM2046 Hub
Apple Inc. Bluetooth USB Host Controller
Firewire Information: ℹ️
Apple Computer, Inc. iSight 200mbit - 400mbit max
Gatekeeper: ℹ️
Anywhere
Kernel Extensions: ℹ️
/Applications/Hotspot Shield.app
[not loaded] com.anchorfree.tun (1.0) [Support]
/Applications/Parallels Desktop.app
[not loaded] com.parallels.kext.hidhook (9.0 24251.1052177) [Support]
[not loaded] com.parallels.kext.hypervisor (9.0 24251.1052177) [Support]
[not loaded] com.parallels.kext.netbridge (9.0 24251.1052177) [Support]
[not loaded] com.parallels.kext.usbconnect (9.0 24251.1052177) [Support]
[not loaded] com.parallels.kext.vnic (9.0 24251.1052177) [Support]
/Applications/TechTool Deluxe.app
[not loaded] com.micromat.iokit.ttpatadriver (5.0.0) [Support]
[not loaded] com.micromat.iokit.ttpfwdriver (5.0.0) [Support]
/Applications/TechTool Protogo/Protogo Applications/TechTool Pro 7.app
[not loaded] com.micromat.driver.spdKernel (1 - SDK 10.8) [Support]
[not loaded] com.micromat.driver.spdKernel-10-8 (1 - SDK 10.8) [Support]
/Applications/Temperature Monitor 4.94/Temperature Monitor 4.94.app
[not loaded] com.bresink.driver.BRESINKx86Monitoring (8.0) [Support]
/Applications/Toast 11 Titanium/Spin Doctor.app
[not loaded] com.hzsystems.terminus.driver (4) [Support]
/Applications/Toast 7 Titanium/Toast Titanium.app
[not loaded] com.roxio.TDIXController (1.6) [Support]
/Library/Extensions
[loaded] at.obdev.nke.LittleSnitch (4216 - SDK 10.8) [Support]
/System/Library/Extensions
[loaded] com.SiliconImage.driver.Si3132 (1.2.5) [Support]
[not loaded] com.devguru.driver.SamsungComposite (1.2.63 - SDK 10.6) [Support]
[not loaded] com.microsoft.driver.MicrosoftMouse (8.2) [Support]
[not loaded] com.roxio.BluRaySupport (1.1.6) [Support]
/System/Library/Extensions/MicrosoftMouse.kext/Contents/PlugIns
[not loaded] com.microsoft.driver.MicrosoftMouseBluetooth (8.2) [Support]
[not loaded] com.microsoft.driver.MicrosoftMouseUSB (8.2) [Support]
/System/Library/Extensions/ssuddrv.kext/Contents/PlugIns
[not loaded] com.devguru.driver.SamsungACMControl (1.2.63 - SDK 10.6) [Support]
[not loaded] com.devguru.driver.SamsungACMData (1.2.63 - SDK 10.6) [Support]
[not loaded] com.devguru.driver.SamsungMTP (1.2.63 - SDK 10.5) [Support]
[not loaded] com.devguru.driver.SamsungSerial (1.2.63 - SDK 10.6) [Support]
Startup Items: ℹ️
HP IO: Path: /Library/StartupItems/HP IO
SiCoreService: Path: /Library/StartupItems/SiCoreService
Startup items are obsolete in OS X Yosemite
Launch Agents: ℹ️
[running] at.obdev.LittleSnitchUIAgent.plist [Support]
[loaded] com.coupons.coupond.plist [Support]
[running] com.micromat.TechToolProAgent.plist [Support]
[loaded] com.oracle.java.Java-Updater.plist [Support]
[invalid?] com.parallels.mobile.prl_deskctl_agent.launchagent.plist [Support]
[invalid?] com.parallels.mobile.startgui.launchagent.plist [Support]
[not loaded] com.teamviewer.teamviewer.plist [Support]
[not loaded] com.teamviewer.teamviewer_desktop.plist [Support]
Launch Daemons: ℹ️
[running] at.obdev.littlesnitchd.plist [Support]
[loaded] com.adobe.fpsaud.plist [Support]
[loaded] com.bombich.ccc.plist [Support]
[loaded] com.hp.lightscribe.plist [Support]
[running] com.micromat.TechToolProDaemon.plist [Support]
[loaded] com.microsoft.office.licensing.helper.plist [Support]
[loaded] com.oracle.java.Helper-Tool.plist [Support]
[invalid?] com.parallels.mobile.dispatcher.launchdaemon.plist [Support]
[failed] com.parallels.mobile.kextloader.launchdaemon.plist [Support] [Details]
[not loaded] com.teamviewer.teamviewer_service.plist [Support]
User Launch Agents: ℹ️
[loaded] com.facebook.videochat.[redacted].plist [Support]
[loaded] com.google.keystone.agent.plist [Support]
[running] com.nchsoftware.expressinvoice.agent.plist [Support]
[loaded] uk.co.markallan.clamxav.clamscan.plist [Support]
[loaded] uk.co.markallan.clamxav.freshclam.plist [Support]
User Login Items: ℹ️
iTunesHelper Application (/Applications/iTunes.app/Contents/MacOS/iTunesHelper.app)
SMARTReporter Application (/Applications/SMARTReporter/SMARTReporter.app)
BetterSnapTool Application (/Applications/BetterSnapTool.app)
smcFanControl Application (/Applications/smcfancontrol_2_2_2/smcFanControl.app)
Android File Transfer Agent Application (/Users/[redacted]/Library/Application Support/Google/Android File Transfer/Android File Transfer Agent.app)
Internet Plug-ins: ℹ️
JavaAppletPlugin: Version: Java 8 Update 25 Check version
FlashPlayer-10.6: Version: 16.0.0.235 - SDK 10.6 [Support]
Default Browser: Version: 600 - SDK 10.10
AdobePDFViewerNPAPI: Version: 11.0.06 - SDK 10.6 [Support]
CouponPrinter-FireFox_v2: Version: 5.0.3 - SDK 10.6 [Support]
AdobePDFViewer: Version: 11.0.06 - SDK 10.6 [Support]
Flash Player: Version: 16.0.0.235 - SDK 10.6 [Support]
QuickTime Plugin: Version: 7.7.3
SharePointBrowserPlugin: Version: 14.4.6 - SDK 10.6 [Support]
iPhotoPhotocast: Version: 7.0 - SDK 10.8
Safari Extensions: ℹ️
AdBlock [Installed]
F.B. Purity - Cleans Up Facebook [Installed]
OpenIE [Installed]
3rd Party Preference Panes: ℹ️
Déjà Vu [Support]
Flash Player [Support]
FUSE for OS X (OSXFUSE) [Support]
Java [Support]
MacFUSE [Support]
MenuMeters [Support]
Microsoft Mouse [Support]
MouseLocator [Support]
NTFS-3G [Support]
TechTool Protection [Support]
Time Machine: ℹ️
Time Machine not configured!
Top Processes by CPU: ℹ️
48% plugin-container
39% fontd
6% firefox
5% WindowServer
4% bluetoothaudiod
Top Processes by Memory: ℹ️
928 MB firefox
412 MB plugin-container
258 MB mds_stores
180 MB iTunes
129 MB Finder
Virtual Memory Information: ℹ️
19.38 GB Free RAM
3.11 GB Active RAM
1.88 GB Inactive RAM
1.38 GB Wired RAM
2.40 GB Page-ins
0 B Page-outs
Diagnostics Information: ℹ️
Jan 9, 2015, 07:16:57 PM Self test - passed
Jan 8, 2015, 11:37:48 AM /Library/Logs/DiagnosticReports/ClamXav_2015-01-08-113748_[redacted].cpu_resour ce.diag [Details]
Jan 8, 2015, 11:21:46 AM /Users/[redacted]/Library/Logs/DiagnosticReports/Preview_2015-01-08-112146_[red acted].crash -
Seems to be a memory leak in itunes 10.6.3.25
I cant seem to find a usefull end-user bug reporting system; so i just post it here: had to redownload all my songs (lots of them); after a few 100 iTunes displayed a message saying something cryptic like that there was not enough memory to save the library or so; little later iTunes completely hung; checked in task manager... about 1GB of memory usage. Just restarted downloading the rest of my music, memory usage is already over 200MB again... think you guys have a memory leak in your downloading or caching code.
Close your iTunes,
Go to command Prompt -
(Win 7/Vista) - START/ALL PROGRAMS/ACCESSORIES, right mouse click "Command Prompt", choose "Run as Administrator".
(Win XP SP2 n above) - START/ALL PROGRAMS/ACCESSORIES/Command Prompt
In the "Command Prompt" screen, type in
netsh winsock reset
Hit "ENTER" key
Restart your computer.
If you do get a prompt after restart windows to remap LSP, just click NO.
Now launch your iTunes and see if it is working normal now.
If you are still having these type of problems after trying the winsock reset, refer to this article to identify which software in your system is inserting LSP:
Apple software on Windows: May see performance issues and blank iTunes Store
http://support.apple.com/kb/TS4123?viewlocale=en_US -
Address Book Sync Memory Leak , Using 5.6GB of Real Memory
Has anyone had issues with this? I have to force quit the process from Activity Monitor every 30 minutes.
Sampling process 3337 for 3 seconds with 1 millisecond of run time between samples
Sampling completed, processing symbols...
Analysis of sampling AddressBookSync (pid 3337) every 1 millisecond
Process: AddressBookSync [3337]
Path: /System/Library/Frameworks/AddressBook.framework/Versions/A/Resources/AddressBo okSync.app/Contents/MacOS/AddressBookSync
Load Address: 0x100000000
Identifier: AddressBookSync
Version: ??? (???)
Code Type: X86-64 (Native)
Parent Process: SyncServer [3314]
Date/Time: 2011-05-30 10:09:28.670 -0400
OS Version: Mac OS X 10.6.7 (10J869)
Report Version: 7Unfortunately not. No groups and any Mobile Me account here not even many contacts (436) and any duplicates except in Ical after having restored my iphone 4 times. Something strange too, 2 weeks ago, Isync was running while I'm not registered on MM nor Icloud (turned off on my iphone) . Maybe a conflict between Outlook, Addressbook, Itunes and Isync on SL....I'm going crasy with this issue It reminds me of Windows ! Thx anyway, I'm gooing to contact apple in the following days.
-
Memory leak in WLS6.1 sp3 on Solaris?
We are running WLS 6.1 sp3 on Solaris 8 using Sun's 1.3.1 JVM with BEA's
JDriver to connect to Oracle (8.1.7). We have set the JVM to a maximum heap
of 512M (-Xms256m -Xmx512m).
The issue is that we are now seeing (via pmap) the resident memory growing
to ~1GB. Yet, the WLS management console is reporting memory usage of ~200M.
So, if we are to believe WLS, then the JVM (or some native library) is
chewing up the extra memory.
Having examined the results of "pmap -x <pid>", I see the heap (and some
anon) mem/file are quite large.
Address Kbytes Resident Shared Private Permissions Mapped File
00026000 418912 416096 - 416096 read/write/exec [ heap ]
D8C00000 524288 447928 - 447928 read/write/exec [ anon ]
total Kb 1083832 981136 37960 943176
Questions:
- Are there any known memory leaks with 6.1 sp3 on Solaris?
- Should it be possible for pmap's value of "heap" to grow larger than the
"Xms" setting? We have observed this recently, but the numbers above don't
reflect this.
- Any idea what the "anon" is or how to determine what it is?
- Do you know of any tools that might help me determine what is using that
memory or what is in it?
Any suggestions will be greatly appreciated...
Thanks in advance,
ErikIf you set -Xmx512m then the java heap will grow no larger than 512MB.
WLS is reporting the size of the java heap. (It is a java program after
all and doesn't know a lot about what native code might be doing.)
My first thought is try running with Oracle's thin (type-4) driver.
Since this is java code, it will use the java heap. If the memory usage
drastically changes, then you can point the finger at the jDriver.
Are you using any other native code / libraries?
-- Rob
Erik Westland wrote:
We are running WLS 6.1 sp3 on Solaris 8 using Sun's 1.3.1 JVM with BEA's
JDriver to connect to Oracle (8.1.7). We have set the JVM to a maximum
heap
of 512M (-Xms256m -Xmx512m).
The issue is that we are now seeing (via pmap) the resident memory growing
to ~1GB. Yet, the WLS management console is reporting memory usage of
~200M.
So, if we are to believe WLS, then the JVM (or some native library) is
chewing up the extra memory.
Having examined the results of "pmap -x ", I see the heap (and some
anon) mem/file are quite large.
Address Kbytes Resident Shared Private Permissions Mapped File
00026000 418912 416096 - 416096 read/write/exec [ heap ]
D8C00000 524288 447928 - 447928 read/write/exec [ anon ]
total Kb 1083832 981136 37960 943176
Questions:
- Are there any known memory leaks with 6.1 sp3 on Solaris?
- Should it be possible for pmap's value of "heap" to grow larger than the
"Xms" setting? We have observed this recently, but the numbers above don't
reflect this.
- Any idea what the "anon" is or how to determine what it is?
- Do you know of any tools that might help me determine what is using that
memory or what is in it?
Any suggestions will be greatly appreciated...
Thanks in advance,
Erik -
Memory leak in JCO when calling an ABAP-function that returns larg tables
Hello everybody,
I think discovered a memory leak in JCO when the calling functionions that have exporting tables with large datasets. For example the ABAP-function RFC_READ_TABLE, which in this example I use to retrieve data from a table called "RSZELTTXT", which contains ~ 120000 datasets. RFC_READ_TABLE exports the data as table "DATA".
Here a simple JUnit test:
http://pastebin.ca/1420451
When running it with Sun Java 1.6 with standard heap size of 64mb I get a heapsize OutOfMemory error:
http://pastebin.ca/1420472
Looking at the heap dump (which I unfortunately cannot post here, because of it' size), I can see that I've 65000 char[512] array objects in my heap, which don't get cleaned up. I think, each char[512] array stands for one dataset in the exporting table "DATA", since the table contains 120000 datasets, the heap is full after the first 65000 datasets are parsed. Apparently, JCO tries to read all datasets in memory instead of justing reading the dataset to which the pointer (JCoTable.setRow(i)) currently points to and releasing it from memory after the pointer moves forward ...
Did anybody else experience this?
Is SAP going to remove to issue in upcoming versions of JCO?
regards SamirHi,
Check Below links
1) How To Analyze Performance Problems JCO
https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/3fbea790-0201-0010-6481-8370ebc3c17d
2) How to Avoid Memory Leaks
https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/c3e598fe-0601-0010-e990-b8622840c8c2
Salil...
Edited by: salil chavan on Jun 2, 2009 5:21 AM -
How to fix huge iTunes memory leak in 64-bit Windows 7?
iTunes likes to allocate as much as 1.6GB of memory on my dual-quad XEON 8GB 64-Bit Windows computer and then becomes unresponsive.
This can happen several times a day and has been going on for as long as I can remember. No other software that I use does this - only Apple's iTunes. Each version I have installed of iTunes appears to have this same memory leak. Currently I am running version 10.7.0.21.
I love iTunes when it works. But having to constantly kill and relaunch the app throughout the day is bringing me down.
Searching for a fix for this on the internet just surfaces more and more complaints about this problem - but without a solution.
Having written shrinkwrapped software for end users as well as for large corporations and governments for more than 25 years I know a thing or two about software. A leak like this should take no more than a day or two to locate using modern software tools and double that to fix it. So why with each new version of iTunes does this problem persist? iTunes for Windows is the flagship software product Apple makes for non-Mac users - yet they continue to pass up each opportunity they have had over the years with each new release to fix this issue. Why is this?
Either the software engineers are not that good or they have been told NOT to spend time on this issue. I personally believe that the engineers at Apple are very good, and therefore am left thinking that the latter is more likely the case. Maybe this is to coax people to purchase a Mac so that they can finally run iTunes without these egregious memory leaks. I would like to offer another issue to consider.
Just as Amazon sold Kindles and Google sold Nexus tablets at low cost - not counting on margin for profit - but instead they wanted to saturate the marketplace with tools for making future purchases of content almost trivial to do with their devices. Apple also counts on this model with their pricer hardware - but they also have iTunes. Instead of trying to get people to switch to a MAC by continuing to avoid fixing this glaring issue in iTunes for Windows I would like to suggest that by allowing their engineers to address this issue that Apple will help keep Windows users from jumping ship to another music app. The profit to be made by keeping those Windows users happy and wedded to the iTunes store is obvious.
By continuing to keep this leak in iTunes for Windows all it does is lower my esteem for the company and start to make me wonder if the software is just as buggy on Macs.I have same issue. Ongoing for more than 1 year and currently running iTunes 11.3.
My PC is Dell OptiPlex 990 I7 processor, 8GB ram, W7 64 [always keep things patched up to latest OS updates etc]
I use this iTunes install to stream music videos etc to multiple appleTVs, ipads, iphones etc .. via Home Sharing
Store all my media including music, videos and apps on separate NAS .. so the iTunes running on PC is only doing the traffic cop role and streaming / using files stored on NAS .. creates lots of IO across my network
Previous troubleshooting suggest possible contributing causes include
a) podcast updates .. until recently I had this auto updates on multiple podcast subscriptions, presumably the iTunes would flow this from the PC to save on the NAS across the network .. if the memory leak is in the iTunes network communication layer (?bonjour?) this may be sensitive to IO that would not normally occur if the iTunes file saving was local on the same PC
b) app updates .. have 200+ apps in my library and there is always a batch of updates .. some updates 100s of MB is size .. routinely see 500MB to 1GB of updates in single update run .. all my apps are
c) streaming music / movies .. seems when we ramp up streamlining of music or movies . memory leak grows faster .. ie within hours of clean start
c) large syncs of music or videos to ipads or iphones .. noticed that get big problems when I rebuild an ipad .. I typically have 60+ GB of data in terms of apps / music / videos to load .. have to do rebuild in phases due to periodic lockups
Maybe you are looking for
-
Adjusting the Maximum Power level Assignment Value
I have a deployment of AIR-CAP35021 APs. They are in 2 buildings with multiple floors. They are installed in a row down the hallways. I want to increase the power levels by using the controller and not configuring the APs individually. I have set the
-
Error while Deploying -- Please help !!!
Hi, I am getting the following error while deploying. The components that I have is a html, servlet and Stateless session bean, basically I am executing chapter 2 of developing Enterprise applications "A Simple Session Bean". The error is as follows.
-
Can't assign chart of deprecition to company code
Hi Experts, At the time of assign chart of depreciation to company code its showing the error Errore is: Company code entries for N001 are incomplete - See long text Message no. AC551 Diagnosis The result of the check of company code N001 shows th
-
Hi All, We are getting some .bqy reports as duplicates in a mail when it gets started as per scheduled, but the duplicates are not getting in job output folder. could you please let us know what could be the reason, is there any specific issue for th
-
TCP comm with multiple instrument​s
LV 2010, Windows, LVRT I need to communicate with several (5-50, I don't know) separate identical instruments via TCP. I have to send requests and receive answers, more or less continuously. I like state machines for doing this, but this particular m