emacs-devel
[Top][All Lists]
Advanced

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

Re: Strange Emacs "hiccup" bug


From: Jorgen Schaefer
Subject: Re: Strange Emacs "hiccup" bug
Date: Fri, 23 May 2014 16:22:32 +0200

Some update on this bug, as I was able to reproduce it *temporarily*.

On Sat, 10 May 2014 22:13:51 +0200
Jorgen Schaefer <address@hidden> wrote:

> At some point, apparently after some time of continuous use, Emacs
> starts to pause intermittently. It stops responding to keys or
> redisplaying for half a second, then it goes on. It does not matter
> which mode or buffer is in use.

This weird seemingly unrelated behavior is probably because I use a lot
of processes, both for flyspell and Python interaction and RPC calls.
The problem can occur when one of the processes dies.

I have been able to return Emacs to usable behavior multiple times
after such incidents happen by killing some idle processes, and they all
exhibit the same behavior:

A process dies (for example, when its buffer gets killed), but Emacs
does not forget it. It will show up in the process list, without an
associated buffer, and Emacs will be stuck in a tight loop trying to
read from these processes without success:

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

I have been able to reproduce this behavior *sometimes* using the
following snippet:

(with-temp-buffer
  (let ((process-connection-type nil))
    (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 stays around in the process
list and the process will remain in "ps" as a zombie.

The `process-connection-type' nil is the relevant part. With t, it
works correctly.

Now the weird part: This bug does not happen in a new copy of Emacs.
But when I have Emacs running for a while, suddenly the code snippet
above triggers the bug reliably.

After a while, Emacs catches up with itself, cleans up the zombie
processes, and the code above does not trigger the bug anymore. Until,
a random while later, it suddenly does again.

I have seen this happen in 24.3.50, 24.3.91 (pretest 2), and current
trunk.

Any ideas what might be happening here?

Regards,
Jorgen



reply via email to

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