[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#33198: 27.0.50; emacs_abort on EBADF during accept-process-output in
bug#33198: 27.0.50; emacs_abort on EBADF during accept-process-output in non-main thread
Tue, 30 Oct 2018 08:50:19 +0200
> From: Gemini Lasswell <address@hidden>
> 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.