[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.

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

--- 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   
+Resolution: 
+Severity: 
+Priority: Normal
+Component: XSP
+AssignedTo: gonzalo at ximian.com                            
+ReportedBy: gallarr at hotmail.com               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+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 1.1.8.3, 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
+CREATE PROCEDURE spTest
+(
+	 @p1 nvarchar(510)
+	, at p2 nvarchar(510)
+	, at p3 nvarchar(510)
+	, at p4 nvarchar(510)
+) AS
+BEGIN
+	RETURN
+END
+
+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
+SETTINGS
+SqlConnection conn=new
+SqlConnection("server=dataserver;user=sa;password=sa;database=master;");
+SqlCommand cm=new SqlCommand();
+conn.Open();
+cm.Connection=conn;
+cm.CommandText="spTest";
+cm.CommandType=CommandType.StoredProcedure;
+//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
+strings
+//510 bytes long each
+SqlParameter parm1=new SqlParameter("@p1",SqlDbType.NVarChar,510);
+parm1.Value=val;
+SqlParameter parm2=new SqlParameter("@p2",SqlDbType.NVarChar,510);
+parm2.Value=val;
+SqlParameter parm3=new SqlParameter("@p3",SqlDbType.NVarChar,510);
+parm3.Value=val;
+SqlParameter parm4=new SqlParameter("@p4",SqlDbType.NVarChar,510);
+parm4.Value=val;		
+cm.Parameters.Add(parm1);
+cm.Parameters.Add(parm2);
+cm.Parameters.Add(parm3);
+cm.Parameters.Add(parm4);
+//now try to run the procedure
+Console.WriteLine("testing");
+cm.ExecuteNonQuery(); //this line will not be surpassed
+Console.WriteLine("done");
+
+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 1.1.8.3). 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? 
+Always
+
+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
+./mono-1.1.10/lib/mono/2.0/Mono.Data.SqliteClient.dll
+./mono-1.1.10/lib/mono/1.0/Mono.Data.SqliteClient.dll
+./mono-1.1.10/lib/mono/gac/Mono.Data.SqliteClient
+./mono-1.1.10/lib/mono/gac/Mono.Data.SqliteClient/1.0.5000.0__0738eb9f132ed756
+./mono-1.1.10/lib/mono/gac/Mono.Data.SqliteClient/1.0.5000.0__0738eb9f132ed756/Mono.Data.SqliteClient.dll
+./mono-1.1.10/lib/mono/gac/Mono.Data.SqliteClient/1.0.5000.0__0738eb9f132ed756/Mono.Data.SqliteClient.dll.mdb
+./mono-1.1.10/lib/mono/gac/Mono.Data.SqliteClient/2.0.3600.0__0738eb9f132ed756
+./mono-1.1.10/lib/mono/gac/Mono.Data.SqliteClient/2.0.3600.0__0738eb9f132ed756/Mono.Data.SqliteClient.dll
+./mono-1.1.10/lib/mono/gac/Mono.Data.SqliteClient/2.0.3600.0__0738eb9f132ed756/Mono.Data.SqliteClient.dll.mdb
+With the ones at the mono-1.1.8.3 folder but got the same results, so my
+guess is not a matter of the SQL Client libraries.
+
+This is the timeout error message
+xsp
+Listening on port: 8080 (non-secure)
+Listening on address: 0.0.0.0
+Root directory: /root/WebApplication1
+Hit Return to stop the server.
+testing
+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.HttpApplication:System.Web.IHttpAsyncHandler.BeginProcessRequest
+(System.Web.HttpContext context, System.AsyncCallback cb, System.Object
+extraData)
+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)
+Mono.WebServer.XSPApplicationHost:ProcessRequest
+(int,long,int,long,int,string,string,string,string,byte[],string,intptr,Mono.WebServer.SslInformations)
+in (wrapper xdomain-dispatch)
+Mono.WebServer.XSPApplicationHost:ProcessRequest
+(object,byte[]&,byte[]&,int,long,int,long,int,string,string,string,string,byte[],string)
+
+Exception rethrown at [0]:
+
+in (wrapper xdomain-invoke)
+Mono.WebServer.XSPApplicationHost:ProcessRequest
+(int,long,int,long,int,string,string,string,string,byte[],string,intptr,Mono.WebServer.SslInformations)
+in (wrapper remoting-invoke-with-check)
+Mono.WebServer.XSPApplicationHost:ProcessRequest
+(int,long,int,long,int,string,string,string,string,byte[],string,intptr,Mono.WebServer.SslInformations)
+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