https://bugzilla.novell.com/show_bug.cgi?id=665956
https://bugzilla.novell.com/show_bug.cgi?id=665956#c0 Summary: HttpWebRequest exhaust threads Classification: Mono Product: Mono: Runtime Version: 2.8.x Platform: x86-64 OS/Version: Windows 7 Status: NEW Severity: Critical Priority: P5 - None Component: io-layer AssignedTo: [email protected] ReportedBy: [email protected] QAContact: [email protected] Found By: --- Blocker: --- User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:2.0b9) Gecko/20100101 Firefox/4.0b9 Consecutive calls HttpWebRequest GetResponse results in mono crashing with a messagebox with the title "Fatal error in gc" and the text "too many threads". The error could be isolated using a minimal program that does only loops like 10 times a second, instantiate an HttpWebRequest and call either GetResponse or BeginGetResponse result in the error after 50-250 http calls. Was detected on several machines, with different hardware, all using windows 7. Tested on Windows 2008 Server and everything run fine on that OS (although all hardware where virtualized). Tested also using Mono 1.2.5 without errors on any plataform. Reproducible: Always Steps to Reproduce: 1. On windows 7 make a loop that 2. instantiate an object of HttpWebRequest 3. call GetResponse or BeginGetResponse Actual Results: Mono crash after 50-250 calls Expected Results: Keep running forever // sample program, crashes every time on Windows 7 using System; using System.IO; using System.Net; using System.Threading; public class Test { public void Main(string[] args) { int count = 0; while (true) { string url = "http://www.google.com.br/"; var request = (HttpWebRequest)WebRequest.Create(url); request.Timeout = 10000; HttpWebResponse response = null; try { response = (HttpWebResponse)request.GetResponse(); } catch (WebException e) { Console.WriteLine("exception: " + e.ToString()); continue; } var reader = new StreamReader(response.GetResponseStream()); string data = reader.ReadToEnd(); reader.Dispose(); // also tried "close" Console.WriteLine("call count so far: " + count++); Thread.Sleep(50); } } } -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA contact for the bug. _______________________________________________ mono-bugs maillist - [email protected] http://lists.ximian.com/mailman/listinfo/mono-bugs
