http://bugzilla.novell.com/show_bug.cgi?id=532568
User [email protected] added comment http://bugzilla.novell.com/show_bug.cgi?id=532568#c6 --- Comment #6 from Darren Davis <[email protected]> 2009-08-20 10:20:37 MDT --- Reposting the description for public view: I have created pair of test apps that contain the logic that I think is causing the problem; there's a client app (ProxyTest) and the server component(ServerLite). The server app creates a TCP listener, waits for XML commands and sends back an XML response (more details below). The client app connects to the server, sends a command, gets a response, disconnects and repeats. On windows, the app is successfully (and consistently) able to send 10,000 commands. Under Mono, its failing at 20 (consistently). The windows environment is VS2008 and .net 3.5 (hosted on windows server 2003). The Mono environment is 2.4.2.3 on the VMWARE image. Details on the App: ServerLite: Program.cs contains the bulk of the logic (I hacked it together from the standard build so apologies in advance on style). TestApp.Run: Creates 20 ProxyThreads; these are going to read xml commands from a network stream sent by the ProxyTest app. The ProxyReader class contains a method Read that waits for a signal indicating that it has a network stream to read from; it reads from the stream until the stream fails; it then releases the socket, closes it and then marks itself as free again and waits for the next signal indicating it should start. Run then creates _xmlProcessorThread = new Thread(new ThreadStart(ProcessASXmlRequest)); ProcessASXMLRequest (Process Application Service XML Request) dequeues the next command received from one of the client consumer apps, processes it and writes an XML response back on the network stream to the client app via the ProcessProxyMessage method (3 param overload). Run then creates _listenerThread = new Thread(new ThreadStart(ProxyListener)); ProxyListener listens for incoming TCP connections, Accepts them and selects one of the ProxyReader threads (the next free one) to handle the connection; it saves the Socket and network stream details in the ProxyReader structure and then signals for the ProxyReader to start (this mechanism reduces the overhead of continuously creating new threads) - this results in the thread looping in the ProxyReader.Read loop(see above). The ProxyTest application is pretty basic, it creates an instance of the Proxy and sends commands to the service and waits for a response via the LeakTest() method. public void Run() { for (int j = 0; j < 1000; j++) { Console.WriteLine("send Leaktest command"); this.LeakTest(255); Console.WriteLine("Leaktest response received"); } } I can run ProxyTest with j = 10,000 on Windows and this works fine. It fails on Mono at cycle 20 (the size of the proxythreads structure). The ProxyServer fails as follows: Expected Failure: ProcessASXmlRequest:(entry). Node Name = VQSystem.LeakTest.Request ProcessASXmlRequest:CoreLock obtained LeakTest accountId:255 not found Return:<?xml version="1.0" encoding="utf-16"?><VQProxy_XML_API><Version>5.0.36.0</Version><Response><VQ System.LeakTest.Response><ResultData><![CDATA[System.Xml.XmlDataDocument]]>< /ResultData><ReturnValue>OK</ReturnValue></VQSystem.LeakTest.Response></Resp onse></VQProxy_XML_API> ProcessASXmlRequest:(exit). Node Name = VQSystem.LeakTest.Request ProcessASXmlRequest:CoreLock released ProcessASXmlRequest:(entry). Node Name = VQSystem.LeakTest.Request ProcessASXmlRequest:CoreLock obtained LeakTest accountId:255 not found Return:<?xml version="1.0" encoding="utf-16"?><VQProxy_XML_API><Version>5.0.36.0</Version><Response><VQ System.LeakTest.Response><ResultData><![CDATA[System.Xml.XmlDataDocument]]>< /ResultData><ReturnValue>OK</ReturnValue></VQSystem.LeakTest.Response></Resp onse></VQProxy_XML_API> ProcessASXmlRequest:(exit). Node Name = VQSystem.LeakTest.Request ProcessASXmlRequest:CoreLock released ProxyListener:Exception:Argument cannot be null. Parameter name: s ProxyListener:Exception: at System.Int32.Parse (System.String s) [0x00000] at VQ.Proxy..ctor () [0x00000] at VQ.VQSystem.Trace (TraceModes traceMode, TraceLevel traceLevel, System.String component, System.String method, System.String message) [0x00000] at VQ.TraceHelper.Trace (TraceLevel level, System.String message, System.Exception ex) [0x00000] at VQ.TraceHelper.TraceFatal (System.String message, System.Exception ex) [0x00000] at VQ.FatalException..ctor (System.String Message) [0x00000] at VQ.TestApp.GetNextFreeProxyThread () [0x00000] at VQ.TestApp.ProxyListener () [0x00000] -- Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA contact for the bug. You are the assignee for the bug. _______________________________________________ mono-bugs maillist - [email protected] http://lists.ximian.com/mailman/listinfo/mono-bugs
