unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Stephen Leake <stephen_leake@stephe-leake.org>
To: 18420@debbugs.gnu.org
Subject: bug#18420: 24.3; interaction with external process hangs emacs
Date: Mon, 08 Sep 2014 22:10:26 -0500	[thread overview]
Message-ID: <85a969zdy5.fsf@stephe-leake.org> (raw)
In-Reply-To: <85egvmyrlx.fsf@stephe-leake.org> (Stephen Leake's message of "Mon, 08 Sep 2014 12:00:42 -0500")

More info from the debugger on the hung emacs. There are 6 threads active:

thread 6 : gdb interface
thread 5 : child process reader_thread
    used by select emulation to check for child process output
    can't see contents of 'cp' object; optimized out
        the only child process of this emacs instance is the external
        parser; ada_mode_wisi_parse

    hung at "Wait until our input is acknowledged before reading again"
        waiting for 'select()' to ack?

thread 4 : windows message handler
thread 3 : itimer thread
thread 2 : waiting on some startup?
thread 1 : main, runing lisp code, process_send_string, emacs_full_write, sys_write _write
    sys_write can only be interrupted by interrupts/signals
    emacs_full_write checks for that, handles them
    should allow for read write, unless it there's a race condition

So there is a deadlock:

thread 5 is waiting for thread 1 to ack
thread 1 is waiting for child process to read
child process is waiting for thread 5 to read
                
We need to understand how we get here.

-- 
-- Stephe





  reply	other threads:[~2014-09-09  3:10 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-07  8:04 bug#18420: 24.3; interaction with external process hangs emacs stephen_leake
2014-09-07 15:38 ` Eli Zaretskii
2014-09-09  4:18   ` Stephen Leake
2014-09-09 14:26     ` Eli Zaretskii
2014-09-09 21:54       ` Stephen Leake
2014-09-08 17:00 ` Stephen Leake
2014-09-09  3:10   ` Stephen Leake [this message]
2014-09-09 14:17     ` Eli Zaretskii
2014-09-09 21:48       ` Stephen Leake
2014-09-14 15:20         ` Eli Zaretskii
2014-09-09 14:30   ` 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

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=85a969zdy5.fsf@stephe-leake.org \
    --to=stephen_leake@stephe-leake.org \
    --cc=18420@debbugs.gnu.org \
    /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 public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).