[Mono-bugs] [Bug 421491] "Could not allocate new OCI Handle of type Statement" message when accessing Oracle
bugzilla_noreply at novell.com
bugzilla_noreply at novell.com
Mon Aug 8 11:02:19 EDT 2011
https://bugzilla.novell.com/show_bug.cgi?id=421491
https://bugzilla.novell.com/show_bug.cgi?id=421491#c10
--- Comment #10 from Dan McFadyen <danm at cryptocard.com> 2011-08-08 15:02:16 UTC ---
Thanks for the information Jean-Philippe. I have just been informed that the
amount of time I have to keeping looking into this now has a hard deadline so I
might be making use of it. But in the mean time I hope to help as much as I
can.
I have reduced the test case to something that reproduces it for me with no
proprietary code. I have been in contact with Chris Brown from the posts above
and sadly the same test does not reproduce it on his system. There is hope
though. My environment is the currently available Mono openSUSE VM.
Note: The code that I use to reproduce this bug explicitly leaks connections.
Yes, I am aware that this shouldn't be done, but this isn't the only way to
reproduce the bug as from my conversations with Chris we have confirmed a case
where it happens without leaking connections, and I can leak connections
without hitting the problem. In this case it's just the first easy way I found
to reproduce the bug.
Details:
- OS: openSUSE VM with mono 2.10.2
- Mono exact: 2.10.2 (Mon Apr 18 15:10:34 UTC 2011) x86
- Oracle Instant Client: 11.2-basiclite
For reference, testing against Oracle 11G 11.1.7.0 on another server.
-----------Contents of aspx file start----------------
<%@ Import namespace="System.Data.OracleClient" %>
<%
try
{
OracleConnection conn = new OracleConnection("Data Source=O11G;User
ID=;Password= ");
conn.Open();
{
using (OracleCommand cmd = conn.CreateCommand())
{
cmd.CommandText = "SELECT 1 FROM dual";
cmd.ExecuteScalar();
cmd.CommandText = "SELECT 2 FROM dual";
cmd.ExecuteScalar();
}
}
//conn.Close();
}
catch (Exception ex)
{
%><%=ex.Message + Environment.NewLine + ex.StackTrace%><%
}
%>
-------------Contents End-------------------
And in the Web.config under
<System.Web><compilation><assemblies>
Add
<add assembly="System.Data.OracleClient, Version=2.0.0.0"/>
It will take 5 refreshes to that page to get the error reproduced, but it's
been a consistent 5 times for me.
After talking with Chris Brown a few more times he pointed me to the trace
messages in System.Data.OracleClient.Oci.OciCalls.cs. I took advantage of this
and modified the OCIHandleAlloc call so that it printed out information about
all the parameters provided. The error is caused because the IntPtr parenth is
null.
If more information is required or the test case I have provided doesn't work
on a system you have available, I can remove all of our code from the VM and
package it up so that you can have the exact environment I was using to
reproduce it.
--
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
More information about the mono-bugs
mailing list