http://bugs.winehq.org/show_bug.cgi?id=30864
Bug #: 30864 Summary: Mono: Application hangs when calling AppDomain.Unload Product: Wine Version: 1.5.5 Platform: x86 OS/Version: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: -unknown AssignedTo: wine-bugs@winehq.org ReportedBy: vgr.subscription@gmail.com Classification: Unclassified
Created attachment 40426 --> http://bugs.winehq.org/attachment.cgi?id=40426 mono and wine test
I create AppDomain and when I calling AppDomain.Unload my application is hang up. I haven't this problem on Mono on Windows.
System: openSUSE 12.1 (i586) Mono-2.11 for Windows http://www.go-mono.com/mono-downloads/download.html
Tests Result: Mono on Linux: It works correctly.. Mono on Windows: It works correctly. Mono on Wine: Application hangs.
http://bugs.winehq.org/show_bug.cgi?id=30864
--- Comment #1 from Ivan Voyager vgr.subscription@gmail.com 2012-06-07 08:01:15 CDT --- Created attachment 40427 --> http://bugs.winehq.org/attachment.cgi?id=40427 App for test
http://bugs.winehq.org/show_bug.cgi?id=30864
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |download, source, testcase
http://bugs.winehq.org/show_bug.cgi?id=30864
--- Comment #2 from Ivan Voyager vgr.subscription@gmail.com 2012-06-08 03:10:48 CDT --- Mono source: https://github.com/mono/mono
In appdomain.c I found function "mono_domain_try_unload" with potential reason of hang up:
/*The managed callback finished successfully, now we start tearing down the appdomain*/ domain->state = MONO_APPDOMAIN_UNLOADING; /* * First we create a separate thread for unloading, since * we might have to abort some threads, including the current one. */ /* * If we create a non-suspended thread, the runtime will hang. * See: * http://bugzilla.ximian.com/show_bug.cgi?id=27663 */ #if 0 thread_handle = mono_create_thread (NULL, 0, unload_thread_main, &thread_data, 0, &tid); #else thread_handle = mono_create_thread (NULL, 0, (LPTHREAD_START_ROUTINE)unload_thread_main, &thread_data, CREATE_SUSPENDED, &tid); if (thread_handle == NULL) { return; } ResumeThread (thread_handle); #endif
/* Wait for the thread */ while ((res = WaitForSingleObjectEx (thread_handle, INFINITE, TRUE) == WAIT_IO_COMPLETION)) { if (mono_thread_internal_has_appdomain_ref (mono_thread_internal_current (), domain) && (mono_thread_interruption_requested ())) { /* The unload thread tries to abort us */ /* The icall wrapper will execute the abort */ CloseHandle (thread_handle); return; } } CloseHandle (thread_handle);
Maybe it will be helpful?
http://bugs.winehq.org/show_bug.cgi?id=30864
Alistair Leslie-Hughes leslie_alistair@hotmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |leslie_alistair@hotmail.com
http://bugs.winehq.org/show_bug.cgi?id=30864
--- Comment #3 from Vincent Povirk madewokherd@gmail.com 2012-06-13 16:24:24 CDT --- Works for me with wine-mono.
https://bugs.winehq.org/show_bug.cgi?id=30864
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution|--- |WORKSFORME
--- Comment #4 from Austin English austinenglish@gmail.com --- WORKSFORME.
https://bugs.winehq.org/show_bug.cgi?id=30864
Bruno Jesus 00cpxxx@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #5 from Bruno Jesus 00cpxxx@gmail.com --- Closing WORKSFORME bugs.