From: "João Távora" <joaotavora@gmail.com>
To: 32986@debbugs.gnu.org
Subject: bug#32986: 27.0.50; unexpected delay in while-no-input + accept-process-output
Date: Mon, 08 Oct 2018 11:48:01 +0100 [thread overview]
Message-ID: <jjbh8hwpvdq.fsf@gmail.com> (raw)
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))
next reply other threads:[~2018-10-08 10:48 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-08 10:48 João Távora [this message]
2018-10-08 15:05 ` bug#32986: 27.0.50; unexpected delay in while-no-input + accept-process-output Eli Zaretskii
2018-10-08 20:06 ` João Távora
2018-10-08 20:25 ` Eli Zaretskii
2018-10-08 20:39 ` João Távora
2018-10-09 2:32 ` Eli Zaretskii
2018-10-09 8:47 ` João Távora
2018-10-09 15:01 ` Eli Zaretskii
2018-10-14 22:08 ` João Távora
2018-10-15 15:03 ` Eli Zaretskii
2018-10-15 15:50 ` João Távora
2018-12-11 18:09 ` Dmitry Gutov
2018-12-12 21:42 ` João Távora
2018-12-12 23:51 ` Dmitry Gutov
2018-12-13 23:14 ` Dmitry Gutov
2020-09-11 16:22 ` Stefan Monnier
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=jjbh8hwpvdq.fsf@gmail.com \
--to=joaotavora@gmail.com \
--cc=32986@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
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).