[Mono-bugs] [Bug 61602][Nor] New - Webclient hangs after a random count of serialized requests

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Thu, 15 Jul 2004 09:54:08 -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 rasa@gmx.ch.

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

--- shadow/61602	2004-07-15 09:54:08.000000000 -0400
+++ shadow/61602.tmp.10054	2004-07-15 09:54:08.000000000 -0400
@@ -0,0 +1,74 @@
+Bug#: 61602
+Product: Mono: Class Libraries
+Version: unspecified
+OS: 
+OS Details: self compiled
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Normal
+Component: System
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: rasa@gmx.ch               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: Webclient hangs after a random count of serialized requests
+
+Description of Problem:
+Webclient hangs after a random count of serialized requests. It turned out
+that it doesnt depend on the response to the request, so dont be surprised
+about the try section in the testcase its only the same situation i have in
+my real app where the problem occured.
+
+Steps to reproduce the problem:
+1. compile the testcase
+2. run the testcase
+3. wait till it hangs (usually after 10 to 20 tries)
+
+Actual Results:
+testcase hangs after a random count of requests
+
+Expected Results:
+testcase should run forever
+
+How often does this happen? 
+always
+
+Additional Information:
+check "netstat -A inet" for socket states.
+
+Testcase:
+// Testcase to motivate a hang when using the WebClient Class
+// Raffaele Sandrini <rasa@gmx.ch>
+
+using System;
+using System.Net;
+
+class WebClientTestcase
+{
+	public static void Main ()
+	{
+		string query = null;
+		int count = 0;
+		
+		while(true)
+		{
+			query = "http://www.google.ch/" + count.ToString();
+			Console.WriteLine("Processing " + query + " ...");
+			try
+			{
+				using (WebClient wc = new WebClient())
+				{
+					wc.DownloadData(query);
+				}
+			}
+			catch (WebException e) {}
+			count++;
+		}
+	}
+}
+
+cheers,
+Raffaele