Tables with XMLTYPE-Column, growing virtual memory...

Discussion of open issues, suggestions and bugs regarding ODAC (Oracle Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
stefanmeisner
Posts: 6
Joined: Thu 24 Nov 2005 17:39
Location: Vienna, Austria

Tables with XMLTYPE-Column, growing virtual memory...

Post by stefanmeisner » Thu 24 Nov 2005 17:55

Hello!
We have upgraded our product to ODAC 5.55.1.24 and do encounter a major problem. To verify I do have created the most simple project using ODAC-components: it does use a TOraSession and a TOraTable. After connecting to the database, the table will be opened, I am iterating over each record: "while not table.eof do table.next;" Afterwards the table is closed. And that's almost all ;-)
Now it turns out, that the TaskManager as well as Sysinternals ProcessExplorer do report growing virtual memory usage each time the table is opened, the loop is executed and the table closed again in case there's a column of XMLType involved.
There's definitely no leak within the delphi-code involved and it's also not a problem of memory-fragmentation. My only guess is, that these memory-allocations do happen inside one of the DLLs used by ODAC (oci.dll?) which would turn out to be a bug (maybe some resources are allocated by ODAC but never deallocated or so...)
Please let me know, if you do have any hints!
Greetings
Stefan Meisner

stefanmeisner
Posts: 6
Joined: Thu 24 Nov 2005 17:39
Location: Vienna, Austria

Post by stefanmeisner » Thu 24 Nov 2005 19:42

Maybe I should mention: the virtual memory only grows, if the XMLTYPE columns do contain data; if they are NULL: everything is okay. However: I am even not retrieving the content of the field (eg Field.AsString or similar).
Version of OCI.dll is 9.2.0.1.
Greetings
Stefan Meisner

Alex
Posts: 655
Joined: Mon 08 Nov 2004 08:39

Post by Alex » Fri 25 Nov 2005 17:25

We got your request and now examines the problem.
Unfortunately now we couldn't give you any information.
As soon as we solve the problem, we'll let you know.

Aufhauser
Posts: 56
Joined: Mon 21 Nov 2005 09:44
Location: Herzogenburg, Austria

Post by Aufhauser » Sat 26 Nov 2005 10:44

I have the same memory problems using a table with a field of type MDSYS.SDO_GEOMETRY (geometry field for oracle spatial). Perhaps this problems have the same source.

stefanmeisner
Posts: 6
Joined: Thu 24 Nov 2005 17:39
Location: Vienna, Austria

Post by stefanmeisner » Wed 30 Nov 2005 11:59

Hello!
Do you already have found a solution or at least could tell me, when this issue will be fixed? We are desperately waiting :-)
Regards
Stefan Meisner

Alex
Posts: 655
Joined: Mon 08 Nov 2004 08:39

Post by Alex » Thu 01 Dec 2005 08:02

We are analyzing this problem; it will be fixed it in the nearest future. The main difficulty is that Oracle client XML implementation is different from one version to another. Some of these versions have memory leak bug internally (i.e. 9.2.0.1), others require specific approach to work.
We implement most version compatible solution, but it seems that with some Oracle clients we got unsatisfactory results.

Alex
Posts: 655
Joined: Mon 08 Nov 2004 08:39

Post by Alex » Wed 07 Dec 2005 13:17

The new ODAC build (5.55.1.25) has fix for this problem, but for Oracle client versions from 9.2.0.4 till 10g. In previous versions there is a bug that causes memory leaks - you can check this using SQL*Plus utility. As to the 10g and newer Oracle client versions, we could reproduce memory leak problem using Oracle 10g ODP driver.

stefanmeisner
Posts: 6
Joined: Thu 24 Nov 2005 17:39
Location: Vienna, Austria

Post by stefanmeisner » Wed 07 Dec 2005 13:38

Great work! Thank you :-)
9.2.0.4 is ok for me as I have found a strange behavior with 9.2.0.1 which resulted in an ""ORA-03118: two-task coroutine has invalid state", but I have not been able to extract the root of the problem (I only do know it happens in conjunction with fields of type XMLFIELD).
When will the build be available?

Alex
Posts: 655
Joined: Mon 08 Nov 2004 08:39

Post by Alex » Wed 07 Dec 2005 14:00

I think tomorrow. I will post announcement on the forum.

Post Reply