From: Maneesh Yadav <maneeshkyadav@gmail.com>
To: John Wiegley <jwiegley@gmail.com>
Cc: 21965@debbugs.gnu.org
Subject: bug#21965: 24.5; Emacs freezes when canceling at open file
Date: Tue, 24 Nov 2015 17:46:01 -0800 [thread overview]
Message-ID: <CAPsivR8CbrChXiZBvu=-UMAn9a1oQZDyX6NzE2eG+WzaEdiy9g@mail.gmail.com> (raw)
In-Reply-To: <m2si3uj1tt.fsf@newartisans.com>
For sure...let me make sure I can insert print statements into glib in
the context of my macports install (and get a little better
understanding of the glib event loop). Will write back once that is
up.
On Tue, Nov 24, 2015 at 5:38 PM, John Wiegley <jwiegley@gmail.com> wrote:
>>>>>> Maneesh Yadav <maneeshkyadav@gmail.com> writes:
>
>> I still am uncomfortable with my comprehension of the lldb output but here
>> is 'backtrace all' after triggering the condition
>
> Ok! Now we know what the deadlock situation is:
>
> Thread #2:
>
>> frame #3: 0x00000001009dd716 libglib-2.0.0.dylib`g_main_context_iteration + 55
> ...
>> frame #0: 0x00007fff8a8613fa libsystem_kernel.dylib`__select + 10
>
> Thread #1:
>
>> frame #3: 0x00000001009db284 libglib-2.0.0.dylib`g_main_context_acquire + 42
>
> It turns out that both g_main_context_acquire and g_main_context_iteration
> (when called with NULL) call LOCK_CONTEXT on the "default context".
>
> Now, I *think* the context should be different between these two threads: one
> should be the default context, and one should be the worker context. But it
> _looks_ like Thread #1 is being locked out by Thread #2.
>
> In fact, reading the glib code, if the call to g_once_init_enter returns FALSE
> within g_get_worker_context, then the worker context will be NULL! Which seems
> like a subtle bug waiting to happen, and might be what's biting us.
>
> 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.
>
> John
next prev parent reply other threads:[~2015-11-25 1:46 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-20 19:18 bug#21965: 24.5; Emacs freezes when canceling at open file Maneesh Yadav
2015-11-20 21:37 ` John Wiegley
2015-11-20 21:47 ` Maneesh Yadav
2015-11-20 21:55 ` John Wiegley
2015-11-20 22:07 ` Maneesh Yadav
2015-11-20 22:45 ` Maneesh Yadav
2015-11-20 23:26 ` John Wiegley
2015-11-20 23:32 ` Maneesh Yadav
2015-11-20 23:54 ` John Wiegley
2015-11-21 1:46 ` Maneesh Yadav
2015-11-21 7:29 ` Eli Zaretskii
2015-11-22 5:11 ` John Wiegley
2015-11-22 5:15 ` Maneesh Yadav
2015-11-23 21:29 ` Maneesh Yadav
2015-11-23 22:17 ` John Wiegley
2015-11-24 0:30 ` Maneesh Yadav
2015-11-24 3:39 ` Eli Zaretskii
2015-11-24 3:34 ` Eli Zaretskii
2015-11-24 3:39 ` John Wiegley
2015-11-24 22:51 ` Maneesh Yadav
2015-11-24 22:58 ` Maneesh Yadav
2015-11-25 1:02 ` John Wiegley
2015-11-25 1:15 ` Maneesh Yadav
2015-11-25 1:38 ` John Wiegley
2015-11-25 1:46 ` Maneesh Yadav [this message]
2015-11-25 1:50 ` John Wiegley
2015-11-25 18:49 ` Maneesh Yadav
2015-11-25 18:59 ` John Wiegley
2016-02-18 21:46 ` Maneesh Yadav
2016-02-20 2:40 ` John Wiegley
2020-08-31 2:11 ` Stefan Kangas
2020-08-31 2:25 ` Maneesh Yadav
2020-08-31 13:54 ` Stefan Kangas
2015-11-20 22:01 ` Eli Zaretskii
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAPsivR8CbrChXiZBvu=-UMAn9a1oQZDyX6NzE2eG+WzaEdiy9g@mail.gmail.com' \
--to=maneeshkyadav@gmail.com \
--cc=21965@debbugs.gnu.org \
--cc=jwiegley@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.