OCI leaks on Linux /Oracle 9.2/ Threaded environment 
Author Message
 OCI leaks on Linux /Oracle 9.2/ Threaded environment

I am writing an MT server on Linux which connects to Oracle via OCI
(also tried OCCI)
When I initiate OCI environment with OCI_THREADED, I get a leak in
OCIServerAttach.
Its size increases with the number of statements executed on the
connection.
When I switch to OCI_DEFAULT, leak goes away.

I have verified that this is reproducible on Oracle's own examples.
I change the connection option to Encrionment::THREADED_MUTEXED (also
tried THREADED_UNMUTEXED)
in occiproc.cpp and made the procedure call in a loop,
leak was apparent and was proportional to the number of PL/SQL
procedure calls.
Leak went away when the envrionment option was reset to default.
The leak is pretty large - about 1K per call, it can be seen from
"top",
and by using valgrind.

This is quite a shocker. Has anybody observed anything similar or has
a similar
configuration which works flawlessly?
The compiler I use is gcc 2.96 on Redhat Linux 7.3

Gene Gorokhovsky

PS
Here is a relevant part of valgrind report on 100 repetions of the
procedure calls:
I get similar stacks when I use pure OCI calls bypassing OCCI (OCI
layer courtesy of OTL V4)

==9494== 119328 bytes in 1243 blocks are definitely lost in loss
record 78 of 81
==9494==    at 0x40042A34: malloc (vg_clientfuncs.c:100)
==9494==    by 0x40A3A442: sltsmxi (in
/home/oracle/ora92/lib/libclntsh.so.9.0)
==9494==    by 0x405F3B76: snsbitini_ts (in
/home/oracle/ora92/lib/libclntsh.so.9.0)
==9494==    by 0x405DA2E3: nsgbliuc (in
/home/oracle/ora92/lib/libclntsh.so.9.0)
==9494==    by 0x405DA8E6: nsgblini (in
/home/oracle/ora92/lib/libclntsh.so.9.0)
==9494==    by 0x406618A4: niotns (in
/home/oracle/ora92/lib/libclntsh.so.9.0)
==9494==    by 0x4065DAA9: nigcall (in
/home/oracle/ora92/lib/libclntsh.so.9.0)
==9494==    by 0x405FAFF3: osncon (in
/home/oracle/ora92/lib/libclntsh.so.9.0)
==9494==    by 0x40439A63: kpuadef (in
/home/oracle/ora92/lib/libclntsh.so.9.0)
==9494==    by 0x404BCC35: upiini (in
/home/oracle/ora92/lib/libclntsh.so.9.0)
==9494==    by 0x404ABF8B: upiah0 (in
/home/oracle/ora92/lib/libclntsh.so.9.0)
==9494==    by 0x40414026: kpuatch (in
/home/oracle/ora92/lib/libclntsh.so.9.0)
==9494==    by 0x404A010C: OCIServerAttach (in
/home/oracle/ora92/lib/libclntsh.so.9.0)
==9494==    by 0x402A3872: (within
/home/oracle/ora92/lib/libocci.so.9.0)
==9494==    by 0x402A2B81: (within
/home/oracle/ora92/lib/libocci.so.9.0)
==9494==    by 0x402A2855: (within
/home/oracle/ora92/lib/libocci.so.9.0)
==9494==    by 0x804AAEE: (within /home/geneg/project/test/test/test)
==9494==    by 0x8049E22: main (in /home/geneg/project/test/test/test)
==9494==    by 0x42017589: (within /lib/i686/libc-2.2.5.so)
==9494==    by 0x8049C51: __builtin_new (in
/home/geneg/project/test/test/test)
==9494==
==9494== LEAK SUMMARY:
==9494==    definitely lost: 119328 bytes in 1243 blocks.
==9494==    possibly lost:   1152 bytes in 12 blocks.
==9494==    still reachable: 635053 bytes in 195 blocks.
==9494== Reachable blocks (those to which a pointer was found) are not
shown.



Mon, 21 Feb 2005 11:09:35 GMT
 
 [ 1 post ] 

 Relevant Pages 

1. Cannot connect with OCI driver and Oracle 9i (9.2)

2. tomcat 4.1.12 + oracle 9.2, oci driver + dbcp problem

3. Oracle 9.2 on Linux SuSE 8.1 sqlplus error and jre problem

4. unable to Install Informix IFF (9.2) on SuSE LINUX 7.3

5. ids 9.2 linux

6. Backup question (IDS 9.2 on Linux)

7. Pro*C,Clobs and OCI.H in a Linux environment

8. Oracle 8.0.6/NT showing leak (thread, handles, non-paged pool)

9. Multi-threading using Oracle 8i with the OCI interface

10. Thread, OCI and Oracle 8i

11. Oracle 9.2 Client/Server cnct to Oracle7 NOT Supported


 
Powered by phpBB® Forum Software