[Mono-bugs] [Bug 74839][Min] New - PPC Runtime problem

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Thu, 5 May 2005 15:37:56 -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 gst@sysfrog.org.

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

--- shadow/74839	2005-05-05 15:37:56.000000000 -0400
+++ shadow/74839.tmp.30220	2005-05-05 15:37:56.000000000 -0400
@@ -0,0 +1,172 @@
+Bug#: 74839
+Product: Mono: Runtime
+Version: 1.1
+OS: 
+OS Details: Debian unstable/testing on PowerPC (IBook G3)
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Minor
+Component: JIT
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: gst@sysfrog.org               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: PPC Runtime problem
+
+Description of Problem:
+
+I've found some .NET code which works fine on Mono 1.1 x86 and on .NET on
+Windows, but which has some problems on Mono 1.1 PPC. Unfortunately one of
+the files which is required to reproduce the problem is only available as
+binary. I think the problem has something to do with the Weak References
+which are used in the code - these parts of the code are available as
+Source too.
+
+Steps to reproduce the problem:
+1. Download corso-serialization-0.1.0.tar.gz from
+http://stud3.tuwien.ac.at/~e9926584/CorsoSerialization.html - this is a
+Serialization Package for the .NET Client Library of the "CORSO shared
+object space" server (which is available at: http://www.tecco.at/en/).
+Unfortunately the included DotNetCo32.dll isn't available as sourcecode -
+the source for the other files is available.
+2. Optionally run make.
+3. Run SerializationTest1a.exe & SerializationTest1b.exe - each with the
+following arguments: test test test eris.sysfrog.org 5006
+
+Actual Results:
+SerializationTest1a.exe:
+Connection ok
+creating/getting named oid - ok
+writing data to named oid - ok
+14 [16384] DEBUG Corso.Lang.Serialization.StructCorsoSerializer  -
+deserializing field classByReference with
+Corso.Lang.Serialization.OidCorsoSerializer
+140 [16384] DEBUG Corso.Lang.Serialization.DefaultOidObjectMapper  -
+deserializing from <1713402942/0-0-299-4/1029344918> 0
+142 [16384] DEBUG Corso.Lang.Serialization.DefaultOidObjectMapper  - found
+existing object MyClass
+reading named oid - ok
+i = 777, s = Hello everybody!, d = 6.666
+arr[0] = 4
+arr[1] = 3
+arr[2] = -2
+arr[3] = 1
+
+Unhandled Exception: System.ObjectDisposedException: The object was used
+after being disposed.
+in <0x0007c> System.Net.Sockets.TcpClient:CheckDisposed ()
+in <0x000a0> System.Net.Sockets.TcpClient:GetStream ()
+
+SerializationTest1b.exe:
+
+Connection ok
+creating/getting named oid - ok
+14 [16384] DEBUG Corso.Lang.Serialization.StructCorsoSerializer  -
+deserializing field classByReference with
+Corso.Lang.Serialization.OidCorsoSerializer
+139 [16384] DEBUG Corso.Lang.Serialization.DefaultOidObjectMapper  -
+deserializing from <1713402942/0-0-299-4/1029344918> 0
+Exception: System.IndexOutOfRangeException: Array index is out of range.
+in <0x000dc> WeakHashtable:FindKey (System.Object key)
+in <0x0006c> WeakHashtable:set_Item (System.Object key, System.Object value)
+in <0x001bc> Corso.Lang.Serialization.DefaultOidObjectMapper:ObjectForOid
+(Corso.Lang.CorsoOid oid, System.Type type, Corso.Lang.CorsoConnection conn)
+in <0x00154> Corso.Lang.Serialization.OidCorsoSerializer:Deserialize
+(System.Object obj, System.Type type, Corso.Lang.CorsoData data)
+in <0x00340>
+Corso.Lang.Serialization.StructCorsoSerializer:GetNonNullObject
+(System.Object obj, System.Type type, Corso.Lang.CorsoData data)
+in <0x000bc> Corso.Lang.Serialization.StructCorsoSerializer:Deserialize
+(System.Object obj, System.Type type, Corso.Lang.CorsoData data)
+in <0x00044> Corso.Lang.Serialization.CorsoAutoSerialized:Read
+(Corso.Lang.CorsoData data)
+in <0x00058> Corso.Lang.CorsoOid:ReadShareable (CorsoShareable value,
+Corso.Lang.CorsoTransaction tx, Int32 timeout)
+in <0x00314> SerializationTest:Main (System.String[] args)
+in <0x000dc> WeakHashtable:FindKey (System.Object key)
+in <0x0006c> WeakHashtable:set_Item (System.Object key, System.Object value)
+in <0x001bc> Corso.Lang.Serialization.DefaultOidObjectMapper:ObjectForOid
+(Corso.Lang.CorsoOid oid, System.Type type, Corso.Lang.CorsoConnection conn)
+in <0x00154> Corso.Lang.Serialization.OidCorsoSerializer:Deserialize
+(System.Object obj, System.Type type, Corso.Lang.CorsoData data)
+in <0x00340>
+Corso.Lang.Serialization.StructCorsoSerializer:GetNonNullObject
+(System.Object obj, System.Type type, Corso.Lang.CorsoData data)
+in <0x000bc> Corso.Lang.Serialization.StructCorsoSerializer:Deserialize
+(System.Object obj, System.Type type, Corso.Lang.CorsoData data)
+in <0x00044> Corso.Lang.Serialization.CorsoAutoSerialized:Read
+(Corso.Lang.CorsoData data)
+in <0x00058> Corso.Lang.CorsoOid:ReadShareable (CorsoShareable value,
+Corso.Lang.CorsoTransaction tx, Int32 timeout)
+in <0x00314> SerializationTest:Main (System.String[] args)
+
+
+Expected Results:
+
+SerializationTest1a.exe:
+
+Connection ok
+creating/getting named oid - ok
+writing data to named oid - ok
+6 [-1210277216] DEBUG Corso.Lang.Serialization.StructCorsoSerializer  -
+deserializing field classByReference with
+Corso.Lang.Serialization.OidCorsoSerializer
+21 [-1210277216] DEBUG Corso.Lang.Serialization.DefaultOidObjectMapper  -
+deserializing from <1713402942/0-0-304-4/1029344918> 0
+22 [-1210277216] DEBUG Corso.Lang.Serialization.DefaultOidObjectMapper  -
+found existing object MyClass
+reading named oid - ok
+i = 777, s = Hello everybody!, d = 6.666
+arr[0] = 4
+arr[1] = 3
+arr[2] = -2
+arr[3] = 1
+
+SerializationTest1b.exe:
+
+Connection ok
+creating/getting named oid - ok
+6 [-1210277216] DEBUG Corso.Lang.Serialization.StructCorsoSerializer  -
+deserializing field classByReference with
+Corso.Lang.Serialization.OidCorsoSerializer
+21 [-1210277216] DEBUG Corso.Lang.Serialization.DefaultOidObjectMapper  -
+deserializing from <1713402942/0-0-304-4/1029344918> 0
+29 [-1210277216] DEBUG Corso.Lang.Serialization.StructCorsoSerializer  -
+deserializing field orderedData with
+Corso.Lang.Serialization.StructCorsoSerializer
+31 [-1210277216] DEBUG Corso.Lang.Serialization.StructCorsoSerializer  -
+deserializing field i with Corso.Lang.Serialization.PrimitiveCorsoSerializer
+34 [-1210277216] DEBUG Corso.Lang.Serialization.StructCorsoSerializer  -
+deserializing field d with Corso.Lang.Serialization.PrimitiveCorsoSerializer
+36 [-1210277216] DEBUG Corso.Lang.Serialization.StructCorsoSerializer  -
+deserializing field s with Corso.Lang.Serialization.StringCorsoSerializer
+38 [-1210277216] DEBUG Corso.Lang.Serialization.StructCorsoSerializer  -
+deserializing field arr with Corso.Lang.Serialization.ListCorsoSerializer
+reading named oid - ok
+i = 777, s = Hello everybody!, d = 6.666
+arr[0] = 4
+arr[1] = 3
+arr[2] = -2
+arr[3] = 1
+
+How often does this happen? 
+
+Every time.
+
+Additional Information:
+
+After I tried with a different version of the DotNetCo32.dll, the
+exceptions which occured in SerializationTest1b.exe occured in
+SerializationTest1a.exe if I run the code on PowerPC (on both 1.1.6 and
+1.1.7). If I copy the binaries to X86 and run them there everything works
+fine. On .NET on win32 there aren't any problems too.
+
+It seems that i can prevent the problem when exchanging the "if (obj ==
+null) {" with "if ((obj == null) && ((GCHandle)obj).IsAllocated) {" on line
+648 in src/CorsoSerialization.cs.
+
+If the server on eris.sysfrog.org port 5006 shouldn't be reachable anymore
+please contact me on gst@sysfrog.org.