[Mono-bugs] [Bug 675144] Apparent threading issue with KnownTypeCollection

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Thu Mar 10 03:44:01 EST 2011


https://bugzilla.novell.com/show_bug.cgi?id=675144

https://bugzilla.novell.com/show_bug.cgi?id=675144#c3


Atsushi Enomoto <aenomoto at novell.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
          Component|WCF                         |CORLIB
         AssignedTo|atsushi at ximian.com          |mono-bugs at lists.ximian.com

--- Comment #3 from Atsushi Enomoto <aenomoto at novell.com> 2011-03-10 08:44:00 UTC ---
After fixing couple of serialization differences on server side (already in git
master/mono-2-10), I get to see this exception at most (not 100% reproducible,
but about 20-50% ratio):

System.NullReferenceException: Object reference not set to an instance of an
object
  at System.Array.Copy (System.Array sourceArray, Int32 sourceIndex,
System.Array destinationArray, Int32 destinationIndex, Int32 length) [0x00104]
in /home/atsushi/svn/mono/mcs/class/corlib/System/Array.cs:975 
  at System.Collections.ArrayList.CopyTo (Int32 index, System.Array array,
Int32 arrayIndex, Int32 count) [0x0002d] in
/home/atsushi/svn/mono/mcs/class/corlib/System.Collections/ArrayList.cs:3064 
  at System.Collections.ArrayList.CopyTo (System.Array array, Int32 arrayIndex)
[0x00000] in
/home/atsushi/svn/mono/mcs/class/corlib/System.Collections/ArrayList.cs:3046 
  at System.MonoCustomAttrs.GetCustomAttributes (ICustomAttributeProvider obj,
System.Type attributeType, Boolean inherit) [0x0028f] in
/home/atsushi/svn/mono/mcs/class/corlib/System/MonoCustomAttrs.cs:252 
  at System.Reflection.MonoMethod.GetCustomAttributes (System.Type
attributeType, Boolean inherit) [0x00000] in
/home/atsushi/svn/mono/mcs/class/corlib/System.Reflection/MonoMethod.cs:283 
  at System.Runtime.Serialization.SerializationMap..ctor (System.Type type,
System.Xml.XmlQualifiedName qname,
System.Runtime.Serialization.KnownTypeCollection knownTypes) [0x0006d] in
/home/atsushi/svn/mono/mcs/class/System.Runtime.Serialization/System.Runtime.Serialization/SerializationMap.cs:112 

This NRE should not really happen as WCF serializer merely invokes
MethodInfo.GetCustomAttributes(bool) which could be also invoked in different
threads (I guess I'm right here, on that I don't have to instantiate Type or
MethodInfo objects for each thread).

I still don't see the exact exception in KnownTypeCollection, but I have added
some locks on modifying the collection, so it may be fixed on WCF side.

-- 
Configure bugmail: https://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.


More information about the mono-bugs mailing list