Libclntsh - Memory leak
Hi every body,
I have a big problem with my c++ program, after 3 hours of execution, my program explose, no enouth memory and the cause is that i have a lot of memory leak due at the use of the oracle librairie libclntsh, my oracle version is 9.2.0.7
There is any patch for this librairie ?
Please i need help
Thanks in advance
On http://metalink.oracle.com
Go in the "Patches & Updates" tab
Click on Simple search
Choose search by "Product or Family" and enter "RDBMS Server" in the following field.
Choose the version you are looking for (9.2.0.8)
Choose your plateform
Click on the Go button.
Nicolas.
Similar Messages
-
Memory leak in oraagent.bin?
Hi All,
Running 11.2.0.1.0 on RHEL5.3.
I've got a box that seems to be leaking memory over time. Slowly, more and more memory is allocated, and more and more swap gets allocated. At first, I thought I was a bit too aggressive with my SGA memory/HugePages reservations...but we recently reduced those, and we still see swap usage slowly but steadily increasing.
I was poking around a bit, and I ran:
ps aux --sort=vszand I see:
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
...many lines omitted....
oracle 15493 0.7 0.0 492100 38596 ? Ss Jul08 79:28 asm_lmd0_+ASM4
oracle 15777 0.0 0.0 494204 26440 ? Ss Jul08 0:05 asm_smon_+ASM4
oracle 15783 0.1 0.0 547480 20384 ? Ss Jul08 17:34 asm_gmon_+ASM4
oracle 13087 1.5 0.4 556524 368056 ? SLl Jul08 166:32 /grid/product/11.2.0/grid/bin/ocssd.bin
oracle 12952 0.1 0.0 587004 15188 ? Ssl Jul08 20:04 /grid/product/11.2.0/grid/bin/oraagent.bin
root 17895 0.2 0.0 835060 12768 ? Ssl Jul08 31:35 /grid/product/11.2.0/grid/bin/orarootagent.bin
root 7924 0.3 0.3 978556 271116 ? Ssl Jul08 37:50 /grid/product/11.2.0/grid/bin/ohasd.bin reboot
oracle 18447 0.4 0.2 1634656 180016 ? Sl Jul08 53:19 /grid/product/11.2.0/grid/jdk/jre//bin/java -Doracle.
root 17510 0.3 2.6 4220208 1964940 ? Ssl Jul08 32:26 /grid/product/11.2.0/grid/bin/crsd.bin reboot
oracle 17887 5.6 13.4 19577880 9975984 ? Ssl Jul08 601:36 /grid/product/11.2.0/grid/bin/oraagent.binIt's that last one, oraagent.bin that concerns me.
It seems that oraagent.bin VSZ and RSS are slowly, but steadily, climbing.
Looking at a pmap -x, it seems to be allocating a whole bunch of '[anon]' memory chunks, mostly 32k or 64k in size:
-bash-3.2$ pmap -x 17887
17887: /grid/product/11.2.0/grid/bin/oraagent.bin
Address Kbytes RSS Anon Locked Mode Mapping
.........many, many lines omitted for brevity......
00002aac3c000000 65536 - - - rw--- [ anon ]
00002aac40000000 65516 - - - rw--- [ anon ]
00002aac43ffb000 20 - - - ----- [ anon ]
00002aac44000000 65536 - - - rw--- [ anon ]
00002aac48000000 65536 - - - rw--- [ anon ]
00002aac4c000000 65536 - - - rw--- [ anon ]
00002aac50000000 65536 - - - rw--- [ anon ]
00002aac54000000 65536 - - - rw--- [ anon ]
00002aac58000000 65536 - - - rw--- [ anon ]
00002aac5c000000 65532 - - - rw--- [ anon ]
00002aac5ffff000 4 - - - ----- [ anon ]
00002aac60000000 65536 - - - rw--- [ anon ]
00002aac64000000 65536 - - - rw--- [ anon ]
00002aac68000000 65536 - - - rw--- [ anon ]
00002aac6c000000 65516 - - - rw--- [ anon ]
00002aac6fffb000 20 - - - ----- [ anon ]
00002aac70000000 65536 - - - rw--- [ anon ]
00002aac74000000 65444 - - - rw--- [ anon ]
00002aac77fe9000 92 - - - ----- [ anon ]
00002aac78000000 65536 - - - rw--- [ anon ]
00002aac7c000000 65536 - - - rw--- [ anon ]
00002aac80000000 65532 - - - rw--- [ anon ]
00002aac83fff000 4 - - - ----- [ anon ]
00002aac84000000 65532 - - - rw--- [ anon ]
00002aac87fff000 4 - - - ----- [ anon ]
00002aac88000000 65524 - - - rw--- [ anon ]
00002aac8bffd000 12 - - - ----- [ anon ]
00002aac8c000000 65516 - - - rw--- [ anon ]
00002aac8fffb000 20 - - - ----- [ anon ]
00002aac90000000 65536 - - - rw--- [ anon ]
00002aac94000000 65536 - - - rw--- [ anon ]
00002aac98000000 65536 - - - rw--- [ anon ]
00002aac9c000000 65524 - - - rw--- [ anon ]
00002aac9fffd000 12 - - - ----- [ anon ]
00002aaca0000000 65496 - - - rw--- [ anon ]
00002aaca3ff6000 40 - - - ----- [ anon ]
00002aaca4000000 65528 - - - rw--- [ anon ]
00002aaca7ffe000 8 - - - ----- [ anon ]
00002aaca8000000 65536 - - - rw--- [ anon ]
00002aacac000000 65536 - - - rw--- [ anon ]
00002aacb0000000 65532 - - - rw--- [ anon ]
00002aacb3fff000 4 - - - ----- [ anon ]
00002aacb4000000 65524 - - - rw--- [ anon ]
00002aacb7ffd000 12 - - - ----- [ anon ]
00002aacb8000000 65532 - - - rw--- [ anon ]
00002aacbbfff000 4 - - - ----- [ anon ]
00002aacbc000000 65512 - - - rw--- [ anon ]
00002aacbfffa000 24 - - - ----- [ anon ]
00002aacc0000000 65536 - - - rw--- [ anon ]
00002aacc4000000 65536 - - - rw--- [ anon ]
00002aacc8000000 65536 - - - rw--- [ anon ]
00002aaccc000000 65532 - - - rw--- [ anon ]
00002aaccffff000 4 - - - ----- [ anon ]
00002aacd0000000 65524 - - - rw--- [ anon ]
00002aacd3ffd000 12 - - - ----- [ anon ]
00002aacd4000000 65536 - - - rw--- [ anon ]
00002aacd8000000 65536 - - - rw--- [ anon ]
00002aacdc000000 65536 - - - rw--- [ anon ]
00002aace0000000 65536 - - - rw--- [ anon ]
00002aace4000000 65524 - - - rw--- [ anon ]
00002aace7ffd000 12 - - - ----- [ anon ]
00002aace8000000 65536 - - - rw--- [ anon ]
00002aacec000000 65444 - - - rw--- [ anon ]
00002aaceffe9000 92 - - - ----- [ anon ]
00002aacf0000000 65536 - - - rw--- [ anon ]
00002aacf4000000 65536 - - - rw--- [ anon ]
00002aacf8000000 65536 - - - rw--- [ anon ]
00002aacfc000000 65536 - - - rw--- [ anon ]
00002aad00000000 65528 - - - rw--- [ anon ]
00002aad03ffe000 8 - - - ----- [ anon ]
00002aad04000000 65536 - - - rw--- [ anon ]
00002aad08000000 65536 - - - rw--- [ anon ]
00002aad0c000000 65524 - - - rw--- [ anon ]
00002aad0fffd000 12 - - - ----- [ anon ]
00002aad10000000 65536 - - - rw--- [ anon ]
00002aad14000000 65536 - - - rw--- [ anon ]
00002aad18000000 65532 - - - rw--- [ anon ]
00002aad1bfff000 4 - - - ----- [ anon ]
00002aad1c000000 65536 - - - rw--- [ anon ]
00002aad20000000 32768 - - - rw--- [ anon ]
00002aad22001000 31744 - - - rw--- [ anon ]
00002aad24000000 65536 - - - rw--- [ anon ]
00002aad28000000 65520 - - - rw--- [ anon ]
00002aad2bffc000 16 - - - ----- [ anon ]
00002aad2c000000 65536 - - - rw--- [ anon ]
00002aad30000000 65536 - - - rw--- [ anon ]
00002aad34000000 65520 - - - rw--- [ anon ]
00002aad37ffc000 16 - - - ----- [ anon ]
00002aad38000000 65536 - - - rw--- [ anon ]
00002aad3c000000 65536 - - - rw--- [ anon ]
00002aad40000000 32768 - - - rw--- [ anon ]
00002aad42001000 31744 - - - rw--- [ anon ]
00002aad44000000 65532 - - - rw--- [ anon ]
00002aad47fff000 4 - - - ----- [ anon ]
00002aad48000000 65536 - - - rw--- [ anon ]
00002aad4c000000 65536 - - - rw--- [ anon ]
00002aad50000000 65532 - - - rw--- [ anon ]
00002aad53fff000 4 - - - ----- [ anon ]
00002aad54000000 65536 - - - rw--- [ anon ]
00002aad58000000 65536 - - - rw--- [ anon ]
00002aad5c000000 65532 - - - rw--- [ anon ]
00002aad5ffff000 4 - - - ----- [ anon ]
00002aad60000000 65536 - - - rw--- [ anon ]
00002aad64000000 65504 - - - rw--- [ anon ]
00002aad67ff8000 32 - - - ----- [ anon ]
00002aad68000000 65536 - - - rw--- [ anon ]
00002b4865c05000 4 - - - rw--- [ anon ]
00002b4865c06000 4256 - - - r-x-- libhasgen11.so
00002b486602e000 1024 - - - ----- libhasgen11.so
00002b486612e000 72 - - - rw--- libhasgen11.so
00002b4866140000 16 - - - rw--- [ anon ]
00002b4866144000 35368 - - - r-x-- libclntsh.so.11.1
00002b48683ce000 2044 - - - ----- libclntsh.so.11.1
00002b48685cd000 1524 - - - rw--- libclntsh.so.11.1
00002b486874a000 144 - - - rw--- [ anon ]
00002b486876e000 8 - - - r-x-- libskgxn2.so
00002b4868770000 1020 - - - ----- libskgxn2.so
00002b486886f000 4 - - - rw--- libskgxn2.so
00002b4868885000 8 - - - rw--- [ anon ]
00002b4868887000 444 - - - r-x-- libasmclnt11.so
00002b48688f6000 1024 - - - ----- libasmclnt11.so
00002b48689f6000 72 - - - rw--- libasmclnt11.so
00002b4868a08000 4 - - - rw--- [ anon ]
00002b4868a09000 316 - - - r-x-- libcell11.so
00002b4868a58000 1020 - - - ----- libcell11.so
00002b4868b57000 32 - - - rw--- libcell11.so
00002b4868b5f000 4 - - - rw--- [ anon ]
00002b4868b60000 732 - - - r-x-- libskgxp11.so
00002b4868c17000 1024 - - - ----- libskgxp11.so
00002b4868d17000 8 - - - rw--- libskgxp11.so
00002b4868d19000 2580 - - - r-x-- libnnz11.so
00002b4868f9e000 1020 - - - ----- libnnz11.so
00002b486909d000 268 - - - rw--- libnnz11.so
00002b48690e0000 4 - - - rw--- [ anon ]
00002b48690e1000 1160 - - - r-x-- libgns11.so
00002b4869203000 1020 - - - ----- libgns11.so
00002b4869302000 20 - - - rw--- libgns11.so
00002b4869307000 4 - - - rw--- [ anon ]
00002b4869308000 136 - - - r-x-- libeons.so
00002b486932a000 1020 - - - ----- libeons.so
00002b4869429000 8 - - - rw--- libeons.so
00002b486942b000 100 - - - r-x-- libonsx.so
00002b4869444000 1024 - - - ----- libonsx.so
00002b4869544000 4 - - - rw--- libonsx.so
00002b4869545000 12 - - - rw--- [ anon ]
00002b4869548000 4 - - - r-x-- libaio.so.1.0.1
00002b4869549000 2044 - - - ----- libaio.so.1.0.1
00002b4869748000 4 - - - rw--- libaio.so.1.0.1
00002b4869749000 292 - - - rw--- [ anon ]
00002b48697a7000 40 - - - r-x-- libnss_files-2.5.so
00002b48697b1000 2044 - - - ----- libnss_files-2.5.so
00002b48699b0000 4 - - - r---- libnss_files-2.5.so
00002b48699b1000 4 - - - rw--- libnss_files-2.5.so
00002b48699b2000 160 - - - rw--- [ anon ]
00007fff452c2000 140 - - - rwx-- [ stack ]
00007fff452e5000 4 - - - rw--- [ anon ]
ffffffffff600000 8192 - - - ----- [ anon ]
total kB 19586072 - - -Is anyone aware of a memory leak in oraagent.bin in 11.2.0.1.0? I did a Google search and a MOS search, no luck at all.
Any thoughts or suggestions are welcome.
Thanks,
-MarkAlso noticed, this is only happening on node 4 of a 4 node cluster. The other three nodes, the memory usage of oraagent.bin is an order of magnitude lower, and does not appear to be growing. On node 4, it has huge memory allocation and continues to grow, and also, seems to have accrued a lot more CPU time (which, I suppose is consistent).
And yes, all 4 nodes have been up almost exactly the same amount of time (1 week, 1 day), within a few minutes of each other.
-Mark -
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 -
Possible memory leak in Oracle 12.1.0 C client
Dear Oracle Users and Professionals,
I want to report Oracle 12.1.0 C client memory leak when reconnect feature is on place. I have used Valgrind/massif tool to diagnostic our components and there was small memory leak in libclntsh.so.12.1 which is calling libc function getaddrinfo(). This seems to be not freed when connection is closed, but my application is still running and keep reconnect when needed.
I sought a bit on internet and Oracle Portals about this and did not find any information that some has detected this particular issue.
In the attachment is trace back from massif: comparison of two different time slots.
We are developers and use only free available Oracle client versions. Our customer which will operate the system has available whole Oracle Support.
If you can give me advice, to reach state where we will have no memory leak, it would be helpfull.
Thank you very much
Jan Kianicka
([email protected])Hi Jan,
This forum is for questions about connecting to non-Oracle databases. For questions about the Oracle client connecting to Oracle databases then try either one of these forums - I am not sure which will be best -
ODBC
or
General Database Discussions
Regards,
Mike -
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 -
How to determine memory leaks?
I tried in XCODE, the RUN/ Start with Performance TOol / and tried out the various options. I was running my app and looking to see if it would report increasing memory use but it seemed to be looking at my total system (i was running under the simulator). In general what is the recommended procedure for determining memory leaks, which tool to use, and what tracing can i use?
How does one look at the retain count of an object? are there system routines that have knonw leaks?You took the right path. Once instruments comes up select the Leaks tool. Turn off automatic leak detection. In your app, start off at some known state, do something, and come back to the known state and check for leaks. For instance start off in a view, do something that brings up another view then come back to the original view and check for leaks. Leaks will show you if you leaked. Since you took a very deterministic path then checked it should be straight forward to go to the code and find / fix the leaks. Leaks shows you where the code where the leak was generated.
-
Memory leak in JSpinner implementation (maybe others?)
Hi,
I am developing an application using Java and Swing, and have run into some problems with memory leaks. After examining the source code and making an example program (provided below), I can only come to the conclusion that there is a bug in the implementation of JSpinner in Sun Java 1.6.0_03.
If one uses a custom model with the JSpinner, it attaches itself as a listener to the model. However, it never removes the listening connection, even if the model is changed. This causes the JSpinner to be kept in memory as long as the model exists, even if all other references to the component have been removed.
An example program is available at http://eddie.dy.fi/~sampo/ModelTest.java . It is a simple swing program that has the JSpinner and two buttons, the first of which writes to stdout the listeners of the original model and the second changes the spinner model to a newly-created model. A sample output is below:
Running on 1.6.0_03 from Sun Microsystems Inc.
Listeners before connecting to JSpinner:
Model value is 0, 0 listeners connected:
Listeners after connecting to JSpinner:
Model value is 0, 2 listeners connected:
1: interface javax.swing.event.ChangeListener
2: javax.swing.JSpinner$ModelListener@9971ad
Listeners now:
Model value is 8, 2 listeners connected:
1: interface javax.swing.event.ChangeListener
2: javax.swing.JSpinner$ModelListener@9971ad
Changing spinner model.
Listeners now:
Model value is 8, 2 listeners connected:
1: interface javax.swing.event.ChangeListener
2: javax.swing.JSpinner$ModelListener@9971adThis shows that even though the model of the JSpinner has been changed, it still listens to the original model. I haven't looked at other components whether they retain connections to the old models as well.
In my case, I have an adaptor-model which provides a SpinnerModel interface to the actual data. The adaptor is implemented so that it listens to the underlying model only when it itself is being listened to. If the JComponents using the model were to remove the listening connections, it, too, would be automatically garbage-collected. However, since JSpinner does not remove the connections, the adaptor also continues to listen to the underlying model, and neither can be garbage-collected.
All in all, the listener-connections seem to be a very easy place to make memory leaks in Java and especially in Swing. However, as I see it, it would be a simple matter to make everything work automatically with one simple rule: Listen to the models only when necessary.
If a component is hidden (or alternatively has no contact to a parent JFrame or equivalent), it does not need to listen to the model and should remove the connections. When the component is again set visible (or connected to a frame) it can re-add the connections and re-read the current model values just as it does when initializing the component. Similarly, any adaptor-models should listen to the underlying model only when it itself is being listened to.
If the components were implemented in this way, one could simply remove a component from the frame and throw it away, and automatically any listener-connections will be removed and it can be garbage-collected. Similarly any adaptor-models are collected when they are no longer in use.
Changing the API implementation in this way would not require any changes to applications, as the only thing that changes are the listener-connections. Currently used separate connection-removing methods should still work, though they would be unnecessary any more. The API would look exactly the same from the view of an application programmer, only that she would not need to care about remnant listening connections. (As far as I can tell, the current API specification would allow the API to be implemented as described above, but it should of course require it to be implemented in such a way.)
Am I missing something, or is there some valid reason why the API is not implemented like this?
PS. I'm new to these forums, so if there is a better place to post these reports, please tell me. Thanks.Another cognition: It's the following code, that causes the memory to be accumulated:
obj = m_orb.resolve_initial_references("NameService");
ctx = NamingContextExtHelper.narrow(obj);For the first 4 calls to this code the memory usage of the nameservice is unchanged. From the 5th to the 8th call, it's increased by approx. 10KB per call. And thenceforward (beginning with the 9th call) it's increasing by approx. 10MB.
What's going wrong here? -
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 -
T61 with memory leak on XP for driver battc.sys
Hi
I have an issue with XP where the battc.sys module that is part of Windows XP and responsible for the kernel side of monitoring the battery status. This module continually leaks memory until I have no more kernel paged resources left and programs start to fail on my laptop.
I raised a support case for this with Microsoft and after some investigation and upgrading to the latest T61 power drivers that were released a few days ago on the Lenovo site, MS support told me it is a fault of the T61 and that I would need to disable Microsoft APCI support to stop this memory leak from occuring and to take the issue up with Lenovo.
I have used the verifier tool to confirm that it is the Windows XP SP3 battc.sys memory module leaking.
I am running the latest T61 drivers and fully patch with MS drivers on SP3.
As MS have told me it is the fault of the T61 I am posting this issue here.
Thanks
StephenIt is memory available to the kernelwhich itself does not show under a process in task manager as far as I am aware (unles it is taken account as part of the system process).
The best way to measure the available kernel memory space available is by using sysinternals procexp.
You need to download procexp and also install the windows debugging tools from Microsoft. Then in procexp set the "Options > Configure Symbols : Debughlp.dll path" to the new debughlp.dll installed with your debu tools and set the symbols path to srv*c:\Symbols*http://msdl.microsoft.com/download/symbols
Then you can choose in procexp "View > System Information" and see the used and total paged and non-paged kernel memory space.
poolmon helps monitor all the symbols that are taking up this memory and verifier lets you drill down to the exact module and the changes in memory for a module that is occuring.
Here are two really good links on it
http://blogs.msdn.com/ntdebugging/archive/2006/12/18/Understanding-Pool-Consumption-and-Event-ID_3A0...
http://blogs.msdn.com/ntdebugging/archive/2008/05/08/tracking-down-mmst-paged-pool-usage.aspx
In my poolmon i notice that Mmst and battc are taking alot of memory after my computer has been running for some time. Mmst being high is normal but battc should not continually be growing as it is which is why I raised the case to MS but they want verification it is not a Lenovo issue. -
How do I report a major memory leak problem with Firefox 3.6.10 in WinXP?
After I installed Firefox 3.6.9 on a WinXP desktop, I occasionally had minor memory leak problems, reflected by getting "out of virtual memory" messages. I upgraded to 3.6.10 when notified that it was available and that it supposedly fixed stability problems. Ever since then, whenever I use Firefox, it starts out quick as a flash, but very rapidly slows down to a crawl, and has twice brought my system to a halt. IE does not cause this, nor any other program I use, but the execution speed of all programs slows as badly as Firefox. If I knew where to get older versions, I would back up to 3.6.9 or earlier. The situation now prevents me from using Firefox much at all.
Im running windows 7, Firefox 3.6.10 and before i updated to 3.6.10 my CPU never went above 10% with Firefox open. Now it can spike well above 50% and i have nothing different from when i had 3.6.9 to now when i have 3.6.10.
There is no evidence for me to suggest one of the additions i have is causing it, its all pointing to Firefox itself and the last update. -
How can I address a memory leak problem with Firefox?
I have happily used Firefox for the past 7 years, and have rarely had difficulties. However, I am having some trouble now; Firefox (running 3.6.6) seems to have a memory leak on my machine. It's slower than what was discussed in other forum posts, but it still scales up slowly to multiple hundred MBs of Memory with very little CPU usage.
I have tried disabling add-ons and extensions, but this does not stop the problem. I have cleared my cache and other stored data, but that also does not help. Has anyone experienced a similar problem that might be able to help?
== This happened ==
Every time Firefox opened
== within last two weeksHi reble0708,
I have Java console disabled on my Firefox browser.Everything is working fine for me. There maybe other problem on your browser which is making PDF document faded and blurry. Can you post the link where you found the problem viewing the PDF document?
Btw, you can go to ftp://ftp.mozilla.org/pub/firefox/releases/ and select the previous version of Firefox from the given options. There's no need to uninstall Firefox before you downgrade to the previous version of it.But before new installation, backup your Firefox profile folder.
edit: replaced random unofficial download site link. -
Hello, For the last couple of months, I am having issues with one of my tabs or the program itself causing a memory leak. I was hoping that subsequent releases would fix the problem, but when I downloaded V.11 it did not help.
I use tab mix plus and at any time, usually have about 25 tabs open. Everything functioned okay for 8 or so months up until recently.
I am wondering if there is a way to try to track down what is causing the leak. If it is one of my open pages, i will get rid of it. I tried opening one page at a time from scratch, but could not find the issue. .
I always have flash block enabled to cut down on the website junk.
using OSX firefox v11.Now, I'm not going to say it's an Add-On problem because from the research I've been doing on this problem for the last half hour shows that everyone has DIFFERENT add-ons, but everyone's having the SAME problem....
So I went through my add-ons and disabled them one by one, and the single add-on that has been giving me grief is the latest WOT add-on. So, I have Firefox 11 (so does my wife) and we both have the WOT add-on. But that's where the similarity ends... I have Windows 7 x64, she has Windows XP x86.... but she doesn't have the memory leak problem.
What I see is a sawtooth pattern over time. Memory goes up a little over 30+ seconds, then drops down. But over half an hour, the peaks of the sawtooth are larger, and it doesn't drop back down to the same level again - always a little more than before. And before you know it, FF is peaking at 1.5+GB, dropping down to 1.2GB... and FF is running very, very slowly.... excessive disk accesses (paging probably, though I apparently I still have 1.5 to 2.0 GB of free RAM). Killing FF frees it all up, and if I open FF again, it's back to using 250MB of RAM.
So, it's not the add-ons per se, but how they're interacting with FF (or the other way round).... most likely, it's this plug-in container they created to stop add-ons from taking FF with them when they crashed. Seems to have created more problems than it has solved..... would be great if you could choose not to use it.... -
Allocated memory pool was not deleted! 1 GB memory leak is too much for me!
Dear Sirs. I found that DB environment, that was configured to use 1 GB cache size, won't free it when closed! Why? First I tried to open and close environment and got the following:
Detected memory leaks!
Dumping objects ->
{596} normal block at 0x01970040, 1048596 bytes long.
Data: < > 14 00 10 00 DB DB DB DB 0B 00 10 00 01 00 00 00
{578} normal block at 0x00397978, 464 bytes long.
Data: < > D0 01 00 00 DB DB DB DB C7 01 00 00 01 00 00 00
Object dump complete.
I have and idea that BDB will reuse the memory, rite? OK, let's try to create the same environment and open it. After environment was opened, closed, opened again and again closed, I got the following:
Detected memory leaks!
Dumping objects ->
{3663} normal block at 0x01B80040, 1048596 bytes long.
Data: < > 14 00 10 00 DB DB DB DB 0B 00 10 00 01 00 00 00
{3645} normal block at 0x00396E60, 464 bytes long.
Data: < > D0 01 00 00 DB DB DB DB C7 01 00 00 01 00 00 00
{596} normal block at 0x01970040, 1048596 bytes long.
Data: < > 14 00 10 00 DB DB DB DB 0B 00 10 00 01 00 00 00
{578} normal block at 0x00397978, 464 bytes long.
Data: < > D0 01 00 00 DB DB DB DB C7 01 00 00 01 00 00 00
Object dump complete.
So memory was not reused, nor deallocated.
By the way, you may be interested in other leak I found, but fixed, see
Replication manager memory leak when setting local site information.
This leak is more serious, I am not sure I will fix it quickly. Maybe I'm doing something wrong? Could you please suggest something?
Thanks in advance!
With regards,
Vladislav.OK, the problem solved by fixing code in file 'log.c', method '__log_dbenv_refresh'.
Just added the code that deallocates memory of bulk buffer.
if (IS_ENV_REPLICATED(dbenv))
if (lp->bulk_buf != INVALID_ROFF)
__db_shalloc_free(&dblp->reginfo, lp->bulk_buf);
lp->bulk_buf = INVALID_ROFF;
lp->bulk_len = 0;
lp->bulk_off = 0;
It was allocated in the '__log_open' function, by the following code:
lp->ready_lsn = lp->lsn;
if (IS_ENV_REPLICATED(dbenv)) {
if ((ret = __db_shalloc(&dblp->reginfo, MEGABYTE, 0,
&bulk)) != 0)
goto err;
lp->bulk_buf = R_OFFSET(&dblp->reginfo, bulk);
lp->bulk_len = MEGABYTE;
lp->bulk_off = 0;
} else {
lp->bulk_buf = INVALID_ROFF;
lp->bulk_len = 0;
lp->bulk_off = 0;
Sorry for time taken to read my posts, I was really needy in quick help, but solved problems myself. -
Pro*c multithreaded application has memory leak
Hi there,
I posted this message a week ago in OCI section, nobody answer me.
I am really curious if my application has a bug or the pro*c has a bug.
Anyone can compile the sample code and test it easily.
I made multithreaded application which queries dynamic SQL, it works.
But the memory leaks when i query the SQL statement.
The more memory leaks, the more i query the SQL statement, even same SQL
statement.
I check it with top, shell command.
My machine is SUN E450, Solaris 8. Oracle 9.2.0.1
Compiler : gcc (GCC) 3.2.2
I changed source code which is from
$(ORACLE_HOME)/precomp/demo/proc/sample10.pc
the sample10 doesn't need to be multithreaded. But i think it has to work
correctly if i changed it to multithreaded application.
the make file and source code will be placed below.
I have to figure out the problem.
Please help
Thanks in advance,
the make file is below
HOME = /user/jkku
ORA = $(ORACLE_HOME)
CC = gcc
PROC = proc
LC_INCL = -I$(HOME)/work/dbmss/libs/include
lc_incl = include=$(HOME)/work/dbmss/libs/include
SYS_INCL =
sys_incl =
ORA_INCL = -I. \
-I$(ORA)/precomp/public \
-I$(ORA)/rdbms/public \
-I$(ORA)/rdbms/demo \
-I$(ORA)/rdbms/pbsql/public \
-I$(ORA)/network/public \
-DSLMXMX_ENABLE -DSLTS_ENABLE -D_SVID_GETTOD
INCLUDES = $(LC_INCL) $(SYS_INCL) $(ORA_INCL)
includes = $(lc_incl) $(sys_incl)
LC_LIBS =
SYS_LIBS = -lpthread -lsocket -lnsl -lrt
ORA_LIBS = -L$(ORA)/lib/ -lclntsh
LIBS = $(LC_LIBS) $(SYS_LIBS) $(ORA_LIBS)
# Define C Compiler flags
CFLAGS += -D_Solaris64_ -m64
CFLAGS += -g -D_REENTRANT
# Define pro*c Compiler flags
PROCFLAGS += THREADS=YES
PROCFLAGS += CPOOL=YES
# Our object files
PRECOMPS = sample10.c
OBJS = sample10.o
.SUFFIXES: .o .c .pc
.c.o:
$(CC) -c $(CFLAGS) $(INCLUDES) $*.c
.pc.c:
$(PROC) $(PROCFLAGS) $(includes) $*.pc $*.c
all: sample10
sample10: $(PRECOMPS) $(OBJS)
$(CC) $(CFLAGS) -o sample10 $(OBJS) $(LIBS)
clean:
rm -rf *.o sample10 sample10.c
the source code is below which i changed the oracle sample10.pc to
multithreaded application.
Sample Program 10: Dynamic SQL Method 4
This program connects you to ORACLE using your username and
password, then prompts you for a SQL statement. You can enter
any legal SQL statement. Use regular SQL syntax, not embedded SQL.
Your statement will be processed. If it is a query, the rows
fetched are displayed.
You can enter multi-line statements. The limit is 1023 characters.
This sample program only processes up to MAX_ITEMS bind variables and
MAX_ITEMS select-list items. MAX_ITEMS is #defined to be 40.
#include <stdio.h>
#include <string.h>
#include <setjmp.h>
#include <sqlda.h>
#include <stdlib.h>
#include <sqlcpr.h>
/* Maximum number of select-list items or bind variables. */
#define MAX_ITEMS 40
/* Maximum lengths of the names of the
select-list items or indicator variables. */
#define MAX_VNAME_LEN 30
#define MAX_INAME_LEN 30
#ifndef NULL
#define NULL 0
#endif
/* Prototypes */
#if defined(__STDC__)
void sql_error(void);
int oracle_connect(void);
int alloc_descriptors(int, int, int);
int get_dyn_statement(void);
void set_bind_variables(void);
void process_select_list(void);
void help(void);
#else
void sql_error(/*_ void _*/);
int oracle_connect(/*_ void _*/);
int alloc_descriptors(/*_ int, int, int _*/);
int get_dyn_statement(/* void _*/);
void set_bind_variables(/*_ void -*/);
void process_select_list(/*_ void _*/);
void help(/*_ void _*/);
#endif
char *dml_commands[] = {"SELECT", "select", "INSERT", "insert",
"UPDATE", "update", "DELETE", "delete"};
EXEC SQL INCLUDE sqlda;
EXEC SQL INCLUDE sqlca;
EXEC SQL BEGIN DECLARE SECTION;
char dyn_statement[1024];
EXEC SQL VAR dyn_statement IS STRING(1024);
EXEC SQL END DECLARE SECTION;
EXEC ORACLE OPTION (ORACA=YES);
EXEC ORACLE OPTION (RELEASE_CURSOR=YES);
SQLDA *bind_dp;
SQLDA *select_dp;
/* Define a buffer to hold longjmp state info. */
jmp_buf jmp_continue;
char *db_uid="dbmuser/dbmuser@dbmdb";
sql_context ctx;
int err_sql;
enum{
SQL_SUCC=0,
SQL_ERR,
SQL_NOTFOUND,
SQL_UNIQUE,
SQL_DISCONNECT,
SQL_NOTNULL
int main()
int i;
EXEC SQL ENABLE THREADS;
EXEC SQL WHENEVER SQLERROR DO sql_error();
EXEC SQL WHENEVER NOT FOUND DO sql_not_found();
/* Connect to the database. */
if (connect_database() < 0)
exit(1);
EXEC SQL CONTEXT USE :ctx;
/* Process SQL statements. */
for (;;)
/* Allocate memory for the select and bind descriptors. */
if (alloc_descriptors(MAX_ITEMS, MAX_VNAME_LEN, NAME_LEN) != 0)
exit(1);
(void) setjmp(jmp_continue);
/* Get the statement. Break on "exit". */
if (get_dyn_statement() != 0)
break;
EXEC SQL PREPARE S FROM :dyn_statement;
EXEC SQL DECLARE C CURSOR FOR S;
/* Set the bind variables for any placeholders in the
SQL statement. */
set_bind_variables();
/* Open the cursor and execute the statement.
* If the statement is not a query (SELECT), the
* statement processing is completed after the
* OPEN.
EXEC SQL OPEN C USING DESCRIPTOR bind_dp;
/* Call the function that processes the select-list.
* If the statement is not a query, this function
* just returns, doing nothing.
process_select_list();
/* Tell user how many rows processed. */
for (i = 0; i < 8; i++)
if (strncmp(dyn_statement, dml_commands, 6) == 0)
printf("\n\n%d row%c processed.\n", sqlca.sqlerrd[2], sqlca.sqlerrd[2] == 1 ? '\0' : 's');
break;
/* Close the cursor. */
EXEC SQL CLOSE C;
/* When done, free the memory allocated for pointers in the bind and
select descriptors. */
for (i = 0; i < MAX_ITEMS; i++)
if (bind_dp->V != (char *) 0)
free(bind_dp->V);
free(bind_dp->I); /* MAX_ITEMS were allocated. */
if (select_dp->V != (char *) 0)
free(select_dp->V);
free(select_dp->I); /* MAX_ITEMS were allocated. */
/* Free space used by the descriptors themselves. */
SQLSQLDAFree(ctx, bind_dp);
SQLSQLDAFree(ctx, select_dp);
} /* end of for(;;) statement-processing loop */
disconnect_database();
EXEC SQL WHENEVER SQLERROR CONTINUE;
EXEC SQL COMMIT WORK RELEASE;
puts("\nHave a good day!\n");
return;
* Allocate the BIND and SELECT descriptors using sqlald().
* Also allocate the pointers to indicator variables
* in each descriptor. The pointers to the actual bind
* variables and the select-list items are realloc'ed in
* the set_bind_variables() or process_select_list()
* routines. This routine allocates 1 byte for select_dp->V
* and bind_dp->V, so the realloc will work correctly.
alloc_descriptors(size, max_vname_len, max_iname_len)
int size;
int max_vname_len;
int max_iname_len;
int i;
* The first sqlald parameter determines the maximum number of
* array elements in each variable in the descriptor. In
* other words, it determines the maximum number of bind
* variables or select-list items in the SQL statement.
* The second parameter determines the maximum length of
* strings used to hold the names of select-list items
* or placeholders. The maximum length of column
* names in ORACLE is 30, but you can allocate more or less
* as needed.
* The third parameter determines the maximum length of
* strings used to hold the names of any indicator
* variables. To follow ORACLE standards, the maximum
* length of these should be 30. But, you can allocate
* more or less as needed.
if ((bind_dp =
SQLSQLDAAlloc(ctx, size, max_vname_len, max_iname_len)) ==
(SQLDA *) 0)
fprintf(stderr,
"Cannot allocate memory for bind descriptor.");
return -1; /* Have to exit in this case. */
if ((select_dp =
SQLSQLDAAlloc(ctx, size, max_vname_len, max_iname_len)) == (SQLDA *)
0)
fprintf(stderr,
"Cannot allocate memory for select descriptor.");
return -1;
select_dp->N = MAX_ITEMS;
/* Allocate the pointers to the indicator variables, and the
actual data. */
for (i = 0; i < MAX_ITEMS; i++) {
bind_dp->I = (short *) malloc(sizeof (short));
select_dp->I = (short *) malloc(sizeof(short));
bind_dp->V = (char *) malloc(1);
select_dp->V = (char *) malloc(1);
return 0;
int get_dyn_statement()
char *cp, linebuf[256];
int iter, plsql;
for (plsql = 0, iter = 1; ;)
if (iter == 1)
printf("\nSQL> ");
dyn_statement[0] = '\0';
fgets(linebuf, sizeof linebuf, stdin);
cp = strrchr(linebuf, '\n');
if (cp && cp != linebuf)
*cp = ' ';
else if (cp == linebuf)
continue;
if ((strncmp(linebuf, "EXIT", 4) == 0) ||
(strncmp(linebuf, "exit", 4) == 0))
return -1;
else if (linebuf[0] == '?' ||
(strncmp(linebuf, "HELP", 4) == 0) ||
(strncmp(linebuf, "help", 4) == 0))
help();
iter = 1;
continue;
if (strstr(linebuf, "BEGIN") ||
(strstr(linebuf, "begin")))
plsql = 1;
strcat(dyn_statement, linebuf);
if ((plsql && (cp = strrchr(dyn_statement, '/'))) ||
(!plsql && (cp = strrchr(dyn_statement, ';'))))
*cp = '\0';
break;
else
iter++;
printf("%3d ", iter);
return 0;
void set_bind_variables()
int i, n;
char bind_var[64];
/* Describe any bind variables (input host variables) */
EXEC SQL WHENEVER SQLERROR DO sql_error();
bind_dp->N = MAX_ITEMS; /* Initialize count of array elements. */
EXEC SQL DESCRIBE BIND VARIABLES FOR S INTO bind_dp;
/* If F is negative, there were more bind variables
than originally allocated by sqlald(). */
if (bind_dp->F < 0)
printf ("\nToo many bind variables (%d), maximum is %d\n.",
-bind_dp->F, MAX_ITEMS);
return;
/* Set the maximum number of array elements in the
descriptor to the number found. */
bind_dp->N = bind_dp->F;
/* Get the value of each bind variable as a
* character string.
* C contains the length of the bind variable
* name used in the SQL statement.
* S contains the actual name of the bind variable
* used in the SQL statement.
* L will contain the length of the data value
* entered.
* V will contain the address of the data value
* entered.
* T is always set to 1 because in this sample program
* data values for all bind variables are entered
* as character strings.
* ORACLE converts to the table value from CHAR.
* I will point to the indicator value, which is
* set to -1 when the bind variable value is "null".
for (i = 0; i < bind_dp->F; i++)
printf ("\nEnter value for bind variable %.*s: ",
(int)bind_dp->C, bind_dp->S);
fgets(bind_var, sizeof bind_var, stdin);
/* Get length and remove the new line character. */
n = strlen(bind_var) - 1;
/* Set it in the descriptor. */
bind_dp->L = n;
/* (re-)allocate the buffer for the value.
sqlald() reserves a pointer location for
V but does not allocate the full space for
the pointer. */
bind_dp->V = (char *) realloc(bind_dp->V, (bind_dp->L + 1));
/* And copy it in. */
strncpy(bind_dp->V, bind_var, n);
/* Set the indicator variable's value. */
if ((strncmp(bind_dp->V, "NULL", 4) == 0) ||
(strncmp(bind_dp->V, "null", 4) == 0))
*bind_dp->I = -1;
else
*bind_dp->I = 0;
/* Set the bind datatype to 1 for CHAR. */
bind_dp->T = 1;
return;
void process_select_list()
int i, null_ok, precision, scale;
if ((strncmp(dyn_statement, "SELECT", 6) != 0) &&
(strncmp(dyn_statement, "select", 6) != 0))
select_dp->F = 0;
return;
/* If the SQL statement is a SELECT, describe the
select-list items. The DESCRIBE function returns
their names, datatypes, lengths (including precision
and scale), and NULL/NOT NULL statuses. */
select_dp->N = MAX_ITEMS;
EXEC SQL DESCRIBE SELECT LIST FOR S INTO select_dp;
/* If F is negative, there were more select-list
items than originally allocated by sqlald(). */
if (select_dp->F < 0)
printf ("\nToo many select-list items (%d), maximum is %d\n",
-(select_dp->F), MAX_ITEMS);
return;
/* Set the maximum number of array elements in the
descriptor to the number found. */
select_dp->N = select_dp->F;
/* Allocate storage for each select-list item.
sqlprc() is used to extract precision and scale
from the length (select_dp->L).
sqlnul() is used to reset the high-order bit of
the datatype and to check whether the column
is NOT NULL.
CHAR datatypes have length, but zero precision and
scale. The length is defined at CREATE time.
NUMBER datatypes have precision and scale only if
defined at CREATE time. If the column
definition was just NUMBER, the precision
and scale are zero, and you must allocate
the required maximum length.
DATE datatypes return a length of 7 if the default
format is used. This should be increased to
9 to store the actual date character string.
If you use the TO_CHAR function, the maximum
length could be 75, but will probably be less
(you can see the effects of this in SQL*Plus).
ROWID datatype always returns a fixed length of 18 if
coerced to CHAR.
LONG and
LONG RAW datatypes return a length of 0 (zero),
so you need to set a maximum. In this example,
it is 240 characters.
printf ("\n");
for (i = 0; i < select_dp->F; i++)
char title[MAX_VNAME_LEN];
/* Turn off high-order bit of datatype (in this example,
it does not matter if the column is NOT NULL). */
sqlnul ((unsigned short *)&(select_dp->T), (unsigned short
*)&(select_dp->T), &null_ok);
switch (select_dp->T)
case 1 : /* CHAR datatype: no change in length
needed, except possibly for TO_CHAR
conversions (not handled here). */
break;
case 2 : /* NUMBER datatype: use sqlprc() to
extract precision and scale. */
sqlprc ((unsigned int *)&(select_dp->L), &precision,
&scale);
/* Allow for maximum size of NUMBER. */
if (precision == 0) precision = 40;
/* Also allow for decimal point and
possible sign. */
/* convert NUMBER datatype to FLOAT if scale > 0,
INT otherwise. */
if (scale > 0)
select_dp->L = sizeof(float);
else
select_dp->L = sizeof(int);
break;
case 8 : /* LONG datatype */
select_dp->L = 240;
break;
case 11 : /* ROWID datatype */
case 104 : /* Universal ROWID datatype */
select_dp->L = 18;
break;
case 12 : /* DATE datatype */
select_dp->L = 9;
break;
case 23 : /* RAW datatype */
break;
case 24 : /* LONG RAW datatype */
select_dp->L = 240;
break;
/* Allocate space for the select-list data values.
sqlald() reserves a pointer location for
V but does not allocate the full space for
the pointer. */
if (select_dp->T != 2)
select_dp->V = (char *) realloc(select_dp->V,
select_dp->L + 1);
else
select_dp->V = (char *) realloc(select_dp->V,
select_dp->L);
/* Print column headings, right-justifying number
column headings. */
/* Copy to temporary buffer in case name is null-terminated */
memset(title, ' ', MAX_VNAME_LEN);
strncpy(title, select_dp->S, select_dp->C);
if (select_dp->T == 2)
if (scale > 0)
printf ("%.*s ", select_dp->L+3, title);
else
printf ("%.*s ", select_dp->L, title);
else
printf("%-.*s ", select_dp->L, title);
/* Coerce ALL datatypes except for LONG RAW and NUMBER to
character. */
if (select_dp->T != 24 && select_dp->T != 2)
select_dp->T = 1;
/* Coerce the datatypes of NUMBERs to float or int depending on
the scale. */
if (select_dp->T == 2)
if (scale > 0)
select_dp->T = 4; /* float */
else
select_dp->T = 3; /* int */
printf ("\n\n");
/* FETCH each row selected and print the column values. */
EXEC SQL WHENEVER NOT FOUND GOTO end_select_loop;
for (;;)
EXEC SQL FETCH C USING DESCRIPTOR select_dp;
/* Since each variable returned has been coerced to a
character string, int, or float very little processing
is required here. This routine just prints out the
values on the terminal. */
for (i = 0; i < select_dp->F; i++)
if (*select_dp->I < 0)
if (select_dp->T == 4)
printf ("%-*c ",(int)select_dp->L+3, ' ');
else
printf ("%-*c ",(int)select_dp->L, ' ');
else
if (select_dp->T == 3) /* int datatype */
printf ("%*d ", (int)select_dp->L,
*(int *)select_dp->V);
else if (select_dp->T == 4) /* float datatype */
printf ("%*.2f ", (int)select_dp->L,
*(float *)select_dp->V);
else /* character string */
printf ("%-*.*s ", (int)select_dp->L,
(int)select_dp->L, select_dp->V);
printf ("\n");
end_select_loop:
return;
void help()
puts("\n\nEnter a SQL statement or a PL/SQL block at the SQL> prompt.");
puts("Statements can be continued over several lines, except");
puts("within string literals.");
puts("Terminate a SQL statement with a semicolon.");
puts("Terminate a PL/SQL block (which can contain embedded
semicolons)");
puts("with a slash (/).");
puts("Typing \"exit\" (no semicolon needed) exits the program.");
puts("You typed \"?\" or \"help\" to get this message.\n\n");
int connect_database()
err_sql = SQL_SUCC;
EXEC SQL WHENEVER SQLERROR DO sql_error();
EXEC SQL WHENEVER NOT FOUND DO sql_not_found();
EXEC SQL CONTEXT ALLOCATE :ctx;
EXEC SQL CONTEXT USE :ctx;
EXEC SQL CONNECT :db_uid;
if(err_sql != SQL_SUCC){
printf("err => connect database(ctx:%ld, uid:%s) failed!\n", ctx, db_uid);
return -1;
return 1;
int disconnect_database()
err_sql = SQL_SUCC;
EXEC SQL WHENEVER SQLERROR DO sql_error();
EXEC SQL WHENEVER NOT FOUND DO sql_not_found();
EXEC SQL CONTEXT USE :ctx;
EXEC SQL COMMIT WORK RELEASE;
EXEC SQL CONTEXT FREE:ctx;
return 1;
void sql_error()
printf("err => %.*s", sqlca.sqlerrm.sqlerrml, sqlca.sqlerrm.sqlerrmc);
printf("in \"%.*s...\'\n", oraca.orastxt.orastxtl, oraca.orastxt.orastxtc);
printf("on line %d of %.*s.\n\n", oraca.oraslnr, oraca.orasfnm.orasfnml,
oraca.orasfnm.orasfnmc);
switch(sqlca.sqlcode) {
case -1: /* unique constraint violated */
err_sql = SQL_UNIQUE;
break;
case -1012: /* not logged on */
case -1089:
case -3133:
case -1041:
case -3114:
case -3113:
/* �6�Ŭ�� shutdown�ǰų� �α��� ���°� �ƴҶ� ��b�� �õ� */
/* immediate shutdown in progress - no operations are permitted */
/* end-of-file on communication channel */
/* internal error. hostdef extension doesn't exist */
err_sql = SQL_DISCONNECT;
break;
case -1400:
err_sql = SQL_NOTNULL;
break;
default:
err_sql = SQL_ERR;
break;
EXEC SQL CONTEXT USE :ctx;
EXEC SQL WHENEVER SQLERROR CONTINUE;
EXEC SQL ROLLBACK WORK;
void sql_not_found()
err_sql = SQL_NOTFOUND;Hi Jane,
What version of Berkeley DB XML are you using?
What is your operating system and your hardware platform?
For how long have been the application running?
What is your current container size?
What's set for EnvironmentConfig.setThreaded?
Do you know if containers have previously not been closed correctly?
Can you please post the entire error output?
What's the JDK version, 1.4 or 1.5?
Thanks,
Bogdan -
APEX 4.1.1 Memory Leak in IE7
Hi,
We busy upgrading our apex and db from 3.0/10G to 4.1.1/11.2G and notice that there appears to be a memory leak when using APEX. At one stage we have had IE7 using over a gig of memory.
When you load or refresh your page IE7 seems to grab on average 2-5MB of memory for each page load. At first we thought it may have been our apps or setup but this also happens when we go to app 4550 page 1 on apex.oracle.com.
How to replicate:
Open task manager to view the Memory Usage.
Using IE7
1. Go to http://apex.oracle.com/pls/apex/f?p=4550:1
2. Go back to Task Manager and note the readings once the CPU Usage for iexplore.exe has stablised to 0.
3. go back to IE7 and press F5
4. Repeat steps 2-3 and you will see the Memory usage increases.
We think this maybe due to a few jQuery UI memory leaks within IE7 and thought this bug ticket maybe of interest http://bugs.jqueryui.com/ticket/7666 (Slightly different versions but similiar experiences)
Could someone else confirm that they also experience the increasing or have had similiar problems and managed to resolve it?
TBH, it wouldn't be an issue to use another browser like Firefox to access the builder but this also affects the applications if they include APEX standard Javascript and CSS.
Thanking you in advance.
Alistair
Edited by: Alistair Laing on Jun 16, 2012 2:32 PM
Added TagsAlistair Laing wrote:
Hi,
We busy upgrading our apex and db from 3.0/10G to 4.1.1/11.2G and notice that there appears to be a memory leak when using APEX. At one stage we have had IE7 using over a gig of memory.
When you load or refresh your page IE7 seems to grab on average 2-5MB of memory for each page load. At first we thought it may have been our apps or setup but this also happens when we go to app 4550 page 1 on apex.oracle.com.
How to replicate:
Open task manager to view the Memory Usage.
Using IE7
1. Go to http://apex.oracle.com/pls/apex/f?p=4550:1
2. Go back to Task Manager and note the readings once the CPU Usage for iexplore.exe has stablised to 0.
3. go back to IE7 and press F5
4. Repeat steps 2-3 and you will see the Memory usage increases.
We think this maybe due to a few jQuery UI memory leaks within IE7 and thought this bug ticket maybe of interest http://bugs.jqueryui.com/ticket/7666 (Slightly different versions but similiar experiences)
Could someone else confirm that they also experience the increasing or have had similiar problems and managed to resolve it?Anecdotally, yes. Don't have exact steps for replication or precise numbers, but I have noticed this in passing. On the junk that my client considers a PC suitable for web development the typical IE7 memory footprint with the APEX 3.0 builder and several other tabs running is about 52MB. Add APEX 4.1.1 and it climbs constantly until I have to pull the plug when it gets north of 150MB as the PC can't take it.
As well that I also have Firefox and 4.1.1 is still experimental at that site...
At the moment I don't have to resolve it and if I did the only option I'd propose is the replacement of IE7.
VC wrote:
Look at this http://www.bbc.co.uk/news/technology-18440979
Alistair Laing wrote:lol @ VC - I dont shop online at work :-D
I saw that eariler this week. I do agree with the concept though.So take appropriate action: charge extra for IE7 support.
The amount of work and effort involved in making our website look normal on IE7 equalled the combined time of designing for Chrome, Safari and Firefox.Is entirely accurate. If it's stated as a requirement, itemise it as an extra on the quote.
Educate management and bean counters: show them the one line of standards-compliant CSS that's all that is necessary in Safari, Chrome, Firefox and Opera (and just possibly in IE8/9/10), how it isn't supported in IE7, and the tortuous hacks and workarounds that are required to get something equivalent working there.
Maybe you are looking for
-
Can I put an e-mail tab on my Firefox home page?
I'd like to be able to retrieve my E-mail from the Firefox home page. Possible?
-
Oracle 8i lite works in windows 2000 ?
I would like to know if Oracle 8i Lite works with Windows 2000 ? null
-
Upgraded 2 the 6.0 & ever since whenever I open a new tab I have to sign in all over again 2 my social media sites DIGG, Twitter, StumbleUpon using my AddThis addon What's Up? never had to do that before when activating additional tabs once I was sig
-
Error when I try to create dimension with AWM 11.1.0.7.0B
hello, I have installed Analytic workspace manager 11g, and I have created a connection to an oracle database, but when I try to create a dimension 2 errors appears: 1.the dimension must have at least one hierarchy 2.the dimension must have at least
-
Can I Delete My MobileMe Account?
I am receiving all emails addressed to my mac.com & me.com addresses twice, presumably because it's coming in to iCloud AND MobileMe. Can I safely now delete MobileMe on my iPhone? What are the repercussions, if any?