[Mono-dev] [PATCH] appdomain-unload crashes

Zoltan Varga vargaz at gmail.com
Sun Nov 9 15:19:23 EST 2008


Hi,

  Looks good. Isn't there a race between the check:
+			if (domain->state == MONO_APPDOMAIN_UNLOADED || domain->state ==
MONO_APPDOMAIN_UNLOADING) {
and the
+				mono_thread_push_appdomain_ref (domain);
call ?

               Zoltan

2008/11/8 Rodrigo Kumpera <kumpera at gmail.com>:
>
>
> On Fri, Nov 7, 2008 at 3:24 PM, Rodrigo Kumpera <kumpera at gmail.com> wrote:
>>
>>
>> On Fri, Nov 7, 2008 at 3:00 PM, Gonzalo Paniagua Javier
>> <gonzalo.mono at gmail.com> wrote:
>>>
>>> On Fri, 2008-11-07 at 13:32 -0200, Rodrigo Kumpera wrote:
>>> > Hey guys,
>>> >
>>> > The attached patch fixes the appdomain unloading problem. I can no
>>> > longer get the
>>> > test to crash here.
>>> [...]
>>>
>>> I see 2 problems. One which you already pointed out about not executing
>>> the last element. I'm not sure that we should even try to execute it, as
>>> MS documentation says that no new threads are allowed to use the domain
>>> that is unloading and, I guess, we can add that not thread in the
>>> threadpool should switch to use the dying domain.
>>
>> The job when "remaining_jobs == 0" must be executed as this happens under
>> normal
>> conditions when the queue gets emptied.
>
>
>
> The attached patch has the following improvements:
>
> - add cleanup logic to io jobs.
> - don't allow new TB jobs once appdomain shutdown starts. This is consistent
> with 3.5 SP1 behavior
> and makes your unload.cs test pass - I'll add it to our suite.
> -clear ares_htable as the jobs are removed.
>
>
> This patch still passes all tests in mono/mono/tests and the xsp2 test you
> suggested.
>
> Cheers,
> Rodrigo
>
> _______________________________________________
> Mono-devel-list mailing list
> Mono-devel-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-devel-list
>
>


More information about the Mono-devel-list mailing list