public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* emacs-nox hogs CPU if backgrounded during compile
@ 2013-08-17 18:41 Ryan Johnson
  2013-08-18  4:53 ` Christopher Faylor
  2013-08-27  8:29 ` Ryan Johnson
  0 siblings, 2 replies; 7+ messages in thread
From: Ryan Johnson @ 2013-08-17 18:41 UTC (permalink / raw)
  To: cygwin

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

Ryan

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

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

* Re: emacs-nox hogs CPU if backgrounded during compile
  2013-08-17 18:41 emacs-nox hogs CPU if backgrounded during compile Ryan Johnson
@ 2013-08-18  4:53 ` Christopher Faylor
  2013-08-18 18:12   ` Ryan Johnson
  2013-08-27  8:29 ` Ryan Johnson
  1 sibling, 1 reply; 7+ messages in thread
From: Christopher Faylor @ 2013-08-18  4:53 UTC (permalink / raw)
  To: cygwin

On Sat, Aug 17, 2013 at 02:41:32PM -0400, Ryan Johnson wrote:
>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.

I don't know if this trick works on 64-bit Cygwin or not but you could try:

set $rsp=$rbp
bt

And, if you get something sensible try it on every thread.

cgf

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

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

* Re: emacs-nox hogs CPU if backgrounded during compile
  2013-08-18  4:53 ` Christopher Faylor
@ 2013-08-18 18:12   ` Ryan Johnson
  0 siblings, 0 replies; 7+ messages in thread
From: Ryan Johnson @ 2013-08-18 18:12 UTC (permalink / raw)
  To: cygwin

On 18/08/2013 12:53 AM, Christopher Faylor wrote:
> On Sat, Aug 17, 2013 at 02:41:32PM -0400, Ryan Johnson wrote:
>> 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.
> I don't know if this trick works on 64-bit Cygwin or not but you could try:
>
> set $rsp=$rbp
> bt
>
> And, if you get something sensible try it on every thread.
(gdb) p $rbp
$5 = (void *) 0x16

Ryan


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

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

* Re: emacs-nox hogs CPU if backgrounded during compile
  2013-08-17 18:41 emacs-nox hogs CPU if backgrounded during compile Ryan Johnson
  2013-08-18  4:53 ` Christopher Faylor
@ 2013-08-27  8:29 ` Ryan Johnson
  2013-08-27 12:06   ` Ken Brown
  1 sibling, 1 reply; 7+ messages in thread
From: Ryan Johnson @ 2013-08-27  8:29 UTC (permalink / raw)
  To: cygwin

Ping... is anyone else at least able to reproduce this?

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


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

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

* Re: emacs-nox hogs CPU if backgrounded during compile
  2013-08-27  8:29 ` Ryan Johnson
@ 2013-08-27 12:06   ` Ken Brown
  2013-08-27 18:54     ` Ryan Johnson
  2013-08-28  7:00     ` Ryan Johnson
  0 siblings, 2 replies; 7+ messages in thread
From: Ken Brown @ 2013-08-27 12:06 UTC (permalink / raw)
  To: cygwin

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?  And when 
you say this has always worked in the past, are you talking about 
earlier versions of emacs or earlier versions of cygwin?  In either 
case, you could try a bisection to see when the problem first appeared.

I don't have time to try this myself right now.

Ken

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

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

* Re: emacs-nox hogs CPU if backgrounded during compile
  2013-08-27 12:06   ` Ken Brown
@ 2013-08-27 18:54     ` Ryan Johnson
  2013-08-28  7:00     ` Ryan Johnson
  1 sibling, 0 replies; 7+ messages in thread
From: Ryan Johnson @ 2013-08-27 18:54 UTC (permalink / raw)
  To: cygwin

[-- Attachment #1: Type: text/plain, Size: 2319 bytes --]

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 #2: emacs-strace.txt --]
[-- Type: text/plain, Size: 12883 bytes --]

   27 6594315 [pipesel] emacs 7036 fhandler_pty_master::hit_eof: all other handles closed
   17 6594332 [pipesel] emacs 7036 peek_pipe: read: /dev/ptmx, saw EOF
   20 6594352 [main] emacs 7036 select_stuff::wait: wait_ret 2.  verifying
   16 6594368 [main] emacs 7036 set_bits: me 0x600029280, testing fd 4 (/dev/ptmx)
   16 6594384 [main] emacs 7036 set_bits: ready 1
   15 6594399 [main] emacs 7036 select_stuff::wait: gotone 1
   15 6594414 [main] emacs 7036 select_stuff::wait: returning 0
   16 6594430 [main] emacs 7036 select: res 0
   15 6594445 [main] emacs 7036 peek_pipe: /dev/ptmx, already ready for read
   15 6594460 [main] emacs 7036 set_bits: me 0x600029280, testing fd 4 (/dev/ptmx)
   15 6594475 [main] emacs 7036 set_bits: ready 1
   30 6594505 [main] emacs 7036 select_stuff::cleanup: calling cleanup routines
   93 6594598 [main] emacs 7036 select_stuff::destroy: deleting select records
  139 6594737 [main] emacs 7036 select_stuff::cleanup: calling cleanup routines
   16 6594753 [main] emacs 7036 select_stuff::destroy: deleting select records
   15 6594768 [main] emacs 7036 cygwin_select: 1 = select(5, 0x429B90, 0x429BA0, 0x0, 0x429920)
  118 6594886 [main] emacs 7036 fcntl64: fcntl(3, 4, ...)
   15 6594901 [main] emacs 7036 fhandler_base::set_flags: flags 0x1C002, supplied_bin 0x0
   16 6594917 [main] emacs 7036 fhandler_base::set_flags: O_TEXT/O_BINARY set in flags 0x10000
   15 6594932 [main] emacs 7036 fhandler_base::set_flags: filemode set to binary
   15 6594947 [main] emacs 7036 fcntl64: 0 = fcntl(3, 4, 0x4000)
  117 6595064 [main] emacs 7036 read: read(3, 0x428900, 4095) nonblocking
   15 6595079 [main] emacs 7036 fhandler_pty_slave::read: read(0x428900, 4095) handle 0x1B4
   19 6595098 [main] emacs 7036 fhandler_pty_slave::read: wait timed out, time_to_wait 0
   15 6595113 [main] emacs 7036 fhandler_pty_slave::read: -1=read(0x428900, 4095)
   15 6595128 [main] emacs 7036 read: -1 = read(3, 0x428900, 4095), errno 11
  117 6595245 [main] emacs 7036 fcntl64: fcntl(3, 4, ...)
   15 6595260 [main] emacs 7036 fhandler_base::set_flags: flags 0x18002, supplied_bin 0x0
   15 6595275 [main] emacs 7036 fhandler_base::set_flags: O_TEXT/O_BINARY set in flags 0x10000
   16 6595291 [main] emacs 7036 fhandler_base::set_flags: filemode set to binary
   15 6595306 [main] emacs 7036 fcntl64: 0 = fcntl(3, 4, 0x0)
   17 6595323 [main] emacs 7036 read: read(4, 0x4289E0, 4096) nonblocking
   22 6595345 [main] emacs 7036 fhandler_pty_master::hit_eof: all other handles closed
   15 6595360 [main] emacs 7036 fhandler_pty_master::process_slave_output: returning 0
   15 6595375 [main] emacs 7036 read: 0 = read(4, 0x4289E0, 4096)
  119 6595494 [main] emacs 7036 fcntl64: fcntl(3, 4, ...)
   15 6595509 [main] emacs 7036 fhandler_base::set_flags: flags 0x1C002, supplied_bin 0x0
   16 6595525 [main] emacs 7036 fhandler_base::set_flags: O_TEXT/O_BINARY set in flags 0x10000
   15 6595540 [main] emacs 7036 fhandler_base::set_flags: filemode set to binary
   15 6595555 [main] emacs 7036 fcntl64: 0 = fcntl(3, 4, 0x4000)
  120 6595675 [main] emacs 7036 read: read(3, 0x428940, 4095) nonblocking
   16 6595691 [main] emacs 7036 fhandler_pty_slave::read: read(0x428940, 4095) handle 0x1B4
   18 6595709 [main] emacs 7036 fhandler_pty_slave::read: wait timed out, time_to_wait 0
   15 6595724 [main] emacs 7036 fhandler_pty_slave::read: -1=read(0x428940, 4095)
   16 6595740 [main] emacs 7036 read: -1 = read(3, 0x428940, 4095), errno 11
  116 6595856 [main] emacs 7036 fcntl64: fcntl(3, 4, ...)
   15 6595871 [main] emacs 7036 fhandler_base::set_flags: flags 0x18002, supplied_bin 0x0
   15 6595886 [main] emacs 7036 fhandler_base::set_flags: O_TEXT/O_BINARY set in flags 0x10000
   16 6595902 [main] emacs 7036 fhandler_base::set_flags: filemode set to binary
   15 6595917 [main] emacs 7036 fcntl64: 0 = fcntl(3, 4, 0x0)
   16 6595933 [main] emacs 7036 cygwin_select: select(5, 0x429B90, 0x429BA0, 0x0, 0x429920)
   16 6595949 [main] emacs 7036 cygwin_select: to->tv_sec 0, to->tv_usec 487999, ms 487
   81 6596030 [main] emacs 7036 dtable::select_read: /dev/tty fd 3
   94 6596124 [main] emacs 7036 dtable::select_read: /dev/ptmx fd 4
   16 6596140 [main] emacs 7036 select: sel.always_ready 0
   41 6596181 [main] emacs 7036 select_stuff::wait: m 4, ms 487
   28 6596209 [pipesel] emacs 7036 fhandler_pty_master::hit_eof: all other handles closed
   16 6596225 [pipesel] emacs 7036 peek_pipe: read: /dev/ptmx, saw EOF
   29 6596254 [main] emacs 7036 select_stuff::wait: wait_ret 2.  verifying
   14 6596268 [main] emacs 7036 set_bits: me 0x600029A80, testing fd 4 (/dev/ptmx)
   11 6596279 [main] emacs 7036 set_bits: ready 1
   12 6596291 [main] emacs 7036 select_stuff::wait: gotone 1
   11 6596302 [main] emacs 7036 select_stuff::wait: returning 0
   12 6596314 [main] emacs 7036 select: res 0
   12 6596326 [main] emacs 7036 peek_pipe: /dev/ptmx, already ready for read
   11 6596337 [main] emacs 7036 set_bits: me 0x600029A80, testing fd 4 (/dev/ptmx)
   12 6596349 [main] emacs 7036 set_bits: ready 1
   22 6596371 [main] emacs 7036 select_stuff::cleanup: calling cleanup routines
   66 6596437 [main] emacs 7036 select_stuff::destroy: deleting select records
   99 6596536 [main] emacs 7036 select_stuff::cleanup: calling cleanup routines
   12 6596548 [main] emacs 7036 select_stuff::destroy: deleting select records
   12 6596560 [main] emacs 7036 cygwin_select: 1 = select(5, 0x429B90, 0x429BA0, 0x0, 0x429920)
  121 6596681 [main] emacs 7036 fcntl64: fcntl(3, 4, ...)
   13 6596694 [main] emacs 7036 fhandler_base::set_flags: flags 0x1C002, supplied_bin 0x0
   12 6596706 [main] emacs 7036 fhandler_base::set_flags: O_TEXT/O_BINARY set in flags 0x10000
   28 6596734 [main] emacs 7036 fhandler_base::set_flags: filemode set to binary
   18 6596752 [main] emacs 7036 fcntl64: 0 = fcntl(3, 4, 0x4000)
  122 6596874 [main] emacs 7036 read: read(3, 0x428900, 4095) nonblocking
   15 6596889 [main] emacs 7036 fhandler_pty_slave::read: read(0x428900, 4095) handle 0x1B4
   19 6596908 [main] emacs 7036 fhandler_pty_slave::read: wait timed out, time_to_wait 0
   16 6596924 [main] emacs 7036 fhandler_pty_slave::read: -1=read(0x428900, 4095)
   15 6596939 [main] emacs 7036 read: -1 = read(3, 0x428900, 4095), errno 11
  119 6597058 [main] emacs 7036 fcntl64: fcntl(3, 4, ...)
   17 6597075 [main] emacs 7036 fhandler_base::set_flags: flags 0x18002, supplied_bin 0x0
   44 6597119 [main] emacs 7036 fhandler_base::set_flags: O_TEXT/O_BINARY set in flags 0x10000
   15 6597134 [main] emacs 7036 fhandler_base::set_flags: filemode set to binary
   17 6597151 [main] emacs 7036 fcntl64: 0 = fcntl(3, 4, 0x0)
   19 6597170 [main] emacs 7036 read: read(4, 0x4289E0, 4096) nonblocking
   24 6597194 [main] emacs 7036 fhandler_pty_master::hit_eof: all other handles closed
   15 6597209 [main] emacs 7036 fhandler_pty_master::process_slave_output: returning 0
   16 6597225 [main] emacs 7036 read: 0 = read(4, 0x4289E0, 4096)
  121 6597346 [main] emacs 7036 fcntl64: fcntl(3, 4, ...)
   15 6597361 [main] emacs 7036 fhandler_base::set_flags: flags 0x1C002, supplied_bin 0x0
   15 6597376 [main] emacs 7036 fhandler_base::set_flags: O_TEXT/O_BINARY set in flags 0x10000
   16 6597392 [main] emacs 7036 fhandler_base::set_flags: filemode set to binary
   15 6597407 [main] emacs 7036 fcntl64: 0 = fcntl(3, 4, 0x4000)
  125 6597532 [main] emacs 7036 read: read(3, 0x428940, 4095) nonblocking
   16 6597548 [main] emacs 7036 fhandler_pty_slave::read: read(0x428940, 4095) handle 0x1B4
   19 6597567 [main] emacs 7036 fhandler_pty_slave::read: wait timed out, time_to_wait 0
   15 6597582 [main] emacs 7036 fhandler_pty_slave::read: -1=read(0x428940, 4095)
   16 6597598 [main] emacs 7036 read: -1 = read(3, 0x428940, 4095), errno 11
  120 6597718 [main] emacs 7036 fcntl64: fcntl(3, 4, ...)
   16 6597734 [main] emacs 7036 fhandler_base::set_flags: flags 0x18002, supplied_bin 0x0
   15 6597749 [main] emacs 7036 fhandler_base::set_flags: O_TEXT/O_BINARY set in flags 0x10000
   15 6597764 [main] emacs 7036 fhandler_base::set_flags: filemode set to binary
   15 6597779 [main] emacs 7036 fcntl64: 0 = fcntl(3, 4, 0x0)
   18 6597797 [main] emacs 7036 cygwin_select: select(5, 0x429B90, 0x429BA0, 0x0, 0x429920)
   17 6597814 [main] emacs 7036 cygwin_select: to->tv_sec 0, to->tv_usec 485999, ms 485
   56 6597870 [main] emacs 7036 dtable::select_read: /dev/tty fd 3
   93 6597963 [main] emacs 7036 dtable::select_read: /dev/ptmx fd 4
   15 6597978 [main] emacs 7036 select: sel.always_ready 0
   42 6598020 [main] emacs 7036 select_stuff::wait: m 4, ms 485
   26 6598046 [pipesel] emacs 7036 fhandler_pty_master::hit_eof: all other handles closed
   16 6598062 [pipesel] emacs 7036 peek_pipe: read: /dev/ptmx, saw EOF
   19 6598081 [main] emacs 7036 select_stuff::wait: wait_ret 2.  verifying
   17 6598098 [main] emacs 7036 set_bits: me 0x600029700, testing fd 4 (/dev/ptmx)
   16 6598114 [main] emacs 7036 set_bits: ready 1
   15 6598129 [main] emacs 7036 select_stuff::wait: gotone 1
   15 6598144 [main] emacs 7036 select_stuff::wait: returning 0
   16 6598160 [main] emacs 7036 select: res 0
   15 6598175 [main] emacs 7036 peek_pipe: /dev/ptmx, already ready for read
   16 6598191 [main] emacs 7036 set_bits: me 0x600029700, testing fd 4 (/dev/ptmx)
   15 6598206 [main] emacs 7036 set_bits: ready 1
   30 6598236 [main] emacs 7036 select_stuff::cleanup: calling cleanup routines
   94 6598330 [main] emacs 7036 select_stuff::destroy: deleting select records
  142 6598472 [main] emacs 7036 select_stuff::cleanup: calling cleanup routines
   15 6598487 [main] emacs 7036 select_stuff::destroy: deleting select records
   16 6598503 [main] emacs 7036 cygwin_select: 1 = select(5, 0x429B90, 0x429BA0, 0x0, 0x429920)
  121 6598624 [main] emacs 7036 fcntl64: fcntl(3, 4, ...)
   16 6598640 [main] emacs 7036 fhandler_base::set_flags: flags 0x1C002, supplied_bin 0x0
   16 6598656 [main] emacs 7036 fhandler_base::set_flags: O_TEXT/O_BINARY set in flags 0x10000
   15 6598671 [main] emacs 7036 fhandler_base::set_flags: filemode set to binary
   16 6598687 [main] emacs 7036 fcntl64: 0 = fcntl(3, 4, 0x4000)
  119 6598806 [main] emacs 7036 read: read(3, 0x428900, 4095) nonblocking
   15 6598821 [main] emacs 7036 fhandler_pty_slave::read: read(0x428900, 4095) handle 0x1B4
   19 6598840 [main] emacs 7036 fhandler_pty_slave::read: wait timed out, time_to_wait 0
   15 6598855 [main] emacs 7036 fhandler_pty_slave::read: -1=read(0x428900, 4095)
   16 6598871 [main] emacs 7036 read: -1 = read(3, 0x428900, 4095), errno 11
  116 6598987 [main] emacs 7036 fcntl64: fcntl(3, 4, ...)
   15 6599002 [main] emacs 7036 fhandler_base::set_flags: flags 0x18002, supplied_bin 0x0
   16 6599018 [main] emacs 7036 fhandler_base::set_flags: O_TEXT/O_BINARY set in flags 0x10000
   15 6599033 [main] emacs 7036 fhandler_base::set_flags: filemode set to binary
   15 6599048 [main] emacs 7036 fcntl64: 0 = fcntl(3, 4, 0x0)
   17 6599065 [main] emacs 7036 read: read(4, 0x4289E0, 4096) nonblocking
   21 6599086 [main] emacs 7036 fhandler_pty_master::hit_eof: all other handles closed
   15 6599101 [main] emacs 7036 fhandler_pty_master::process_slave_output: returning 0
   16 6599117 [main] emacs 7036 read: 0 = read(4, 0x4289E0, 4096)
  118 6599235 [main] emacs 7036 fcntl64: fcntl(3, 4, ...)
   15 6599250 [main] emacs 7036 fhandler_base::set_flags: flags 0x1C002, supplied_bin 0x0
   15 6599265 [main] emacs 7036 fhandler_base::set_flags: O_TEXT/O_BINARY set in flags 0x10000
   16 6599281 [main] emacs 7036 fhandler_base::set_flags: filemode set to binary
   15 6599296 [main] emacs 7036 fcntl64: 0 = fcntl(3, 4, 0x4000)
  116 6599412 [main] emacs 7036 read: read(3, 0x428940, 4095) nonblocking
   15 6599427 [main] emacs 7036 fhandler_pty_slave::read: read(0x428940, 4095) handle 0x1B4
   18 6599445 [main] emacs 7036 fhandler_pty_slave::read: wait timed out, time_to_wait 0
   15 6599460 [main] emacs 7036 fhandler_pty_slave::read: -1=read(0x428940, 4095)
   16 6599476 [main] emacs 7036 read: -1 = read(3, 0x428940, 4095), errno 11
  116 6599592 [main] emacs 7036 fcntl64: fcntl(3, 4, ...)
   15 6599607 [main] emacs 7036 fhandler_base::set_flags: flags 0x18002, supplied_bin 0x0
   18 6599625 [main] emacs 7036 fhandler_base::set_flags: O_TEXT/O_BINARY set in flags 0x10000
   17 6599642 [main] emacs 7036 fhandler_base::set_flags: filemode set to binary
   16 6599658 [main] emacs 7036 fcntl64: 0 = fcntl(3, 4, 0x0)
   16 6599674 [main] emacs 7036 cygwin_select: select(5, 0x429B90, 0x429BA0, 0x0, 0x429920)
   16 6599690 [main] emacs 7036 cygwin_select: to->tv_sec 0, to->tv_usec 483999, ms 483
   56 6599746 [main] emacs 7036 dtable::select_read: /dev/tty fd 3
   92 6599838 [main] emacs 7036 dtable::select_read: /dev/ptmx fd 4
   15 6599853 [main] emacs 7036 select: sel.always_ready 0
   42 6599895 [main] emacs 7036 select_stuff::wait: m 4, ms 483


[-- Attachment #3: Type: text/plain, Size: 218 bytes --]

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

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

* Re: emacs-nox hogs CPU if backgrounded during compile
  2013-08-27 12:06   ` Ken Brown
  2013-08-27 18:54     ` Ryan Johnson
@ 2013-08-28  7:00     ` Ryan Johnson
  1 sibling, 0 replies; 7+ messages in thread
From: Ryan Johnson @ 2013-08-28  7:00 UTC (permalink / raw)
  To: cygwin

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". 
Update: the problem only occurs if output arrives while emacs is 
stopped. So, "echo hi; sleep 5; echo ho" will not cause the problem if 
you ^Z/fg during the gap.

Ryan

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

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

end of thread, other threads:[~2013-08-28  7:00 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-08-17 18:41 emacs-nox hogs CPU if backgrounded during compile Ryan Johnson
2013-08-18  4:53 ` Christopher Faylor
2013-08-18 18:12   ` Ryan Johnson
2013-08-27  8:29 ` Ryan Johnson
2013-08-27 12:06   ` Ken Brown
2013-08-27 18:54     ` Ryan Johnson
2013-08-28  7:00     ` Ryan Johnson

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