From debbugs-submit-bounces@debbugs.gnu.org Thu Sep 21 14:17:35 2017 Received: (at submit) by debbugs.gnu.org; 21 Sep 2017 18:17:35 +0000 Received: from localhost ([127.0.0.1]:51853 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dv62Y-0006OL-UL for submit@debbugs.gnu.org; Thu, 21 Sep 2017 14:17:35 -0400 Received: from eggs.gnu.org ([208.118.235.92]:39005) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dv5yI-0006H8-Gp for submit@debbugs.gnu.org; Thu, 21 Sep 2017 14:13:10 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dv5y8-0001n7-KO for submit@debbugs.gnu.org; Thu, 21 Sep 2017 14:13:05 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: ** X-Spam-Status: No, score=2.1 required=5.0 tests=BAYES_50,DATE_IN_PAST_24_48, FREEMAIL_FROM,NO_DNS_FOR_FROM autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:56571) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dv5y8-0001mt-Hk for submit@debbugs.gnu.org; Thu, 21 Sep 2017 14:13:00 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58136) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dv5y6-00007A-QF for bug-gnu-emacs@gnu.org; Thu, 21 Sep 2017 14:13:00 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dv5y3-0001i7-4w for bug-gnu-emacs@gnu.org; Thu, 21 Sep 2017 14:12:58 -0400 Received: from [211.226.22.59] (port=50161 helo=dana.local) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dv5y2-0001gS-IH for bug-gnu-emacs@gnu.org; Thu, 21 Sep 2017 14:12:55 -0400 Received: by dana.local (Postfix, from userid 501) id 64F9184816B; Wed, 20 Sep 2017 12:03:37 +0900 (KST) From: Sung Ho Kim To: bug-gnu-emacs@gnu.org Subject: 26.0.50; emacs will consume 100% cpu after gdb debugee exits Date: Wed, 20 Sep 2017 12:03:37 +0900 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Mac OS X [generic] [fuzzy] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.0 (----) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Thu, 21 Sep 2017 14:17:34 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.0 (----) First time using the bug report system, so apologies in advance if the report feels muddled. The procedure I had used is as follows: 1) open emacs [-Q] [-nw] N.B. the option flags -Q -nw do not make any difference in the behavior described. 2) run gdb using M-x gdb ( I have tested gdb 7.12 and 8.0, 8.0.1 and even earlier versions but gdb version do not seem to make any difference) 3) open any executable binary for debugging. 4) continue, step, next or run until binary in step (3) finishes execution and exits (whether it exits normally or abnormally does not make a difference) 5) open top and watch emacs cpu usage. What I have noticed with a little bit of debugging and looking at the emacs source code is that in process.c in about line 5660 (thankfully process.c receives very little changes recently so the line number should be approximately accurate) you see the following code: ------------------------------------------------------------------- /* If we can detect process termination, don't consider the process gone just because its pipe is closed. */ else if (nread =3D=3D 0 && !NETCONN_P (proc) && !SERIALCONN_P (proc) && !PIPECONN_P (proc)) ------------------------------------------------------------------- This if clause becomes true when the debugee exits in Mac OS Sierra (10.12.6, BuildVersion 16G29, Darwin Kernel Version 16.7.0) and since nothing is done about the read file descriptor (proc's infd, outfd, channel) this results in an infinite loop where thread_select keeps returning nfds =3D 1 but the subsequent read operation will not return an error (i.e. nread will never be < 0) and nread will always be 0. I feel this infinite loop is the cause of the 100% cpu usage behavior. To test this theory, I added the same code used in the (nread =3D=3D -1 && errno =3D=3D EIO) condition to the (nread =3D=3D 0 && !NETCONN_P (proc) && !SERIALCONN_P (proc) && !PIPECONN_P= (proc)) condition to remove the target file descriptor when this condition is encountered as such: else if (nread =3D=3D 0 && !NETCONN_P (proc) && !SERIALCONN_P (proc) && !PIPECONN_P (proc)) #ifdef DARWIN_OS { struct Lisp_Process *p =3D XPROCESS (proc); /* Clear the descriptor now, so we only raise the signal once. */ delete_read_fd (channel); if (p->pid =3D=3D -2) { /* If the EIO occurs on a pty, the SIGCHLD handler's waitpid call will not find the process object to delete. Do it here. */ p->tick =3D ++process_tick; pset_status (p, Qfailed); } } #else ; #endif /* DARWIN_OS */ after rebuilding with the aforementioned change, the 100% cpu usage disappears. I have refrained from offering a patch because I am not fully knowledgeable with the code and its possible side effects. Thank you for your patience and your great work developing this great OS. In GNU Emacs 26.0.50 (build 2, x86_64-apple-darwin16.7.0) of 2017-09-20 built on dana.local Repository revision: bc511a64f6da9ab51acc7c8865e80c4a4cb655c2 Recent messages: applying putty GNU screen fixes. Reusing Dired buffers is now ON Turning on magit-auto-revert-mode...done ad-handle-definition: =E2=80=98compilation-start=E2=80=99 got redefined For information about GNU Emacs and the GNU system, type C-h C-a. Configured using: 'configure --prefix=3D/opt/local/emacs-git --without-makeinfo --without-ns --without-pop --without-mailutils' Configured features: DBUS NOTIFY ACL GNUTLS LIBXML2 ZLIB Important settings: value of $LC_ALL: en_US.UTF-8 locale-coding-system: utf-8-unix Major mode: Fundamental Minor modes in effect: diff-auto-refine-mode: t magit-auto-revert-mode: t global-git-commit-mode: t async-bytecomp-package-mode: t shell-dirtrack-mode: t bury-successful-compilation: t global-auto-complete-mode: t cl-old-struct-compat-mode: t tooltip-mode: t global-eldoc-mode: t electric-indent-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t buffer-read-only: t line-number-mode: t transient-mark-mode: t Load-path shadows: ~/.emacs.d/lisp/expand-region-core hides /Users/sk68/.emacs.d/elpa/expand-r= egion-0.11.0/expand-region-core ~/.emacs.d/lisp/linum hides /opt/local/emacs-git/share/emacs/26.0.50/lisp/l= inum Features: (shadow sort mail-extr emacsbug sendmail term/xterm xterm flymake flymake-proc compile flymake-ui display-line-numbers elec-pair magit-obsolete magit-blame magit-stash magit-bisect magit-remote magit-commit magit-sequence magit-notes magit-worktree magit-branch magit-files magit-refs magit-status magit magit-repos magit-apply magit-wip magit-log magit-diff smerge-mode diff-mode magit-core magit-autorevert autorevert filenotify magit-process magit-margin magit-mode magit-git magit-section magit-popup git-commit magit-utils crm log-edit message subr-x puny rfc822 mml mml-sec epa epg gnus-util rmail rmail-loaddefs time-date mm-decode mm-bodies mm-encode mail-parse rfc2231 rfc2047 rfc2045 mm-util ietf-drums mail-prsvr mailabbrev mail-utils gmm-utils mailheader pcvs-util add-log with-editor cl-extra async-bytecomp async shell pcomplete comint ansi-color ring server dash help-mode dired+ image-dired image-mode format-spec image-file image dired-x dired-aux dired dired-loaddefs cl findheader compilation-window-helper bury-successful-compilation advice auto-complete-config auto-complete popup ztree ztree-diff ztree-diff-model ztree-dir easy-mmode ztree-view edmacro kmacro ztree-util jison-mode bison-mode derived cc-mode cc-fonts cc-guess cc-menus cc-cmds cc-styles cc-align cc-engine cc-vars cc-defs regexp-opt finder-inf info tool-bar package easymenu epg-config url-handlers url-parse auth-source cl-seq eieio eieio-core cl-macs eieio-loaddefs password-cache url-vars seq byte-opt gv bytecomp byte-compile cconv cl-loaddefs cl-lib mule-util tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type tabulated-list replace newcomment text-mode elisp-mode lisp-mode prog-mode register page menu-bar rfn-eshadow isearch timer select mouse jit-lock font-lock syntax facemenu font-core term/tty-colors frame cl-generic cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese composite charscript charprop case-table epa-hook jka-cmpr-hook help simple abbrev obarray minibuffer cl-preloaded nadvice loaddefs button faces cus-face macroexp files text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote dbusbind kqueue multi-tty make-network-process emacs) Memory information: ((conses 16 267423 9498) (symbols 48 33034 2) (miscs 40 79 97) (strings 32 73135 3249) (string-bytes 1 2304657) (vectors 16 29273) (vector-slots 8 620415 7189) (floats 8 124 327) (intervals 56 240 0) (buffers 992 12)) From debbugs-submit-bounces@debbugs.gnu.org Sat Oct 28 13:03:03 2017 Received: (at submit) by debbugs.gnu.org; 28 Oct 2017 17:03:04 +0000 Received: from localhost ([127.0.0.1]:39414 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e8UVj-000177-My for submit@debbugs.gnu.org; Sat, 28 Oct 2017 13:03:03 -0400 Received: from eggs.gnu.org ([208.118.235.92]:50164) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e8UVh-00016c-Kn for submit@debbugs.gnu.org; Sat, 28 Oct 2017 13:03:02 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e8UVb-0002pq-UB for submit@debbugs.gnu.org; Sat, 28 Oct 2017 13:02:56 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:57552) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1e8UVb-0002pf-Qq for submit@debbugs.gnu.org; Sat, 28 Oct 2017 13:02:55 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41122) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e8UVa-0005CM-Qp for bug-gnu-emacs@gnu.org; Sat, 28 Oct 2017 13:02:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e8UVW-0002mx-Uw for bug-gnu-emacs@gnu.org; Sat, 28 Oct 2017 13:02:54 -0400 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:50740) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e8UVW-0002mq-RB; Sat, 28 Oct 2017 13:02:50 -0400 Received: from [176.228.60.248] (port=1104 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1e8UVV-0001lW-HO; Sat, 28 Oct 2017 13:02:50 -0400 Date: Sat, 28 Oct 2017 20:02:41 +0300 Message-Id: <8360az5hou.fsf@gnu.org> From: Eli Zaretskii To: sk6875@gmail.com In-reply-to: <848a7a7c-1983-47ed-8d15-6d64b4634e1a@googlegroups.com> (sk6875@gmail.com) Subject: Re: bug#28544: 26.0.50; emacs will consume 100% cpu after gdb debugee exits References: <848a7a7c-1983-47ed-8d15-6d64b4634e1a@googlegroups.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: submit Cc: bug-gnu-emacs@gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) > Date: Sat, 28 Oct 2017 07:10:07 -0700 (PDT) > From: sk6875@gmail.com > > Any updates on this? I couldn't reproduce this on GNU/Linux and on Windows, so I think this is a macOS specific problem. From debbugs-submit-bounces@debbugs.gnu.org Sun Nov 26 09:16:16 2017 Received: (at 28544) by debbugs.gnu.org; 26 Nov 2017 14:16:16 +0000 Received: from localhost ([127.0.0.1]:58690 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eIxjE-0000Vf-7S for submit@debbugs.gnu.org; Sun, 26 Nov 2017 09:16:16 -0500 Received: from sinyavsky.aurox.ch ([37.35.109.145]:53552) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eIxjC-0000PQ-6K for 28544@debbugs.gnu.org; Sun, 26 Nov 2017 09:16:14 -0500 Received: from sinyavsky.aurox.ch (sinyavsky.aurox.ch [127.0.0.1]) by sinyavsky.aurox.ch (Postfix) with ESMTP id 78B19225D9 for <28544@debbugs.gnu.org>; Sun, 26 Nov 2017 14:08:47 +0000 (UTC) Authentication-Results: sinyavsky.aurox.ch (amavisd-new); dkim=pass (1024-bit key) reason="pass (just generated, assumed good)" header.d=aurox.ch DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=aurox.ch; h= references:subject:subject:in-reply-to:to:from:from:message-id :date:date; s=dkim; t=1511705325; x=1512569326; bh=SBuVmPheRsU4D A9CyXvIB1TtwD3YksrxDDLvw17rgj0=; b=n5fDw5sboF3y248q4Qr8fZeH4FlcC w6JKh6DVwoew+K0B19IcvOZHP5VyY8ODrQfhSz5yvCzhF6MIMs2ATHChRii1Vsxh iJzCqqGDWfIInQjq3EIm/+v39bLroQNer62RD3mViaZcndTR+Fo30/yFeR8ECDrf bTE7Rnt8fdUDSc= X-Virus-Scanned: Debian amavisd-new at test.virtualizor.com Received: from sinyavsky.aurox.ch ([127.0.0.1]) by sinyavsky.aurox.ch (sinyavsky.aurox.ch [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id AY-xB7QFtW6H for <28544@debbugs.gnu.org>; Sun, 26 Nov 2017 14:08:45 +0000 (UTC) Received: from gray (125.85.192.178.dynamic.wline.res.cust.swisscom.ch [178.192.85.125]) by sinyavsky.aurox.ch (Postfix) with ESMTPSA id 8EE7D225C0; Sun, 26 Nov 2017 14:08:45 +0000 (UTC) Date: Sun, 26 Nov 2017 15:17:43 +0100 Message-Id: From: charles@aurox.ch (Charles A. Roelli) To: Sung Ho Kim In-reply-to: (message from Sung Ho Kim on Wed, 20 Sep 2017 12:03:37 +0900) Subject: Re: bug#28544: 26.0.50; emacs will consume 100% cpu after gdb debugee exits References: X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 28544 Cc: 28544@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) > From: Sung Ho Kim > Date: Wed, 20 Sep 2017 12:03:37 +0900 > > First time using the bug report system, so apologies in advance if the > report feels muddled. > > The procedure I had used is as follows: > 1) open emacs [-Q] [-nw] > N.B. the option flags -Q -nw do not make any difference in the > behavior described. > 2) run gdb using M-x gdb ( I have tested gdb 7.12 and 8.0, 8.0.1 and > even earlier versions but gdb version do not seem to make any difference) > 3) open any executable binary for debugging. > 4) continue, step, next or run until binary in step (3) finishes > execution and exits (whether it exits normally or abnormally does not > make a difference) > 5) open top and watch emacs cpu usage. > > What I have noticed with a little bit of debugging and looking at the > emacs source code is that in process.c in about line 5660 (thankfully > process.c receives very little changes recently so the line number > should be approximately accurate) you see the following code: > ------------------------------------------------------------------- > /* If we can detect process termination, don't consider the > process gone just because its pipe is closed. */ > else if (nread == 0 && !NETCONN_P (proc) && !SERIALCONN_P (proc) > && !PIPECONN_P (proc)) > ------------------------------------------------------------------- > This if clause becomes true when the debugee exits in Mac OS Sierra > (10.12.6, BuildVersion 16G29, Darwin Kernel Version 16.7.0) and since > nothing is done about the read file descriptor (proc's infd, outfd, > channel) this results in an infinite loop where thread_select keeps > returning nfds = 1 but the subsequent read operation will not return an > error (i.e. nread will never be < 0) and nread will always be 0. I feel > this infinite loop is the cause of the 100% cpu usage behavior. > > To test this theory, I added the same code used in the > (nread == -1 && errno == EIO) condition to the > (nread == 0 && !NETCONN_P (proc) && !SERIALCONN_P (proc) && !PIPECONN_P(proc)) > condition to remove the target file descriptor when this condition is > encountered as such: > > else if (nread == 0 && !NETCONN_P (proc) && !SERIALCONN_P (proc) > && !PIPECONN_P (proc)) > #ifdef DARWIN_OS > { > struct Lisp_Process *p = XPROCESS (proc); > > /* Clear the descriptor now, so we only raise the > signal once. */ > delete_read_fd (channel); > > if (p->pid == -2) > { > /* If the EIO occurs on a pty, the SIGCHLD handler's > waitpid call will not find the process object to > delete. Do it here. */ > p->tick = ++process_tick; > pset_status (p, Qfailed); > } > } > #else > ; > #endif /* DARWIN_OS */ > > after rebuilding with the aforementioned change, the 100% cpu usage > disappears. I have refrained from offering a patch because I am not > fully knowledgeable with the code and its possible side effects. > > Thank you for your patience and your great work developing this great OS. > > > In GNU Emacs 26.0.50 (build 2, x86_64-apple-darwin16.7.0) > of 2017-09-20 built on dana.local Thanks a lot for investigating this problem. It also happens on macOS 10.6, and your change fixes it. Not knowing much about this part of Emacs myself, I hope somebody can review your change soon. From debbugs-submit-bounces@debbugs.gnu.org Sun Nov 26 09:53:37 2017 Received: (at control) by debbugs.gnu.org; 26 Nov 2017 14:53:37 +0000 Received: from localhost ([127.0.0.1]:58725 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eIyJN-00041G-48 for submit@debbugs.gnu.org; Sun, 26 Nov 2017 09:53:37 -0500 Received: from mail-io0-f177.google.com ([209.85.223.177]:41905) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eIyJK-000412-RG for control@debbugs.gnu.org; Sun, 26 Nov 2017 09:53:35 -0500 Received: by mail-io0-f177.google.com with SMTP id g73so33655969ioj.8 for ; Sun, 26 Nov 2017 06:53:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:subject:date:message-id:mime-version; bh=UC/AAaFYQC1rvylpNRM2STT5SrtsrD1Gr8SvUe2aH88=; b=S2e4sUXFBL7UkxMP2Aj6DKJOzq0PzmL+et/eNMqdwGrDv5gDVrrTxBzHhGNYg7X/52 6JrusahXzRMdMEzbaFXceVfX4GDGeT6HTaYfd77bg3eYxFWsT+zqRsGvxkqk9yM+8mZD wntX7IiZI0SsWcOPD47xBi7xRTMuo+s1PDYMipQmTwz9pH840q1R5k5uyNU3SVFlZHuk l0SGXPD5mqUv74ul+IdQilv4QiI82zkBs7zDLN/E10CCasYoANQ+W5+RqP7mqWmTM+9B uDSongwAPK7c+HzunCh5Sn9ZPE76RCzmH5NodovUXj+8MnE0pie63HJyASJLpYMcetMP iquw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:subject:date:message-id :mime-version; bh=UC/AAaFYQC1rvylpNRM2STT5SrtsrD1Gr8SvUe2aH88=; b=oIY0eYhCeveKyK32N2bthL+mrQWgfcR1TpP7cZBmGvHmSNSRoYkLC7y6Bf9FEyRvlq K47MEdxiixwr9KlFvcEtkEUeeqERoQSHFd4ODnV/ijg2nkpi4hX7UyFRRNEcDjkGJLHo nN23cWSxDOeEtvmxzBhBGbIfRAgGUWLaNKCVXqNNGhxcBf7lOSMbNgYE0vxiwTpzQDHQ TZo5QNPSaYNrNgmiip7AMBBGk4Mdy1v61PfVdicPi0lMLn/ntO/Zq0yII77BWQNig6Aw 0qE3nM+HPX9Y4shLX9ZXk0cigW7j1dFhs6RQJKK+NtKArDNfq21YGFBBAu0+O3+x26Ss qQjw== X-Gm-Message-State: AJaThX4+FdZS3FjdXLOIKXEedBUbbyA4BhZamlJ6kzokNXZuRyf36qv/ ax8MIj+5HcYYolsWcLOGgg08qg== X-Google-Smtp-Source: AGs4zMaB+6TZCdEKTl5yVD4K9bUA/7W1rQC6msrBTRYvakWKe1IFmTaQfiG4letdj9/nBA61hVjtow== X-Received: by 10.107.20.139 with SMTP id 133mr41024778iou.195.1511708008883; Sun, 26 Nov 2017 06:53:28 -0800 (PST) Received: from zebian ([45.2.119.34]) by smtp.googlemail.com with ESMTPSA id f202sm5601683itc.36.2017.11.26.06.53.27 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 26 Nov 2017 06:53:27 -0800 (PST) From: Noam Postavsky To: control@debbugs.gnu.org Subject: control message for bug #28544 Date: Sun, 26 Nov 2017 09:53:26 -0500 Message-ID: <87o9npxfa1.fsf@users.sourceforge.net> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.2 (/) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.2 (/) retitle 28544 [macOS] emacs will consume 100% cpu after gdb debugee exits tags 28544 + confirmed quit From debbugs-submit-bounces@debbugs.gnu.org Sun Aug 16 12:47:01 2020 Received: (at 28544) by debbugs.gnu.org; 16 Aug 2020 16:47:01 +0000 Received: from localhost ([127.0.0.1]:58304 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k7LoC-00071N-VJ for submit@debbugs.gnu.org; Sun, 16 Aug 2020 12:47:01 -0400 Received: from quimby.gnus.org ([95.216.78.240]:39226) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k7LoA-0006vw-U3 for 28544@debbugs.gnu.org; Sun, 16 Aug 2020 12:46:59 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=KlTAtW5SUNWuvfdpLDiOwrHUolRLRtLQTbHPqUhDOh0=; b=O1z/B41wt8YQClf/693+g+9Hp9 VmCWM2fpJ56WqCLgijxkEOQwthlVWzk+LPVLXH5Zw6fDcyMQaF97lNCNDmrLBLVA1C3hj9iKSP0ty uAPHhxDcD4IMLz3S+VsVk1+VmhKSgHp6blIkLT+RtoDBpYqrwSxGGAYRITvF+yiWOrdU=; Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo) by quimby with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1k7Lo1-0003k8-Na; Sun, 16 Aug 2020 18:46:52 +0200 From: Lars Ingebrigtsen To: Sung Ho Kim Subject: Re: bug#28544: 26.0.50; emacs will consume 100% cpu after gdb debugee exits References: X-Now-Playing: Kate Bush's _This Woman's Work I_: "My Lagan Love" Date: Sun, 16 Aug 2020 18:46:48 +0200 In-Reply-To: (Sung Ho Kim's message of "Wed, 20 Sep 2017 12:03:37 +0900") Message-ID: <87364mv8qv.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Sung Ho Kim writes: > after rebuilding with the aforementioned change, the 100% cpu usage > disappears. I have refrained from offering a patch because I am not > fully knowledgeable with the code and its possible side ef [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 28544 Cc: 28544@debbugs.gnu.org, "Charles A. Roelli" X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Sung Ho Kim writes: > after rebuilding with the aforementioned change, the 100% cpu usage > disappears. I have refrained from offering a patch because I am not > fully knowledgeable with the code and its possible side effects. Well, that's unfortunate, because without a patch it's difficult to interpret just what it is you're proposing. If I piece together the code correctly, you're saying the following patch fixes the problem on Macos? diff --git a/src/process.c b/src/process.c index 15634e4a8b..740891983e 100644 --- a/src/process.c +++ b/src/process.c @@ -5821,7 +5821,9 @@ wait_reading_process_output (intmax_t time_limit, int nsecs, int read_kbd, EIO, just continue, because the child process has exited and should clean itself up soon (e.g. when we get a SIGCHLD). */ - else if (nread == -1 && errno == EIO) + else if (nread == 0 && !NETCONN_P (proc) && !SERIALCONN_P (proc) + && !PIPECONN_P (proc)) +#ifdef DARWIN_OS { struct Lisp_Process *p = XPROCESS (proc); @@ -5838,6 +5840,9 @@ wait_reading_process_output (intmax_t time_limit, int nsecs, int read_kbd, pset_status (p, Qfailed); } } +#else + ; +#endif #endif /* HAVE_PTYS */ /* If we can detect process termination, don't consider the process gone just because its pipe is closed. */ -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Sun Aug 16 12:47:33 2020 Received: (at control) by debbugs.gnu.org; 16 Aug 2020 16:47:33 +0000 Received: from localhost ([127.0.0.1]:58308 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k7Loj-0007Qm-D8 for submit@debbugs.gnu.org; Sun, 16 Aug 2020 12:47:33 -0400 Received: from quimby.gnus.org ([95.216.78.240]:39242) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k7Loh-0007LZ-QL for control@debbugs.gnu.org; Sun, 16 Aug 2020 12:47:32 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Subject:From:To:Message-Id:Date:Sender:Reply-To:Cc: MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=1GO7ZbUfGHQsXb0AZcLikl9ICRvzVU8gIBpNvMOnIdI=; b=vNXg1/GfyRAVb3K+TYgQjFAGZl WWkVdwW2TLccGlx4COKXqmQ/bmkgwvBu4vHJiS0Z5rsHmoy2t7Pk6Xxh0KSklIhTHpv2cXS3WI1c5 dNl/0gqKx2FYBaP7fLGIoBUqhpt1cd8XMV4uo9wXaa0GAMXKfWn8h8cbtaSu1mygXXr0=; Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo) by quimby with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1k7Loa-0003kO-18 for control@debbugs.gnu.org; Sun, 16 Aug 2020 18:47:26 +0200 Date: Sun, 16 Aug 2020 18:47:22 +0200 Message-Id: <871rk6v8px.fsf@gnus.org> To: control@debbugs.gnu.org From: Lars Ingebrigtsen Subject: control message for bug #28544 X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: tags 28544 + moreinfo quit Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) tags 28544 + moreinfo quit From debbugs-submit-bounces@debbugs.gnu.org Tue Nov 24 03:43:29 2020 Received: (at 28544) by debbugs.gnu.org; 24 Nov 2020 08:43:29 +0000 Received: from localhost ([127.0.0.1]:57503 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1khTv7-0002fN-0n for submit@debbugs.gnu.org; Tue, 24 Nov 2020 03:43:29 -0500 Received: from quimby.gnus.org ([95.216.78.240]:51156) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1khTv5-0002fA-4n for 28544@debbugs.gnu.org; Tue, 24 Nov 2020 03:43:27 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=WIs9cnrfN5fEC42B8vYp+oItijddFKxb6Lz5mjlbn5Q=; b=kkj4tUk5Ncqr6ctFsW+MarxPwb AoAbmyFNr0c5TKCRALj8fY5T4KWssw3olYG5+CVG+qatw14HiKiDB5p2kffCBJr4a7kxthOVt2fIG vVkf+dKhh0ayR3/kACVsTOL7NqAG14WWsOE+9yLA2wquaOIyxY53f0gKg9ZW/M8Kap1I=; Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1khTus-0001Nk-M7; Tue, 24 Nov 2020 09:43:20 +0100 From: Lars Ingebrigtsen To: Sung Ho Kim Subject: Re: bug#28544: [macOS] emacs will consume 100% cpu after gdb debugee exits References: <87364mv8qv.fsf@gnus.org> X-Now-Playing: Kid Creole & The Coconuts's _Off the Coast of Me_: "Darrio" Date: Tue, 24 Nov 2020 09:43:13 +0100 In-Reply-To: <87364mv8qv.fsf@gnus.org> (Lars Ingebrigtsen's message of "Sun, 16 Aug 2020 18:46:48 +0200") Message-ID: <87tutf5en2.fsf_-_@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Lars Ingebrigtsen writes: > Well, that's unfortunate, because without a patch it's difficult to > interpret just what it is you're proposing. > > If I piece together the code correctly, you're saying the following > patch fixe [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 28544 Cc: 28544@debbugs.gnu.org, "Charles A. Roelli" X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Lars Ingebrigtsen writes: > Well, that's unfortunate, because without a patch it's difficult to > interpret just what it is you're proposing. > > If I piece together the code correctly, you're saying the following > patch fixes the problem on Macos? This was months ago, and there was no response, so it seems unlikely that there'll be further progress here, and I'm closing this bug report. If further progress can be made, please respond to the debbugs address and we'll reopen. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Tue Nov 24 03:43:36 2020 Received: (at control) by debbugs.gnu.org; 24 Nov 2020 08:43:36 +0000 Received: from localhost ([127.0.0.1]:57506 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1khTvE-0002fj-8B for submit@debbugs.gnu.org; Tue, 24 Nov 2020 03:43:36 -0500 Received: from quimby.gnus.org ([95.216.78.240]:51170) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1khTvC-0002fP-F2 for control@debbugs.gnu.org; Tue, 24 Nov 2020 03:43:34 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Subject:From:To:Message-Id:Date:Sender:Reply-To:Cc: MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=CEBI+7Wmm0srO5poLexgvDKJbNiO2Okbw7c2oGuiDrU=; b=TFU/99olsijXXY9sdh7e8KP3je L8T9LLtYgJ63m8LyLGyi9+Bk9rwCG90uTr8GR1CxmedcOjPYu4Ny09qwantoCgdhGxpP3ooZ1ViIJ +k5mHMUJQGQC/Xdqbw80HK76wjDRAPjlK44Uk0O50iDJ4s10zINRGzojgp4HqbGc5iLg=; Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1khTv4-0001Nt-Ol for control@debbugs.gnu.org; Tue, 24 Nov 2020 09:43:28 +0100 Date: Tue, 24 Nov 2020 09:43:25 +0100 Message-Id: <87sg8z5emq.fsf@gnus.org> To: control@debbugs.gnu.org From: Lars Ingebrigtsen Subject: control message for bug #28544 X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: close 28544 quit Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) close 28544 quit From unknown Fri Jun 20 18:24:43 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Tue, 22 Dec 2020 12:24:08 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator