[Mono-bugs] [Bug 74618][Cri] New - The error is generated when a remoting call is made from a client

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Fri, 15 Apr 2005 10:10:14 -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 sunvenk@hotmail.com.


--- shadow/74618	2005-04-15 10:10:14.000000000 -0400
+++ shadow/74618.tmp.14919	2005-04-15 10:10:14.000000000 -0400
@@ -0,0 +1,97 @@
+Bug#: 74618
+Product: Mono: Class Libraries
+Version: 1.1
+OS Details: Windows XP Service pack 1, with mono 1.1 and MS CLR  .NET Framework version 1.0.3705
+Status: NEW   
+Priority: Critical
+Component: System
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: sunvenk@hotmail.com               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+Summary: The error is generated when a remoting call is made from a client
+Please fill in this template when reporting a bug, unless you know what 
+you are doing.
+Description of Problem:
+I have a remoting server running on mono listening on a port. 
+It has a method to load assembly from a byte array.
+When a client running on MS CLR calls up this remoting server method
+and gives a valid byte array( read from a valid assembly file)
+error is generated by a newly introduced statement in Accept
+method in Socket.cs. The assignment statement 
+"accepted.Blocking = this.Blocking ;"
+is newly introduced in the latest release.
+If I comment the above line then it works fine.
+Steps to reproduce the problem:
+1. Compile the Interface by csc /t:library IMyInterface.cs
+2. Compile the server by csc /r:IMyInterface.dll MyMainClass.cs
+3. Compile the client by csc /r:IMyInterface.dll Client.cs
+4. start the server by mono MyMainClass.exe
+5. Copy/Create a number of( > 200 ) .Net assemblies ( dlls ) 
+    and copy to the same direcotory.
+6. start the client by Client.exe
+Actual Results:
+Error is thrown in client when number of assemblies are more than 200
+Stack at the time of error throw is
+------------------- Start error stack -----------------------------
+Unhandled Exception: System.Net.Sockets.SocketException: An existing 
+connection was forcibly closed
+by the remote host
+Server stack trace:
+   at System.Net.Sockets.Socket.Receive(Byte[] buffer, Int32 offset, Int32 
+size, SocketFlags socketF
+   at System.Runtime.Remoting.Channels.SocketStream.Read(Byte[] buffer, 
+Int32 offset, Int32 size)
+   at System.Runtime.Remoting.Channels.SocketHandler.ReadFromSocket(Byte[] 
+buffer, Int32 offset, Int
+32 count)
+   at System.Runtime.Remoting.Channels.SocketHandler.BufferMoreData()
+   at System.Runtime.Remoting.Channels.SocketHandler.Read(Byte[] buffer, 
+Int32 offset, Int32 count)
+   at System.Runtime.Remoting.Channels.SocketHandler.ReadAndMatchFourBytes
+(Byte[] buffer)
+   at 
+on(UInt16& operatio
+   at 
+   at 
+(IMessage msg, ITran
+sportHeaders requestHeaders, Stream requestStream, ITransportHeaders& 
+responseHeaders, Stream& respo
+   at 
+ge(IMessage msg)
+Exception rethrown at [0]:
+   at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage
+(IMessage reqMsg, IMessage retMsg
+   at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& 
+msgData, Int32 type)
+   at MyNameSpace.IMyInterface.LoadMe(Byte[] objAssembly)
+   at MyClientNameSpace.MyClientClass.Main(String[] args)
+------------------- End error stack -----------------------------
+Expected Results:
+No error
+How often does this happen? 
+Additional Information:
+If the line "accepted.Blocking = this.Blocking ;"
+is commented in Accept method, then it works fine.