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

Rodrigo Kumpera kumpera at gmail.com
Fri Nov 7 18:02:03 EST 2008


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-devel-list/attachments/20081107/3fabb18e/attachment-0001.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: take2.diff
Type: text/x-patch
Size: 8745 bytes
Desc: not available
Url : http://lists.ximian.com/pipermail/mono-devel-list/attachments/20081107/3fabb18e/attachment-0001.bin 


More information about the Mono-devel-list mailing list