X-Recipient: archive-cygwin AT delorie DOT com DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:message-id:date:from:mime-version:to:subject :references:in-reply-to:content-type; q=dns; s=default; b=jaQVXA Sw/MKQxonnpnEXI8Tcm/qDeYHEGyljrUiZhuFUH/B9cVfraKrbluP4ktCVUOs7qU HjD/4RCcPu8KBE74SPzsGAUfoPaJTvhUtNwzy2FcpoLTT+jJ9EKx6hpSdiCLKDh3 RvecB3erPX/nw9uY7HmeBcV2CnzZiXA1r68ng= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:message-id:date:from:mime-version:to:subject :references:in-reply-to:content-type; s=default; bh=r7sD2MZ2/yQk yZilB2L1tmKNkMw=; b=d/kZGiKARJi3H3hBuZ/CdMbRq6X00wp79m5apBtCOUZN aZh7TEpOiBaaVWtjV1MfHFszHgf9sDo7dpQuQJkHtqMJb1ztnBpwq4WAH2AlYHh/ 7eJeaRF4tsYZ1xLrDmH4kE7rjQ9A/mor6kCJ5v6RqdzfDQWuZHKJbmD6VuW0BmE= Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-4.4 required=5.0 tests=ALL_TRUSTED,BAYES_00,KHOP_THREADED autolearn=ham version=3.3.2 X-HELO: bureau83.ns.utoronto.ca Message-ID: <521CF5A8.8080206@cs.utoronto.ca> Date: Tue, 27 Aug 2013 14:53:28 -0400 From: Ryan Johnson User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130801 Thunderbird/17.0.8 MIME-Version: 1.0 To: cygwin AT cygwin DOT com Subject: Re: emacs-nox hogs CPU if backgrounded during compile References: <520FC3DC DOT 4010700 AT cs DOT utoronto DOT ca> <521C633E DOT 9070209 AT cs DOT utoronto DOT ca> <521C9644 DOT 8030109 AT cornell DOT edu> In-Reply-To: <521C9644.8030109@cornell.edu> Content-Type: multipart/mixed; boundary="------------060808070804080200000204" --------------060808070804080200000204 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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 --------------060808070804080200000204 Content-Type: text/plain; charset=windows-1252; name="emacs-strace.txt" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="emacs-strace.txt" 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 --------------060808070804080200000204 Content-Type: text/plain; charset=us-ascii -- 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 --------------060808070804080200000204--