[Mono-bugs] [Bug 50049][Maj] New - MonoThread domain-specific handling broken

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Wed, 28 Jan 2004 10:45:15 -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 dick@ximian.com.

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

--- shadow/50049	2004-01-28 10:45:15.000000000 -0500
+++ shadow/50049.tmp.13879	2004-01-28 10:45:15.000000000 -0500
@@ -0,0 +1,53 @@
+Bug#: 50049
+Product: Mono/Runtime
+Version: unspecified
+OS: other
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: Unknown
+Priority: Major
+Component: misc
+AssignedTo: dick@ximian.com                            
+ReportedBy: lupus@ximian.com               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Summary: MonoThread domain-specific handling broken
+
+MonoThread is the unmanaged representation for the Thread object.
+The runtime should make sure the current MonoThread corresponds to the
+current domain, both in the finalizer thread and when appdomain changes
+happen. Currently, at least for the finalizer thread, the MonoThread object
+is not set, causing nullref exceptions when executing finalizers. If the
+object is not set correctly on domain changes it will cause random
+hard-to-track bugs, hence this is a major bug.
+
+------- Additional Comments From gonzalo@ximian.com  2003-10-23 14:20 -------
+Threads in the threadpol change the domain to the one of the
+IAsyncResult, but don't do anything else. What should I do?
+
+------- Additional Comments From dick@ximian.com  2004-01-28 10:45 -------
+I've been looking at rotor to see what happens there to Thread objects
+in differing domains.  I noticed that thread attribute changes such as
+Name were propagated through to other domains.
+
+The attached example (along with a patch to rotor to implement the
+internal call showing the object address, mono just needs obj_address
+in Object.cs turned public) shows that the Thread object is the same
+in different domains.
+
+
+Output from rotor:
+
+:; /home/dick/rotor/sscli/build/v1.x86chk.rotor/clix appcb-thr.exe
+Domain appcb-thr.exe reckons thread is called 
+Domain appcb-thr.exe: CurrentThread: 0x29067b60 (hc 0x2)
+Domain otherDomain reckons thread is called 
+Domain otherDomain: CurrentThread: 0x29067b60 (hc 0x2)
+Domain otherDomain reckons thread is called blah
+Domain otherDomain: CurrentThread: 0x29067b60 (hc 0x2)
+Domain appcb-thr.exe reckons thread is called blah
+Domain appcb-thr.exe: CurrentThread: 0x29067b60 (hc 0x2)
+
+