[Mono-bugs] [Bug 72832][Maj] New - Problems Remoting on Fedora C2

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Mon, 21 Feb 2005 20:28:59 -0500 (EST)


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 rbradley@fusiion.com.

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

--- shadow/72832	2005-02-21 20:28:59.000000000 -0500
+++ shadow/72832.tmp.30830	2005-02-21 20:28:59.000000000 -0500
@@ -0,0 +1,188 @@
+Bug#: 72832
+Product: Mono: Class Libraries
+Version: 1.1
+OS: other
+OS Details: Fedora C2
+Status: NEW   
+Resolution: 
+Severity: Unknown
+Priority: Major
+Component: System
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: rbradley@fusiion.com               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: Problems Remoting on Fedora C2
+
+Please fill in this template when reporting a bug, unless you know what 
+you are doing.
+Description of Problem:
+I have written a TCPChannel Server which registers two services.  When 
+the server is started it errors - This same code run on Window Servers.  
+They are access by clients on Windows XP Pro workstations.
+
+Steps to reproduce the problem:
+1. Start server will error immeditaly
+2. 
+3. 
+
+Actual Results:
+
+Unhandled Exception: System.NullReferenceException: Object reference not 
+set to an instance of an object
+in [0x00007] (at /home/cvs/1-
+mono/mcs/class/corlib/System.Runtime.Remoting/WellKnownServiceTypeEntry.cs
+:47) System.Runtime.Remoting.WellKnownServiceTypeEntry:.ctor 
+(System.Type,string,System.Runtime.Remoting.WellKnownObjectMode)
+in [0x00003] (at /home/cvs/1-
+mono/mcs/class/corlib/System.Runtime.Remoting/RemotingConfiguration.cs:284
+) 
+System.Runtime.Remoting.RemotingConfiguration:RegisterWellKnownServiceType
+ (System.Type,string,System.Runtime.Remoting.WellKnownObjectMode)
+in <0x0007d> RemotingSamples.Sample:Main (string[])
+
+Expected Results:
+waits for client connection
+
+How often does this happen? 
+every time
+
+Additional Information:
+If I remove one of the services in the server - it seem to work ok
+
+
+Server Code:
+using System;
+using System.Runtime.Remoting;
+using System.Runtime.Remoting.Channels;
+using System.Runtime.Remoting.Channels.Tcp;
+
+namespace RemotingSamples {
+	public class Sample {
+
+		public static int Main(string [] args) {
+			TcpChannel chan = new TcpChannel(8085);
+			ChannelServices.RegisterChannel(chan);
+
+			RemotingConfiguration.RegisterWellKnownServiceType
+(
+				Type.GetType
+("RemotingSamples.HelloServer,object"),
+				"SayHello", 
+WellKnownObjectMode.SingleCall);
+
+      		RemotingConfiguration.RegisterWellKnownServiceType(
+				Type.GetType
+("RemotingSamples.HiServer,object"),
+				"SayHi", WellKnownObjectMode.SingleCall);
+
+			System.Console.WriteLine("Hit <enter> to 
+exit...");
+			System.Console.ReadLine();
+			return 0;
+		}
+	}
+}
+Shared Code:
+using System;
+using System.Runtime.Remoting;
+using System.Runtime.Remoting.Channels;
+using System.Runtime.Remoting.Channels.Tcp;
+
+namespace RemotingSamples {
+	public class HelloServer : MarshalByRefObject {
+
+		public HelloServer() {
+			Console.WriteLine("HelloServer activated");
+		}
+
+		public String HelloMethod(String name) {
+			Console.WriteLine("Hello.HelloMethod : {0}", 
+name);
+			return "Hi there " + name;
+		}
+	}
+
+	public class HiServer : MarshalByRefObject {
+
+		public HiServer() {
+			Console.WriteLine("HiThereSever activated");
+		}
+
+		public string HiMethod(string name) {
+			Console.WriteLine("HiServer.HiMethod : {0}", 
+name);
+			return "Hi there " + name;
+		}
+	}
+}
+
+Client 1 Code:
+using System;
+using System.Runtime.Remoting;
+using System.Runtime.Remoting.Channels;
+using System.Runtime.Remoting.Channels.Tcp;
+
+namespace RemotingSamples {
+	public class Client {
+
+		public static int Main(string [] args) {
+			TcpChannel chan = new TcpChannel();
+			ChannelServices.RegisterChannel(chan);
+			HelloServer obj =
+				(HelloServer)Activator.GetObject(
+					typeof
+(RemotingSamples.HelloServer),
+				
+	"tcp://192.168.0.112:8085/SayHello");
+			if (obj == null)
+				System.Console.WriteLine("Could not 
+locate server");
+			else {
+				for (int i = 0; i < 1000; i++)
+					Console.WriteLine(obj.HelloMethod
+("Caveman"));
+			}
+			return 0;
+		}
+	}
+}
+
+Client 2 code:
+sing System;
+using System.Runtime.Remoting;
+using System.Runtime.Remoting.Channels;
+using System.Runtime.Remoting.Channels.Tcp;
+
+namespace RemotingSamples {
+	public class Client {
+
+		public static int Main(string [] args) {
+			TcpChannel chan = new TcpChannel();
+			ChannelServices.RegisterChannel(chan);
+			HiServer obj =
+				(HiServer)Activator.GetObject(
+					typeof(RemotingSamples.HiServer),
+					"tcp://192.168.0.112:8085/SayHi");
+			if (obj == null)
+				System.Console.WriteLine("Could not 
+locate server");
+			else {
+				for (int i = 0; i < 1000; i++)
+					Console.WriteLine(obj.HiMethod
+("Jane"));
+			}
+			return 0;
+		}
+	}
+}
+
+Mono information:
+Mono JIT compiler version 1.0.5, (C) 2002-2004 Novell, Inc and 
+Contributors. www.go-mono.com
+        TLS:           normal
+        GC:            Included Boehm (with typed GC)
+        SIGSEGV      : normal
+        Globalization: ICU