Subject: Re: bug#12832: 24.3.50; Emacs lockup when idle

From: Andy Moreton <[email-masked]>
Date: Tue, 13 Nov 2012 16:40:29 +0000

On 13/11/2012 16:35, Eli Zaretskii wrote:
>> Date: Tue, 13 Nov 2012 16:00:30 +0000
>> From: Andy Moreton <[email-masked]>
>> CC: [email-masked], [email-masked], [email-masked]
>>
>> The fact that thread 236140 is at ThreadStartRoutine makes me wonder if this
>> is related to the perils of DllMain (i.e. the loader lock).
>
> Sorry, I don't follow.  Can you say more about this problem, or point
> me to some accessible documentation about it?

The DllMain notifications for process and thread create/destroy are called 
with the (system internal) loader lock held. This means that anything called 
from these routines should not use locks, or deadlock is possible. So I was 
wondering if the thread manipulation for timer handling is interacting with 
those mechanisms.

Of course I don't know nearly enough about Win32 to actually say much useful 
here, so the actual problem is probably something else entirely.

     AndyM