unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Gemini Lasswell <gazally@runbox.com>
Cc: 33198@debbugs.gnu.org
Subject: bug#33198: 27.0.50; emacs_abort on EBADF during accept-process-output in non-main thread
Date: Tue, 30 Oct 2018 08:50:19 +0200	[thread overview]
Message-ID: <83lg6gkjx0.fsf@gnu.org> (raw)
In-Reply-To: <87d0rsjteo.fsf@runbox.com> (message from Gemini Lasswell on Mon,  29 Oct 2018 15:10:39 -0700)

> From: Gemini Lasswell <gazally@runbox.com>
> Date: Mon, 29 Oct 2018 15:10:39 -0700
> 
> I've hit the emacs_abort at line 5510 in process.c a few times in the
> last week.  I haven't found a way to make it reproduce on demand.  I
> tried to narrow the code it's happening in down to a smaller test case,
> without success.  I'd appreciate suggestions for how to track down what
> is going wrong.

I suggest to instrument the code that determines which thread will
listen to what descriptors in its pselect call.  This happens inside
compute_input_wait_mask and compute_non_keyboard_wait_mask, and the
data those use is set by several add_*_fd functions.  The
instrumentation should output the descriptor, the thread ID, and what
is it used for.  Then I think you will be able to see where did the
bad descriptor come from, and how it happened to be bad.

You will also need to determine which descriptor is the bad one; the
usual paradigm to do that is by calling 'fcntl (fd, F_GETFD)' on each
descriptor on which pselect was asked to wait, and see which ones
return -1 with erno = EBADFD.





  reply	other threads:[~2018-10-30  6:50 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-29 22:10 bug#33198: 27.0.50; emacs_abort on EBADF during accept-process-output in non-main thread Gemini Lasswell
2018-10-30  6:50 ` Eli Zaretskii [this message]
2021-02-02 15:02   ` Lars Ingebrigtsen

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=83lg6gkjx0.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=33198@debbugs.gnu.org \
    --cc=gazally@runbox.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 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).