[Mono-bugs] [Bug 543207] New: Garbage collection breaks Oracle client
bugzilla_noreply at novell.com
bugzilla_noreply at novell.com
Wed Sep 30 12:42:02 EDT 2009
http://bugzilla.novell.com/show_bug.cgi?id=543207
User warren.puziewicz at realtimeworlds.com added comment
http://bugzilla.novell.com/show_bug.cgi?id=543207#c1
Summary: Garbage collection breaks Oracle client
Classification: Mono
Product: Mono: Class Libraries
Version: SVN
Platform: x86-64
OS/Version: RHEL 5
Status: NEW
Severity: Normal
Priority: P5 - None
Component: Sys.Data
AssignedTo: bnc-blr-team-mono at forge.provo.novell.com
ReportedBy: warren.puziewicz at realtimeworlds.com
QAContact: mono-bugs at lists.ximian.com
Found By: ---
Created an attachment (id=320503)
--> (http://bugzilla.novell.com/attachment.cgi?id=320503)
C# program to reproduce error
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-GB; rv:1.9.1.3)
Gecko/20090824 Firefox/3.5.3 (.NET CLR 3.5.30729)
We are building an application on Mono with an Oracle database. We are
currently using Mono 2.5 built from source in June. We recently started
testing the most recent build from source, and have discovered an issue between
garbage collection and the Oracle client. After a number of operations, a
bind parameter will have a few extra bytes of garbage appended. This does not
happen on the earlier build. It can be prevented on the latest build if the
environment variable GC_DONT_GC is set. Below is information on our
environment, a section of an Oracle client side trace file with the bad data
highlighted, code to reproduce the error.
Our platform is:
$ uname -s -r -v -p -i -o
Linux 2.6.18-92.1.13.el5 #1 SMP Wed Sep 24 19:32:05 EDT 2008 x86_64 x86_64
GNU/Linux
(Failure occurs on this version of Mono)
$ mono -V
Mono JIT compiler version 2.5 (/trunk/mono r142988 Wed Sep 30 13:19:23 BST
2009)
Copyright (C) 2002-2008 Novell, Inc and Contributors. www.mono-project.com
TLS: __thread
GC: Included Boehm (with typed GC and Parallel Mark)
SIGSEGV: altstack
Notifications: epoll
Architecture: amd64
Disabled: none
(Works fine on this version of Mono)
$ mono -V
Mono JIT compiler version 2.5 (/trunk/mono r137147 Tue Jun 30 14:46:43 BST
2009)
Copyright (C) 2002-2008 Novell, Inc and Contributors. www.mono-project.com
TLS: __thread
GC: Included Boehm (with typed GC and Parallel Mark)
SIGSEGV: altstack
Notifications: epoll
Architecture: amd64
Disabled: none
Oracle client libraries are: Instant Client 11.1.0.7.0 (x64)
==== The exception generated ====
Unhandled Exception: System.Data.OracleClient.OracleException: ORA-01722:
invalid number
at System.Data.OracleClient.Oci.OciStatementHandle.Execute (Boolean nonQuery,
Boolean useAutoCommit, Boolean schemaOnly) [0x00000]
at System.Data.OracleClient.Oci.OciStatementHandle.ExecuteNonQuery (Boolean
useAutoCommit) [0x00000]
at System.Data.OracleClient.OracleCommand.ExecuteNonQueryInternal
(System.Data.OracleClient.Oci.OciStatementHandle statement, Boolean
useAutoCommit) [0x00000]
at System.Data.OracleClient.OracleCommand.ExecuteNonQuery () [0x00000]
at (wrapper remoting-invoke-with-check)
System.Data.OracleClient.OracleCommand:ExecuteNonQuery ()
at ADOTest.Program.ExecSQLTest2 (Int32 numRows) [0x00000]
at ADOTest.Program.Main (System.String[] args) [0x00000]
==== Snippet from Oracle client trace file ====
2009-09-30 14:28:30.013678 : nsbasic_bsd:00 00 00 00 FE 40 49 4E |....þ@IN|
2009-09-30 14:28:30.013696 : nsbasic_bsd:53 45 52 54 20 49 4E 54 |SERT.INT|
2009-09-30 14:28:30.013723 : nsbasic_bsd:4F 20 64 61 74 61 5F 74 |O.data_t|
2009-09-30 14:28:30.013742 : nsbasic_bsd:65 73 74 20 28 63 6F 6C |est.(col|
2009-09-30 14:28:30.013770 : nsbasic_bsd:5F 6F 6E 65 2C 20 63 6F |_one,.co|
2009-09-30 14:28:30.013788 : nsbasic_bsd:6C 5F 74 77 6F 2C 20 63 |l_two,.c|
2009-09-30 14:28:30.013806 : nsbasic_bsd:6F 6C 5F 74 68 72 65 65 |ol_three|
2009-09-30 14:28:30.013824 : nsbasic_bsd:29 20 56 41 4C 55 45 53 |).VALUES|
2009-09-30 14:28:30.013842 : nsbasic_bsd:20 28 3A 70 31 2C 0A 20 |.(:p1,..|
2009-09-30 14:28:30.013860 : nsbasic_bsd:3A 70 32 2C 20 3A 70 33 |:p2,.:p3|
2009-09-30 14:28:30.013878 : nsbasic_bsd:29 00 01 00 00 00 01 00 |).......|
[snipped]
2009-09-30 14:28:30.014297 : nsbasic_bsd:00 07 03 31 32 33 04 34 |...123.4|
<= length of bind var includes the bad byte
2009-09-30 14:28:30.014315 : nsbasic_bsd:35 36 16 03 37 38 39 |56..789 |
<= extra byte of garbage data
Starting at the 3rd byte of the next to last line:
“03 31 32 33” = 3 bytes, values “123”
“04 34 35 36 16” = 4 bytes, values “456” + 1 garbage byte
“37 38 39” = 3 bytes, values “789”
In this case, the second parameter (value ‘456’) had an extra byte (0x16)
appended.
Reproducible: Always
Steps to Reproduce:
1. Compile attached program using "mcs program.cs -r:System.Data.OracleClient"
2. Create database table using 'create table' statement in header comments of
attached program.
3. mono program.exe 500 -- fails
4. GC_DONT_GC=YES mono program.exe 500 -- successful
Actual Results:
Unhandled Exception: System.Data.OracleClient.OracleException: ORA-01722:
invalid number
at System.Data.OracleClient.Oci.OciStatementHandle.Execute (Boolean nonQuery,
Boolean useAutoCommit, Boolean schemaOnly) [0x00000]
at System.Data.OracleClient.Oci.OciStatementHandle.ExecuteNonQuery (Boolean
useAutoCommit) [0x00000]
at System.Data.OracleClient.OracleCommand.ExecuteNonQueryInternal
(System.Data.OracleClient.Oci.OciStatementHandle statement, Boolean
useAutoCommit) [0x00000]
at System.Data.OracleClient.OracleCommand.ExecuteNonQuery () [0x00000]
at (wrapper remoting-invoke-with-check)
System.Data.OracleClient.OracleCommand:ExecuteNonQuery ()
at ADOTest.Program.ExecSQLTest2 (Int32 numRows) [0x00000]
at ADOTest.Program.Main (System.String[] args) [0x00000]
Expected Results:
Insert 500 rows into database.
Veerapuram Varadhan has sent me a patch that seems to have fixed the issue.
--
Configure bugmail: http://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