http://bugzilla.novell.com/show_bug.cgi?id=528830
User [email protected] added comment http://bugzilla.novell.com/show_bug.cgi?id=528830#c19 --- Comment #19 from Romain Tartière <[email protected]> 2009-11-07 08:56:53 MST --- Created an attachment (id=326144) --> (http://bugzilla.novell.com/attachment.cgi?id=326144) Workaround for AppDomain.Unload hang on FreeBSD Hum.. I added once more quite a lot of debugging printf through the code where the code hangs, in the loop in mono_domain_try_unload: ----8<--------------- while ((res = WaitForSingleObjectEx (thread_handle, INFINITE, TRUE) == WAIT_IO_COMPLETION)) { if (mono_thread_has_appdomain_ref (mono_thread_current (), domain) && (mono_thread_interruption_requested ())) { ----8<--------------- I noted that when the framework hangs, both function call in the if statement returns 0. Displaying the thread running progress, I can see this for example: -------8<----------- .. UNLOAD STARTING FOR DeadInvokeTest (0x824a00) IN THREAD 0x8028021c0. BEFORE INVOKE BEFORE DOMAIN_SET BEFORE CREATE THREAD AFTER RESUME THREAD ===> Wow! Unhandled event! mono_thread_current () = 0x82ee00 domain = 0x824a00 mono_thread_has_appdomain_ref (...) = 0 mono_thread_interruption_requested (...) = 0 thread_data.failure_reason = 0x0 [THREAD] START [THREAD] mono_thread_attach [THREAD] mono_threads_abort_appdomain_threads [THREAD] mono_thread_pool_remove_domain_jobs [THREAD] mono_domain_finalize [THREAD] mono_loader_lock [THREAD] mono_domain_lock (0x824a00) [THREAD] mono_domain_unlock (0x824a00) [THREAD] mono_loader_unlock [THREAD] mono_threads_clear_cached_culture [THREAD] FREE 1 [THREAD] FREE 2 [THREAD] FREE 3 [THREAD] Yay, returning! -------8<----------- Interestingly, when the framework is hanging displaying the group of lines after "Wow", I saw that the value of domain->friendly_name switches from the actual friendly name to NULL after a while. Returning in this particualr situation seems to fix the problem in this test and does not triggers regressions as far as I can see. I attached this workaround to this bug. Any keys about what can be happening would be cool. Thanks -- Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA contact for the bug. _______________________________________________ mono-bugs maillist - [email protected] http://lists.ximian.com/mailman/listinfo/mono-bugs
