[Mono-bugs] [Bug 67516][Blo] New - Resource consumption writing byte[] to Sql Image

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Mon, 4 Oct 2004 18:31:28 -0400 (EDT)


Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.

Changed by jeffret@bigfoot.com.

http://bugzilla.ximian.com/show_bug.cgi?id=67516

--- shadow/67516	2004-10-04 18:31:28.000000000 -0400
+++ shadow/67516.tmp.7015	2004-10-04 18:31:28.000000000 -0400
@@ -0,0 +1,67 @@
+Bug#: 67516
+Product: Mono: Class Libraries
+Version: unspecified
+OS: Windows XP
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Blocker
+Component: Sys.Data.SqlClient
+AssignedTo: rodrigo@novell.com                            
+ReportedBy: jeffret@bigfoot.com               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: Resource consumption writing byte[] to Sql Image
+
+Description of Problem:
+Our application writes a large amount of binary data to an IMAGE column
+within MS SQL Server. This works fine within the MS .NET framework. As I'm
+trying to get the application running under Mono, I discover that this
+operation consumes lots of system resources. Specifically, the Mono
+executable consumes huge amounts of memory (over 500 MB), the operation
+takes a long time, and ultimately Mono crashes.
+
+Here is the sequence of operations:
+A. Within C# code, we have a byte[] whose size varies from 1 byte up to
+about 64k bytes.
+B. Using System.Data and System.Data.SqlClient, we pass this byte array via
+a SqlCommand to a stored procedure on the SQL server.
+C. The stored procedure accepts the binary data as an IMAGE type parameter.
+D. The stored procedure inserts the input data into a table column
+containing IMAGE type.
+
+Steps to reproduce the problem:
+1. Establish a connection to a SQL Server database.
+2. Create a test table in the database. See the attached table creation
+script. Adjust the "use" statement as necessary for the correct test database.
+3. Create a stored procedure in the database. See the attached stored
+procedure creation script. Adjust the "use" statement as necessary for the
+correct test database.
+4. Create a connection to the test database. Insert the corresponding
+connection string into the variable "connStr" in the attached C# file
+MonoSqlImageTest.cs.
+5. Build MonoSqlImageTest against NUnit.
+6. Run MonoSqlImageTest inside NUnit. For comparison purposes, run the test
+under Mono and under MS .Net Framework.
+
+Actual Results:
+Under Mono, the operation takes a substantial amount of time and memory. As
+the size of the byte array increases, resource consumption climbs. As the
+size increases, Mono reaches a point where it hangs.
+
+See the attached Mono output results.
+
+Expected Results:
+Within the MS .Net Framework, resource consumption rises more linearly and
+reasonably. The operation is much faster. It can easily handle arrays up to
+64k in size.
+
+See the attached MS .NET Framework output results.
+
+How often does this happen? 
+Always. The actual array size at which Mono hangs seems to vary.
+
+Additional Information: