unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#17561: 24.4.50; Emacs can forget processes
@ 2014-05-23 15:52 Jorgen Schaefer
  2014-05-23 16:28 ` bug#17561: " Paul Eggert
  0 siblings, 1 reply; 33+ messages in thread
From: Jorgen Schaefer @ 2014-05-23 15:52 UTC (permalink / raw)
  To: 17561

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.





^ permalink raw reply	[flat|nested] 33+ messages in thread

end of thread, other threads:[~2014-05-30 21:29 UTC | newest]

Thread overview: 33+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-05-23 15:52 bug#17561: 24.4.50; Emacs can forget processes Jorgen Schaefer
2014-05-23 16:28 ` bug#17561: " 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

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).