[Mono-dev] Mono hangs on shutdown when /dev/ttySx ports were opened.

Leszek Ciesielski skolima at gmail.com
Thu Sep 17 11:39:30 EDT 2009

2009/9/17 Kornél Pál <kornelpal at gmail.com>:
> Hi,
> Zoltan Varga wrote:
>>  The runtime tries to abort all threads and waits for them to terminate,
>> so if a thread refuses
>> to die for some reason, the runtime will hang. Its possible that the
> This hang has occurred or different reasons and was reported several times.
> Is there a specific reason that prevents us from terminating all the threads
> on exit?
> MS.NET simply kills all the threads and usually the finally blocks aren't
> even executed on exit.
> Kornél


in this case it does not seem to be a simple 'hang'. All of the
threads our application starts finish as expected (handling the
ThreadAbortException and Dispose()ing objects where needed). All those
threads run until the end of the expected methods (currently verified
with progress logging using Console.WriteLine ). However, sometimes
during the shutdown, a single thread gets 'resurrected', resuming
execution from the point where it did recieve ThreadAbortException
which caused it to finish properly just milliseconds before!


More information about the Mono-devel-list mailing list