[Mono-bugs] [Bug 572783] New: Socket async io thread not cleaned up properly when mono_jit_cleanup() is called

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Thu Jan 21 15:23:36 EST 2010


http://bugzilla.novell.com/show_bug.cgi?id=572783

http://bugzilla.novell.com/show_bug.cgi?id=572783#c0


           Summary: Socket async io thread not cleaned up properly when
                    mono_jit_cleanup() is called
    Classification: Mono
           Product: Mono: Runtime
           Version: 2.6.x
          Platform: x86
        OS/Version: Windows Vista
            Status: NEW
          Severity: Critical
          Priority: P5 - None
         Component: io-layer
        AssignedTo: lupus at novell.com
        ReportedBy: amir at unity3d.com
         QAContact: mono-bugs at lists.ximian.com
          Found By: Customer
           Blocker: No


Created an attachment (id=338108)
 --> (http://bugzilla.novell.com/attachment.cgi?id=338108)
Patch that includes a repro case and potential bug fix

Description of Problem:
Initially, this bug came in as a browser crash with the Unity player. The
developer was using async socket requests from managed code. When the window
with the Unity content was closed, Unity shut down and cleaned up mono in the
process, however, the async io request thread was still running even after mono
had shut down.

I was able to recreate the problem in a standard application using the "teste"
sample. I also have proposed a patch that seems to fix the problem, however,
probably needs a seasoned mono dev to review the changes and make the fix more
robust.


Steps to reproduce the problem:
1. Apply the patch to the 2.6.1 packaged source distribution.
2. Comment out changes to mini.c and gc.c.
3. Compile the test.cs with mcs.
4. Build the "teste" sample and run with the assembly from #3.
5. Watch it go boom. It's a timing issue, so if it doesn't happen the first
time, then after a few repeated attempts it should.
6. Comment back in the changes in mini.c and gc.c and re-run test.


Actual Results:
Crash in async_io thread.

Expected Results:
Mono shuts down and all threads properly.

How often does this happen? 
Frequently

Additional Information:
My observations as a "newb" to Mono code:
* the domain was not signaled as being unloaded during a mini_cleanup()
* async_invoke_io_thread may need additional synchronization for cleanup if
mono_thread_pool_remove_domain_jobs() is not sufficient

-- 
Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.


More information about the mono-bugs mailing list