Subject: bug#21965: 24.5; Emacs freezes when canceling at open file

From: John Wiegley <[email-masked]>
Date: Tue, 24 Nov 2015 17:50:44 -0800

>>>>> Maneesh Yadav <[email-masked]> writes:

>> To go deeper, we may need to build a separate copy of glib and start
>> putting some print statements in to find out why there is lock contention.
>> Would you be up for that? I'd like to know if this is happening in
>> g_get_worker_context.

I've read further, and since "static gsize initialised;" must initialize to
zero, it's for me to see how this code could be wrong just from reading it.

I'd like to find every line of code in glib that calls LOCK_CONTEXT or
UNLOCK_CONTEXT, and print out:

    Function, file, line, lock or unlock, pointer value of context

That should help us narrow it down.

John