From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= Newsgroups: gmane.emacs.bugs Subject: bug#32986: 27.0.50; unexpected delay in while-no-input + accept-process-output Date: Mon, 08 Oct 2018 11:48:01 +0100 Message-ID: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1538995631 27009 195.159.176.226 (8 Oct 2018 10:47:11 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 8 Oct 2018 10:47:11 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (windows-nt) To: 32986@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Oct 08 12:47:07 2018 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1g9T47-0006vE-9r for geb-bug-gnu-emacs@m.gmane.org; Mon, 08 Oct 2018 12:47:07 +0200 Original-Received: from localhost ([::1]:45460 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g9T6D-0007yX-Px for geb-bug-gnu-emacs@m.gmane.org; Mon, 08 Oct 2018 06:49:17 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:60337) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g9T64-0007yF-FC for bug-gnu-emacs@gnu.org; Mon, 08 Oct 2018 06:49:11 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1g9T60-0008Ku-Dz for bug-gnu-emacs@gnu.org; Mon, 08 Oct 2018 06:49:08 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:35668) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1g9T5y-0008Jn-7C for bug-gnu-emacs@gnu.org; Mon, 08 Oct 2018 06:49:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1g9T5y-0007cF-5H for bug-gnu-emacs@gnu.org; Mon, 08 Oct 2018 06:49:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 08 Oct 2018 10:49:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 32986 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.153899571029234 (code B ref -1); Mon, 08 Oct 2018 10:49:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 8 Oct 2018 10:48:30 +0000 Original-Received: from localhost ([127.0.0.1]:39926 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1g9T5S-0007bS-1R for submit@debbugs.gnu.org; Mon, 08 Oct 2018 06:48:30 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:50510) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1g9T5Q-0007bD-1I for submit@debbugs.gnu.org; Mon, 08 Oct 2018 06:48:28 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1g9T5D-0007oi-7L for submit@debbugs.gnu.org; Mon, 08 Oct 2018 06:48:16 -0400 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:42043) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1g9T5A-0007ni-56 for submit@debbugs.gnu.org; Mon, 08 Oct 2018 06:48:13 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:60116) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g9T58-0007vC-VE for bug-gnu-emacs@gnu.org; Mon, 08 Oct 2018 06:48:12 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1g9T55-0007mM-L8 for bug-gnu-emacs@gnu.org; Mon, 08 Oct 2018 06:48:10 -0400 Original-Received: from mail-wr1-x429.google.com ([2a00:1450:4864:20::429]:34531) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1g9T55-0007jl-Cz for bug-gnu-emacs@gnu.org; Mon, 08 Oct 2018 06:48:07 -0400 Original-Received: by mail-wr1-x429.google.com with SMTP id z4-v6so20275831wrb.1 for ; Mon, 08 Oct 2018 03:48:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:user-agent:mime-version; bh=YPRV/m09/WWQTMflOkiWXH0v7F/6ShQrEuBK9/gTuTA=; b=Zh+C1Qy+rcF8yrDHPlzmFJhDN+b1Zic09yI27GKCEGQRpkvwQaPuPyUNC7uBFlRWFF tHRnz+bei/p+dvUH/VpBM291Ifw9c+grlCk2WUmreeYIjniup0aMGSpB+82ZmQkdiV9+ 7mET7RqHolTMX/xeVgKpkQcUEnzSEtSK0gJRn6Me1Lm2fbXsBiShIhoqPckWLT8LMiD7 rxxV7JhCThw6jwYdT0Gm6ZRJgPDP9gxhxEstQBHBmsg0uM4Ihl2g3uMG2K5vK4sog7Ja bl9uplGsFfGxzuZeF9CS9Gxyk89DGjZ9BqnNGoqO6Z7v6B1T1ynLbwzu8hzpEjchzm0o NlBg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:user-agent :mime-version; bh=YPRV/m09/WWQTMflOkiWXH0v7F/6ShQrEuBK9/gTuTA=; b=spzeIEu2lPKx1mRW2vrz/k+rlbRTFmms3Fkldvmh1cneCCJhunfAZEz9/OAoLfqfzf KbgM6ZBCm5FbB1nKs/icowZ1oiszCmk/+2Bn7dzOhfzzDxI4IvxZIfrMUHzkeKjblTjW 5L1VXljqHXEnJjFpzvy0u2q7rS0MIHFfSgP3i6haoPAcciVE3uIa+2NBCI77qSOvSdRp sc7APjgWcU2Ndvw0LlQNf7l4fEGFfxTUtt4Mg2SXOi5VCiZEatUh77OoOl7eP7xgN6a3 J1Ww77oTHCDCcKZYN9bERLAtg3lIX/RxAY8XghGtSIVJJhi+FpGrZ2XSX9YCIAsds7Ry 1Qqw== X-Gm-Message-State: ABuFfojydcaM1qI74XMGxgxnkAWny6bwf5qSsD9YyYFCg/BwUXvHnABb oVHJiJBDz3VxbkQwNwvgRLCVyvcA X-Google-Smtp-Source: ACcGV60ywqvpYN16vHMkLcv6Ro0H8DtFrACx1rBAlwQUFHrJAw5jl+aH/Xibt/WMrjihMC2CDTNrUw== X-Received: by 2002:adf:fdc2:: with SMTP id i2-v6mr12510764wrs.276.1538995685734; Mon, 08 Oct 2018 03:48:05 -0700 (PDT) Original-Received: from GONDOMAR.yourcompany.com (mail1.siscog.pt. [89.115.233.242]) by smtp.gmail.com with ESMTPSA id j203-v6sm16957119wmd.46.2018.10.08.03.48.04 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 08 Oct 2018 03:48:05 -0700 (PDT) X-Antivirus: AVG (VPS 181007-4, 07-10-2018), Outbound message X-Antivirus-Status: Clean X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:151007 Archived-At: Hello maintainers, I've asked this in Emacs devel already: https://lists.gnu.org/archive/html/emacs-devel/2018-10/msg00037.html. Someone suggested I report it as a bug. It happens Windows (machine of bug report), but also on my Ubuntu virtual server. I would expect while-no-input to break out of accept-process-output very quickly after user keyboard input. These expectations are met except for some situations. Here's some test code: (defmacro joaot/time (&rest body) `(let ((start (current-time))) (prog1 (progn ,@body) (let ((msg (format "Took %s seconds and returned " (format-time-string "%S.%3N" (time-subtract (current-time) start))))) (if current-prefix-arg (insert "; " msg) (message msg)))))) Now, after each of these, I'm pressing C-u C-x C-e SPC as fast as I can. The second result is unexpected, all the others are fine. Moreover, it varies from 0.7s to as much as 5s. (joaot/time (while-no-input (while t (accept-process-output nil 0.05)))); Expected, took 00.201 seconds and returned t (joaot/time (while-no-input (while t (accept-process-output nil 30)))); Took 02.694 seconds and returned t (joaot/time (while (sit-for 30))); Took 00.126 seconds and returned nil (joaot/time (while (sit-for 0.1))) ; Took 00.093 seconds and returned nil I tried quickly pluggin GDB in at the right time, but I don't know if I'm using the right GDB (using msys's which is pretty slow) and I probably should be using an unoptimized Emacs. Anyway, as a start this is what "bt full" look like: (gdb) bt full #0 0x00007ffc97b0d8c1 in ntdll!DbgBreakPoint () from /c/WINDOWS/SYSTEM32/ntdll.dll No symbol table info available. #1 0x00007ffc97b39a0b in ntdll!DbgUiRemoteBreakin () from /c/WINDOWS/SYSTEM32/ntdll.dll No symbol table info available. #2 0x00007ffc952b3034 in KERNEL32!BaseThreadInitThunk () from /c/WINDOWS/System32/KERNEL32.DLL No symbol table info available. #3 0x00007ffc97ae1461 in ntdll!RtlUserThreadStart () from /c/WINDOWS/SYSTEM32/ntdll.dll No symbol table info available. #4 0x0000000000000000 in ?? () No symbol table info available. Backtrace stopped: previous frame inner to this frame (corrupt stack?) (gdb) xbacktrace Undefined command: "xbacktrace". Try "help". xbacktrace probably failed because of some Python error loading .gdbinit In GNU Emacs 27.0.50 (build 1, x86_64-w64-mingw32) of 2018-10-02 built on GONDOMAR Repository revision: dfbb207ff946792efebb31c0c59b8245c304544a Windowing system distributor 'Microsoft Corp.', version 10.0.17134 System Description: Microsoft Windows 10 Pro (v10.0.1803.17134.286) Recent messages: joaot/time Quit Mark set Quit Mark set Is this a siscog mail? (y or n) n Quit [4 times] Mark set [2 times] Auto-saving...done Type C-x 1 to delete the help window. Quit [3 times] Configured using: 'configure --prefix=/c/emacs/emacs-26 --without-imagemagick --without-dbus' Configured features: XPM JPEG TIFF GIF PNG RSVG SOUND NOTIFY ACL GNUTLS LIBXML2 ZLIB TOOLKIT_SCROLL_BARS THREADS JSON LCMS2 GMP Important settings: value of $LC_CTYPE: en_US.UTF-8 value of $LANG: PTG locale-coding-system: cp1252 Major mode: Message Minor modes in effect: gnus-message-citation-mode: t diff-auto-refine-mode: t savehist-mode: t winner-mode: t ido-everywhere: t electric-pair-mode: t delete-selection-mode: t global-auto-revert-mode: t show-paren-mode: t mml-mode: t company-quickhelp-mode: t company-quickhelp-local-mode: t global-aggressive-indent-mode: t shell-dirtrack-mode: t global-eldoc-mode: t electric-indent-mode: t mouse-wheel-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t column-number-mode: t line-number-mode: t auto-fill-function: message-do-auto-fill transient-mark-mode: t abbrev-mode: t Load-path shadows: Error during checking Features: (shadow emacsbug darkroom face-remap gnus-dup flymake-cc display-line-numbers autoload trace imenu ...) Memory information: ((conses 16 944904 133288) (symbols 56 54804 49) (strings 32 196879 15626) (string-bytes 1 4881114) (vectors 16 98591) (vector-slots 8 2249333 86252) (floats 8 863 1865) (intervals 56 47943 2025) (buffers 992 132))