From: Jorgen Schaefer <contact@jorgenschaefer.de>
To: 17561@debbugs.gnu.org
Subject: bug#17561: 24.4.50; Emacs can forget processes
Date: Fri, 23 May 2014 17:52:35 +0200 [thread overview]
Message-ID: <8738g0bigs.fsf@loki.jorgenschaefer.de> (raw)
From time to time, my Emacs tends to become very slow. I have tracked
this down to a weird interaction with certain processes.
Sometimes, when a process dies (e.g. after its buffer is killed), Emacs
apparently does not clean up correctly. The sentinel is called, the
process itself receives a termination signal, but the process object
still shows up in M-x list-processes, and there is a zombie process in
ps.
When this happens, Emacs is in a tight loop trying to read from the dead
process(es):
21:24:00.948071 pselect6(12, [3 4 9 11], [], NULL, {0, 1376013},
{NULL, 8}) = 2 (in [9 11], left {0, 1373467})
<0.000011>
21:24:00.948529 read(9, "", 4096) = 0 <0.000009>
21:24:00.948564 read(11, "", 4096) = 0 <0.000008>
Killing the processes in M-x list-processes using
`process-menu-delete-process' returns Emacs to a usable state, albeit
the zombie processes stay around.
I have been able to reliably reproduce the behavior using this snippet:
(with-temp-buffer
(let ((process-connection-type t))
(set-process-query-on-exit-flag
(start-process "cat" (current-buffer) "cat")
nil)))
I.e. create a buffer, associate a process with it, remove the query on
exit flag, and kill the buffer. The `process-connection-type' nil is the
relevant part. With t, it works correctly.
The snippet does *not* work on a freshly-started Emacs. A random time
after the bug shows up, Emacs also cleans up the zombie processes and
the bug can not be triggered anymore. Until a whole while later, it
shows up again.
I have seen this happen in 24.3.50, 24.3.91 (pretest 2), and current
trunk.
next reply other threads:[~2014-05-23 15:52 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-23 15:52 Jorgen Schaefer [this message]
2014-05-23 16:28 ` bug#17561: Emacs can forget processes Paul Eggert
2014-05-23 16:44 ` Jorgen Schaefer
2014-05-24 23:01 ` Paul Eggert
2014-05-25 7:57 ` Jorgen Schaefer
2014-05-26 17:08 ` Paul Eggert
2014-05-26 18:49 ` Jorgen Schaefer
2014-05-26 23:58 ` Paul Eggert
2014-05-27 18:27 ` Jorgen Schaefer
2014-05-27 21:42 ` Paul Eggert
2014-05-27 22:16 ` Jorgen Schaefer
2014-05-28 0:47 ` Paul Eggert
2014-05-28 20:53 ` Jorgen Schaefer
2014-05-28 23:00 ` Paul Eggert
2014-05-28 23:35 ` Jorgen Schaefer
2014-05-29 1:22 ` Paul Eggert
2014-05-29 10:08 ` Jorgen Schaefer
2014-05-29 23:15 ` Paul Eggert
2014-05-29 4:17 ` Paul Eggert
2014-05-29 11:39 ` Jorgen Schaefer
2014-05-29 15:09 ` Paul Eggert
2014-05-29 15:22 ` Andreas Schwab
2014-05-29 15:26 ` Paul Eggert
2014-05-29 17:03 ` Jorgen Schaefer
2014-05-29 17:55 ` Andreas Schwab
2014-05-29 18:23 ` Jorgen Schaefer
2014-05-29 19:06 ` Jorgen Schaefer
2014-05-29 20:27 ` Andreas Schwab
2014-05-29 19:15 ` Andreas Schwab
2014-05-30 6:07 ` Paul Eggert
2014-05-30 20:41 ` Jorgen Schaefer
2014-05-30 21:29 ` Paul Eggert
2014-05-27 4:05 ` Paul Eggert
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=8738g0bigs.fsf@loki.jorgenschaefer.de \
--to=contact@jorgenschaefer.de \
--cc=17561@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 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.