This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: emacs-nox hogs CPU if backgrounded during compile


On 27/08/2013 8:06 AM, Ken Brown wrote:
On 8/27/2013 4:28 AM, Ryan Johnson wrote:
On 17/08/2013 2:41 PM, Ryan Johnson wrote:
Hi all,

The following STC causes emacs-nox to peg a CPU indefinitely. Emacs
remains responsive, but C-c C-k doesn't kill the compile; you have to
exit emacs to remove the "Compiling" status. Killing the buffer or
starting a new compile offers to kill the offending process, but doesn't.

Attaching gdb shows an endless loop inside
kernelbase.dll!RaiseException, but provides no other clues that I
could see.

1. emacs-nox -Q
2. M-x compile
3. C-a C-k sleep 1; echo hi
4. ^Z (before the sleep finishes)
5. fg (after the sleep finishes)

I don't know if this is related to limited pipe buffering, but I don't
think so: it has always worked in the past, and the the 3-4 bytes
required to buffer up "hi\n" is hardly onerous.

$ uname -a
CYGWIN_NT-6.1 ryan-laptop-v02 1.7.24(0.269/5/3) 2013-08-15 11:59
x86_64 Cygwin

$ cygcheck -cd
bash                      4.1.11-1
cygwin                    1.7.24-1
emacs                     24.3-5
mintty                    1.2-beta1-1
> Ping... is anyone else at least able to reproduce this?

I can reproduce this on both x86 and x86_64, even without the "echo hi". Since gdb doesn't seem to be helping, have you tried strace?
I've attached a snippet of strace output; it is replicated endlessly in the log file I took, with increasing timestamps being the only difference AFAICT. The snippet itself in turn consists of a segment that is repeated three times, where the only meaningful difference is the value of "set_bits: me"

And when you say this has always worked in the past, are you talking about earlier versions of emacs or earlier versions of cygwin?
I migrated to 64-bit cygwin and emacs-24 at the same time (from 32-bit emacs-23), when my old computer's HDD died, so I don't have an easy way to answer that question. I didn't notice the problem at first, either, so I don't know if a subsequent update changed things (I doubt it, though, because I do remember a few times where emacs was hogging CPU and I didn't quite know what had happened, before I figured out what was going on).

HTH,
Ryan



Attachment: emacs-strace.txt
Description: Text document

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]