Heap/Memory corruption when an error occur with big ArrayBindCount
ogooliFeb 4 2005 — edited Feb 6 2006Hi,
We have a problem here with a process crashing or locking up sometimes while doing db access thru ODP.NET.
The symtopms are :
- the process simply hangs
- OR the process hangs while doing garbage collection
- OR the process returns -3000 internal error while trying to make an ODP call
The problem always happen after an ExecuteNonQuery is done on an OracleCommand object with a big ArrayBindCount (we use 500 usually) AND that ExecuteNonQuery fails for some reason (constraint, lock, etc...). In this case, ODP will try to concatenate the errors message for each line which can lead to a big error message. Here is a sample message :
ORA-24381: erreur(s) dans la zone DML
ORA-02290: violation de contraintes (OSIRIS.TOTO) de vérification
ORA-02290: violation de contraintes (OSIRIS.TOTO) de vérification
etc ... repeated many times
... And i think the problem is there. There seem to be some internal buffer used by ODP to construct this message and this buffer is not big enough sometimes or not dimensionned correctly thus leading to memory corruption.
For example I see this behaviour :
- with ArrayBindCount = 1. No problem at all
- with ArrayBindCount = 2. No problem either
- with ArrayBindCount = 10. The returned message is not always the same (does not always have detailed information for each line or contains GARBAGE data at some places)
- with ArrayBindCount = 100. With ODP 9.2.0.4.01 the process hangs. With ODP 10.1.0.3.01, it will fail with a NullReferenceException or OracleDataException here (in ODP.NET code) : GetOpoErrCtx(IntPtr opsErrCtx, OpoSqlValCtx* pOpoSqlValCtx, IntPtr opsConCtx, String dataSrc, String procedure). After all ODP commands (connect/disconnect/command) will return error 3000 (internal error).
Is there a workaround for this problem or a patch ?
Thanks for your help.
Olivier