emacs-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[debbugs-tracker] bug#17561: closed (24.4.50; Emacs can forget processes


From: GNU bug Tracking System
Subject: [debbugs-tracker] bug#17561: closed (24.4.50; Emacs can forget processes)
Date: Fri, 30 May 2014 21:30:04 +0000

Your message dated Fri, 30 May 2014 14:29:36 -0700
with message-id <address@hidden>
and subject line Re: bug#17561: Emacs can forget processes
has caused the debbugs.gnu.org bug report #17561,
regarding 24.4.50; Emacs can forget processes
to be marked as done.

(If you believe you have received this mail in error, please contact
address@hidden)


-- 
17561: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=17561
GNU Bug Tracking System
Contact address@hidden with problems
--- Begin Message --- Subject: 24.4.50; Emacs can forget processes Date: Fri, 23 May 2014 17:52:35 +0200
>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.



--- End Message ---
--- Begin Message --- Subject: Re: bug#17561: Emacs can forget processes Date: Fri, 30 May 2014 14:29:36 -0700 User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.5.0
On 05/30/2014 01:41 PM, Jorgen Schaefer wrote:
So I would assume that this bug is fixed, and if I come across weird
behavior again, I'll create a new report or re-open this one.

Thanks, closing the bug.

Possibly related, while trying to reproduce the bug, I have noticed
some other strange behavior. I managed to reduce it to the following
reproduction code:

(with-temp-buffer
   (let ((proc (start-process "test" (current-buffer) "bash" "-c"
                              "echo foo ; sleep 5")))
     (set-process-query-on-exit-flag proc nil)
     (accept-process-output nil 2)))

This hangs my normal Emacs for 2 seconds. A newly-started Emacs returns
immediately. I*suspect*  that this is a timing issue, and strace
*seems*  to concur - Emacs reads the "foo" from the subprocess before
running accept-process-output, and then just hangs for the two second
timeout, instead of noticing that there already was some output. Should
I create a new bug report for this?

Yes, please. It'd be nice to get an strace of Emacs, particularly where it goes wrong (which may be well before the symptoms start being visible).


--- End Message ---

reply via email to

[Prev in Thread] Current Thread [Next in Thread]