[Mono-bugs] [Bug 76778][Nor] New - XSP locks while communicating with SQLServer

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Mon Nov 21 05:40:25 EST 2005

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 gallarr at hotmail.com.


--- shadow/76778	2005-11-21 05:40:24.000000000 -0500
+++ shadow/76778.tmp.5846	2005-11-21 05:40:24.000000000 -0500
@@ -0,0 +1,162 @@
+Bug#: 76778
+Product: Mono: Tools
+Version: 1.1
+OS: Red Hat 9.0
+OS Details: i386
+Status: NEW   
+Priority: Normal
+Component: XSP
+AssignedTo: gonzalo at ximian.com                            
+ReportedBy: gallarr at hotmail.com               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+Summary: XSP locks while communicating with SQLServer
+Description of Problem:
+Whenever there is too much information (about 2kb) in the parameters passed
+to a stored procedure XSP will hang. I don't know if this is an issue with
+mono itself, XSP, or the database libraries. It worked fine with mono
+version, but has been broken since 1.1.9. (I use SQL Server 2000 sp4)
+Steps to reproduce the problem:
+here you have a full example
+1.First the SQL stored procedure
+	 @p1 nvarchar(510)
+	, at p2 nvarchar(510)
+	, at p3 nvarchar(510)
+	, at p4 nvarchar(510)
+) AS
+2. now the code to run it, put this code somewhere in a ASP.NET C# page
+//create the database objects BE SURE TO CHANGE IT TO MATCH YOUR CONNECTION
+SqlConnection conn=new
+SqlCommand cm=new SqlCommand();
+//variable that will have 510 "a" letters, I do it on a loop
+string val="";
+for(int i=0;i<510;i++)
+	val=val+"a";
+//create the parameters that will cause the process not to work, 4 nvarchar
+//510 bytes long each
+SqlParameter parm1=new SqlParameter("@p1",SqlDbType.NVarChar,510);
+SqlParameter parm2=new SqlParameter("@p2",SqlDbType.NVarChar,510);
+SqlParameter parm3=new SqlParameter("@p3",SqlDbType.NVarChar,510);
+SqlParameter parm4=new SqlParameter("@p4",SqlDbType.NVarChar,510);
+//now try to run the procedure
+cm.ExecuteNonQuery(); //this line will not be surpassed
+3. Compile and run XSP
+Actual Results:
+When the ExecuteNonQuery() line is reached the code will stop, without
+actually giving an error message, after a minute or two I get a timeout
+error (pasted later). If you would put less information in the "val"
+variable (for example 50 byte long strings) the procedure will execute
+properly (chage the FOR loop to 50 instead of 510 and run it again, it will
+work). Or if you drop the 4th parameter, it would also work, so it looks
+like a matter of too much information being passed, maybe a buffer overflow
+(again, it worked fine with version I actually discovered this
+with a 20 parameters procedure, one of them being an varbinary array, when
+that parameter would be empty, the procedure would run, when it would
+filled the code would stop at "cm.ExecuteNonQuery();"
+Expected Results:
+It should keep running, but it stops
+How often does this happen? 
+Additional Information:
+These testes were made in Fedora Core 4 x86_64 and Redhat 9 i386 with both
+SQL Server 2000 Personal / Server. I got the same results in both
+environments (mono version was 1.1.10/i386, bitrock installer)
+I tried replacing these files/folders
+With the ones at the mono- folder but got the same results, so my
+guess is not a matter of the SQL Client libraries.
+This is the timeout error message
+Listening on port: 8080 (non-secure)
+Listening on address:
+Root directory: /root/WebApplication1
+Hit Return to stop the server.
+Tick caught an exception that has not been propagated:
+System.Threading.ThreadAbortException: Thread was being aborted
+in <0x011a0> System.Web.HttpApplication+<Pipeline>__1:MoveNext ()
+in <0x0001f> System.Web.HttpApplication:Tick ()
+System.Threading.ThreadAbortException: Thread was being aborted
+Server stack trace:
+in <0x000bc> System.Web.HttpApplication:Tick ()
+in <0x0003e> System.Web.HttpApplication:Start (System.Object x)
+in <0x00068>
+(System.Web.HttpContext context, System.AsyncCallback cb, System.Object
+in <0x001ab> System.Web.HttpRuntime:RealProcessRequest (System.Object o)
+in <0x0002c> System.Web.HttpRuntime:ProcessRequest
+(System.Web.HttpWorkerRequest wr)
+in <0x0000a> Mono.WebServer.MonoWorkerRequest:ProcessRequest ()
+in <0x00043> Mono.WebServer.BaseApplicationHost:ProcessRequest
+(Mono.WebServer.MonoWorkerRequest mwr)
+in <0x0037f> Mono.WebServer.XSPApplicationHost:ProcessRequest (Int32 reqId,
+Int64 localEPAddr, Int32 localEPPort, Int64 remoteEPAdds, Int32
+remoteEPPort, System.String verb, System.String path, System.String
+queryString, System.String protocol, System.Byte[] inputBuffer,
+System.String redirect, IntPtr socket, Mono.WebServer.SslInformations ssl)
+in (wrapper remoting-invoke-with-check)
+in (wrapper xdomain-dispatch)
+Exception rethrown at [0]:
+in (wrapper xdomain-invoke)
+in (wrapper remoting-invoke-with-check)
+in <0x00563> Mono.WebServer.XSPWorker:InnerRun (System.Object state)
+in <0x00022> Mono.WebServer.XSPWorker:Run (System.Object state)
+To me this is a blocker, I can't run at all database-based applications.
+Recategorize it as such if you feel so.

More information about the mono-bugs mailing list