Page 1 of 1

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

Posted: Thu 24 Nov 2005 17:55
by stefanmeisner
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

Posted: Thu 24 Nov 2005 19:42
by stefanmeisner
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

Posted: Fri 25 Nov 2005 17:25
by Alex
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.

Posted: Sat 26 Nov 2005 10:44
by Aufhauser
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.

Posted: Wed 30 Nov 2005 11:59
by stefanmeisner
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

Posted: Thu 01 Dec 2005 08:02
by Alex
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.

Posted: Wed 07 Dec 2005 13:17
by Alex
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.

Posted: Wed 07 Dec 2005 13:38
by stefanmeisner
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?

Posted: Wed 07 Dec 2005 14:00
by Alex
I think tomorrow. I will post announcement on the forum.