[Mono-bugs] [Bug 56327][Maj] New - Race condition in assembly loader code
bugzilla-daemon@bugzilla.ximian.com
bugzilla-daemon@bugzilla.ximian.com
Thu, 1 Apr 2004 03:56:37 -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 joergr@voelcker.com.
http://bugzilla.ximian.com/show_bug.cgi?id=56327
--- shadow/56327 2004-04-01 03:56:37.000000000 -0500
+++ shadow/56327.tmp.26948 2004-04-01 03:56:37.000000000 -0500
@@ -0,0 +1,70 @@
+Bug#: 56327
+Product: Mono: Runtime
+Version: unspecified
+OS: Suse 8.2
+OS Details:
+Status: NEW
+Resolution:
+Severity:
+Priority: Major
+Component: misc
+AssignedTo: mono-bugs@ximian.com
+ReportedBy: JoergR@voelcker.com
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: Race condition in assembly loader code
+
+Description of Problem:
+When trying to load the same assembly from different threads sometimes the
+message "Sending dummy where ... expected" is raised and the application
+crashes.
+
+Steps to reproduce the problem:
+1. Compile attached sample
+2. Run it
+
+Actual Results:
+Sending dummy where System.ComponentModel.Component expected
+
+Unhandled Exception: System.NullReferenceException: Object reference not
+set to an instance of an object
+in (unmanaged) /usr/local/lib/libmono.so.0(mono_class_from_typeref+0xe4)
+[0x400d0154]
+in (unmanaged) /usr/local/lib/libmono.so.0(mono_class_get+0xb4) [0x400d5604]
+in (unmanaged) /usr/local/lib/libmono.so.0 [0x400d4355]
+in (unmanaged) /usr/local/lib/libmono.so.0(mono_class_get+0xed) [0x400d563d]
+in (unmanaged) /usr/local/lib/libmono.so.0 [0x400d4355]
+in (unmanaged) /usr/local/lib/libmono.so.0(mono_class_get+0xed) [0x400d563d]
+in (unmanaged) /usr/local/lib/libmono.so.0(mono_class_from_name+0x109)
+[0x400d5969]
+in (unmanaged) /usr/local/lib/libmono.so.0 [0x4008449a]
+in (unmanaged) /usr/local/lib/libmono.so.0(mono_reflection_get_type+0x26)
+[0x400844f6]
+in (unmanaged) /usr/local/lib/libmono.so.0 [0x40094dc1]
+in <0x00056> System.Reflection.Assembly:GetType (string,bool,bool)
+in <0x00066> System.Activator:CreateInstance
+(string,string,bool,System.Reflection.BindingFlags,System.Reflection.Binder,object[],System.Globalization.CultureInfo,object[],System.Security.Policy.Evidence)
+in <0x0006c> System.Activator:CreateInstance (string,string,object[])
+in <0x00042> System.Activator:CreateInstance (string,string)
+in <0x00031> Test:Worker ()
+in <0x00052> (wrapper delegate-invoke) System.MulticastDelegate:invoke_void ()
+
+
+Expected Results:
+Created type: System.Management.ManagementObject
+Created type: System.Management.ManagementObject
+Created type: System.Management.ManagementObject
+Created type: System.Management.ManagementObject
+Created type: System.Management.ManagementObject
+Created type: System.Management.ManagementObject
+Created type: System.Management.ManagementObject
+Created type: System.Management.ManagementObject
+Created type: System.Management.ManagementObject
+Created type: System.Management.ManagementObject
+
+How often does this happen?
+Sometimes. On my test machine this happens for approximately 10% of all calls.
+
+Additional Information: