From unknown Thu Sep 11 06:33:49 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#11536 <11536@debbugs.gnu.org> To: bug#11536 <11536@debbugs.gnu.org> Subject: Status: 23.4; frequent spurious auto-save while typing Reply-To: bug#11536 <11536@debbugs.gnu.org> Date: Thu, 11 Sep 2025 13:33:49 +0000 retitle 11536 23.4; frequent spurious auto-save while typing reassign 11536 emacs submitter 11536 Jim Paris severity 11536 normal tag 11536 moreinfo thanks From debbugs-submit-bounces@debbugs.gnu.org Mon May 21 17:23:17 2012 Received: (at submit) by debbugs.gnu.org; 21 May 2012 21:23:17 +0000 Received: from localhost ([127.0.0.1]:37705 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SWa4S-0001ck-FF for submit@debbugs.gnu.org; Mon, 21 May 2012 17:23:17 -0400 Received: from eggs.gnu.org ([208.118.235.92]:49957) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SWa4P-0001cX-NH for submit@debbugs.gnu.org; Mon, 21 May 2012 17:23:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SWa3e-00075v-NZ for submit@debbugs.gnu.org; Mon, 21 May 2012 17:22:28 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=unavailable version=3.3.2 Received: from lists.gnu.org ([208.118.235.17]:37374) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SWa3e-00075n-K3 for submit@debbugs.gnu.org; Mon, 21 May 2012 17:22:26 -0400 Received: from eggs.gnu.org ([208.118.235.92]:49647) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SWa3c-0008Bd-49 for bug-gnu-emacs@gnu.org; Mon, 21 May 2012 17:22:26 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SWa3Z-00074c-Ju for bug-gnu-emacs@gnu.org; Mon, 21 May 2012 17:22:23 -0400 Received: from jim.sh ([75.150.123.25]:59182 helo=psychosis.jim.sh) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SWa3Z-00071P-EN for bug-gnu-emacs@gnu.org; Mon, 21 May 2012 17:22:21 -0400 Received: from psychosis.jim.sh (localhost [127.0.0.1]) by psychosis.jim.sh (8.14.4/8.14.4/Debian-2) with ESMTP id q4LLMH03029408 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Mon, 21 May 2012 17:22:17 -0400 Received: (from jim@localhost) by psychosis.jim.sh (8.14.4/8.14.4/Submit) id q4LLMHO3029403 for bug-gnu-emacs@gnu.org; Mon, 21 May 2012 17:22:17 -0400 Date: Mon, 21 May 2012 17:22:17 -0400 From: Jim Paris To: bug-gnu-emacs@gnu.org Subject: 23.4; frequent spurious auto-save while typing Message-ID: <20120521212217.GA29282@psychosis.jim.sh> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.20 (2009-06-14) X-Virus-Scanned: clamav-milter 0.97.3 at psychosis X-Virus-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 (newer, 3) X-Received-From: 208.118.235.17 X-Spam-Score: -6.9 (------) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.9 (------) Hi, I've had a recurring problem with various versions of emacs over the years: as I type into a buffer, "Auto-saving...done" flashes repeatedly in the minibuffer. On some systems, it happens every few characters that I type, while on other systems, it is less frequent (but still more frequent than my auto-save-interval of 300 characters, or my auto-save-timeout value of 30 seconds). Setting auto-save-timeout to 0 makes the problem go away, so it is a problem with the measuring of elapsed time. I'm running "emacs -nw" in an xterm, and the frequency of the problem has always varied quite a bit with my version of X server, Linux kernel, emacs, etc, so I've long suspected that there is a race condition. The way I usually reproduce it is: - run xterm - run "emacs -nw foo.txt" - hold down a key and notice how you see "auto-save" flashing occasionally even though you haven't hit 300 characters or been idle for 30 seconds. I finally got around to looking for the bug, and think I may have tracked it down as follows: (I'm unfamiliar with the emacs code, so please forgive me if I'm stating the obvious or get something wrong) Auto-save due to timeout interval is controlled by keyboard.c:read_char. read_char calls dispnew.c:sit_for with the auto_save_timeout of e.g. 30 seconds. If sit_for returns Qt (no input pending), then the autosave happens. sit_for works by calling process.c:wait_reading_process_output with the same timeout. After wait_reading_process_output returns, it returns Qt if no input was pending. So the auto-save problem that I'm seeing would occur if: - wait_reading_process_output returns before the timeout has expired - no input was received I believe that this happens due to a race condition with SIGIO delivery inside wait_reading_process_output, as follows. Line numbers are from process.c in debian's emacs23-23.4+1. The pseudocode is roughly: 4707: while(1) 4737: set &timeout to the remaining timeout 4739: if time expired, break 4811: set_waiting_for_input(&timeout) 4986: select(..., &timeout) 5007: if (time_limit && nfds == 0 && ! timeout_reduced_for_timers) 5008: /* We wanted the full specified time, so return now. */ 5009: break; 5010: if (nfds < 0) 5011: ... 5129: if (no_avail || nfds == 0) 5130: continue; (I think the comment in 5008 is a typo and meant "We _waited_...") The call to keyboard.c:set_waiting_for_input is essentially telling the keyboard.c:input_available_signal handler to reset &timeout to zero in the case of SIGIO. However, consider what happens if a key is pressed and SIGIO is received between set_waiting_for_input and select. Then timeout will have been set to zero, and select will return immediately with nfds == 0. The check in 5007 will then break the while loop, causing wait_reading_process_output to return immediately without any data having been read -- triggering the auto-save back in keyboard.c:read_char. I've verified with systemtap that select() is indeed being called with a timeout of 0, so I'm pretty sure that this is the problem. It seems the fix is simple: remove lines 5007-5009. It's a small optimization that isn't necessary, because the later check at line 5129 already covers the case where nfds == 0. Continuing the loop is fine, because the top of the loop checks for an expired timeout and returns. Alternately, the "break" in 5009 could be replaced with a "continue" which would still go back up to double-check that the timeout was really hit. Removing the 5007-5009 check fixes the problem on all the systems I've tried. -jim If Emacs crashed, and you have the Emacs process in the gdb debugger, please include the output from the following gdb commands: `bt full' and `xbacktrace'. For information about debugging Emacs, please read the file /usr/share/emacs/23.4/etc/DEBUG. In GNU Emacs 23.4.1 (x86_64-pc-linux-gnu, GTK+ Version 2.24.10) of 2012-04-07 on trouble, modified by Debian configured using `configure '--build' 'x86_64-linux-gnu' '--build' 'x86_64-linux-gnu' '--prefix=/usr' '--sharedstatedir=/var/lib' '--libexecdir=/usr/lib' '--localstatedir=/var/lib' '--infodir=/usr/share/info' '--mandir=/usr/share/man' '--with-pop=yes' '--enable-locallisppath=/etc/emacs23:/etc/emacs:/usr/local/share/emacs/23.4/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/23.4/site-lisp:/usr/share/emacs/site-lisp' '--with-crt-dir=/usr/lib/x86_64-linux-gnu' '--with-x=yes' '--with-x-toolkit=gtk' '--with-toolkit-scroll-bars' 'build_alias=x86_64-linux-gnu' 'CFLAGS=-g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security -Werror=format-security -Wall -DDEBIAN -O2' 'CPPFLAGS=-D_FORTIFY_SOURCE=2'' Important settings: value of $LC_ALL: nil value of $LC_COLLATE: nil value of $LC_CTYPE: en_US.UTF-8 value of $LC_MESSAGES: en_US value of $LC_MONETARY: nil value of $LC_NUMERIC: nil value of $LC_TIME: nil value of $LANG: POSIX value of $XMODIFIERS: nil locale-coding-system: utf-8-unix default enable-multibyte-characters: t Major mode: Text Minor modes in effect: tooltip-mode: t mouse-wheel-mode: t tool-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t auto-encryption-mode: t auto-compression-mode: t column-number-mode: t line-number-mode: t transient-mark-mode: t Recent input: ESC x r e p o r t - e m a c s - b u g RET Recent messages: Loading /etc/emacs/site-start.d/50octave3.2-emacsen.el (source)...done Loading /etc/emacs/site-start.d/50psvn.el (source)...done Loading /etc/emacs/site-start.d/70jim.el (source)... Toggling menu-bar-mode off; better pass an explicit argument. Ready. Loading /etc/emacs/site-start.d/70jim.el (source)...done Loading quail/latin-ltx...done Loading /home/jim/.emacs.d/systemtap-mode.el (source)...done Ready. call-interactively: Text is read-only Load-path shadows: /usr/share/emacs/23.4/site-lisp/cmake/cmake-mode hides /usr/share/emacs/23.4/site-lisp/cmake-data/cmake-mode /usr/share/emacs/23.4/site-lisp/cmake/cmake-mode hides /usr/share/emacs/site-lisp/cmake-mode /usr/share/emacs/23.4/site-lisp/debian-startup hides /usr/share/emacs/site-lisp/debian-startup /usr/share/emacs23/site-lisp/dictionaries-common/flyspell hides /usr/share/emacs/23.4/lisp/textmodes/flyspell /usr/share/emacs23/site-lisp/dictionaries-common/ispell hides /usr/share/emacs/23.4/lisp/textmodes/ispell /usr/share/emacs/23.4/site-lisp/octave3.2-emacsen/octave-inf hides /usr/share/emacs/23.4/lisp/progmodes/octave-inf /usr/share/emacs/23.4/site-lisp/octave3.2-emacsen/octave-mod hides /usr/share/emacs/23.4/lisp/progmodes/octave-mod Features: (shadow sort mail-extr message sendmail ecomplete rfc822 mml mml-sec password-cache mm-decode mm-bodies mm-encode mailcap mail-parse rfc2231 rfc2047 rfc2045 qp ietf-drums mailabbrev nnheader gnus-util netrc time-date mm-util mail-prsvr gmm-utils wid-edit mailheader canlock sha1 hex-util hashcash mail-utils emacsbug systemtap-mode byte-opt bytecomp byte-compile cc-awk cc-langs cl cl-19 cc-mode cc-fonts cc-menus cc-cmds cc-styles cc-align cc-engine cc-vars cc-defs regexp-opt quail help-mode easymenu view emacs-goodies-el emacs-goodies-custom emacs-goodies-loaddefs easy-mmode tooltip ediff-hook vc-hooks lisp-float-type mwheel x-win x-dnd font-setting tool-bar dnd fontset image fringe lisp-mode register page menu-bar rfn-eshadow timer select scroll-bar mldrag mouse jit-lock font-lock syntax facemenu font-core frame cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese case-table epa-hook jka-cmpr-hook help simple abbrev loaddefs button minibuffer faces cus-face files text-properties overlay md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote make-network-process dbusbind system-font-setting font-render-setting gtk x-toolkit x multi-tty emacs) From debbugs-submit-bounces@debbugs.gnu.org Sat Nov 03 11:49:39 2012 Received: (at 11536) by debbugs.gnu.org; 3 Nov 2012 15:49:40 +0000 Received: from localhost ([127.0.0.1]:47317 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TUfyd-0001Oh-3o for submit@debbugs.gnu.org; Sat, 03 Nov 2012 11:49:39 -0400 Received: from mail-da0-f44.google.com ([209.85.210.44]:53951) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TUfya-0001Oa-VG for 11536@debbugs.gnu.org; Sat, 03 Nov 2012 11:49:37 -0400 Received: by mail-da0-f44.google.com with SMTP id h15so2047542dan.3 for <11536@debbugs.gnu.org>; Sat, 03 Nov 2012 08:46:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type; bh=VKuV3FHZijXOqyPegMRuqSW6nRt9Gx43dFCZCh+ueUo=; b=XvxNWbk7h0U6wJ986kFeqKj9PmbUpCkc68un4zyqPujFNBWACHa1d7eWXM/n9azdfw FC6pBf9+PxxBgc8C2jtTSOxZ91gK1VrHr0BQx1QNmAAzkXjjrF8UFYEDJkJbdmxZdz91 9Xv2ILizuTzP839mGPBTHa6TA6fgcZUG2wG/Hq+Y+ultMC3ELpcNC7QvnKn8gV77ryby w3jP9HxUozAXVWlOG77FUTyXcCd3VGgCrQVn1m2YICc4z3rKlVZoLOxnEVk/9qxbTdU4 pSLKWmAUPjA56LOJ/tkL5NnD+sEeOADAfP00C2MjmXJ6obv7BarGP9oS1O02il/NnPwe sGig== Received: by 10.68.202.41 with SMTP id kf9mr16158636pbc.56.1351957601599; Sat, 03 Nov 2012 08:46:41 -0700 (PDT) Received: from ulysses (cm198.gamma83.maxonline.com.sg. [202.156.83.198]) by mx.google.com with ESMTPS id ay5sm7561547pab.1.2012.11.03.08.46.38 (version=SSLv3 cipher=OTHER); Sat, 03 Nov 2012 08:46:40 -0700 (PDT) From: Chong Yidong To: Jim Paris Subject: Re: bug#11536: 23.4; frequent spurious auto-save while typing References: <20120521212217.GA29282@psychosis.jim.sh> Date: Sat, 03 Nov 2012 23:46:36 +0800 In-Reply-To: <20120521212217.GA29282@psychosis.jim.sh> (Jim Paris's message of "Mon, 21 May 2012 17:22:17 -0400") Message-ID: <87d2zupu3n.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.1 (/) X-Debbugs-Envelope-To: 11536 Cc: 11536@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: 0.1 (/) Jim Paris writes: > The call to keyboard.c:set_waiting_for_input is essentially telling the > keyboard.c:input_available_signal handler to reset &timeout to zero in > the case of SIGIO. However, consider what happens if a key is pressed > and SIGIO is received between set_waiting_for_input and select. > Then timeout will have been set to zero, and select will return > immediately with nfds == 0. The check in 5007 will then break the > while loop, causing wait_reading_process_output to return immediately > without any data having been read -- triggering the auto-save back > in keyboard.c:read_char. > > It seems the fix is simple: remove lines 5007-5009. It's a small > optimization that isn't necessary, because the later check at line 5129 > already covers the case where nfds == 0. Continuing the loop is fine, > because the top of the loop checks for an expired timeout and returns. Thanks for the bug report and the analysis. I couldn't reproduce the problem, but off the top of my head the analysis is correct, so I've made the change you suggested in trunk. From debbugs-submit-bounces@debbugs.gnu.org Sat Nov 03 12:39:40 2012 Received: (at control) by debbugs.gnu.org; 3 Nov 2012 16:39:40 +0000 Received: from localhost ([127.0.0.1]:47351 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TUgl1-0002Ue-Sg for submit@debbugs.gnu.org; Sat, 03 Nov 2012 12:39:40 -0400 Received: from mail-pb0-f44.google.com ([209.85.160.44]:35759) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TUgl0-0002UX-6O for control@debbugs.gnu.org; Sat, 03 Nov 2012 12:39:38 -0400 Received: by mail-pb0-f44.google.com with SMTP id ro8so3055787pbb.3 for ; Sat, 03 Nov 2012 09:36:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:subject:date:message-id:mime-version:content-type; bh=tnyvWi7nxDPDPowF9nm7omJoAlea00pXvUsEXAlIGLg=; b=SAvmc+lcDjrTuLj84LWwBd9PdXTQrpKykTEjZsqheii882GvZX0XfE1ulTTj/1eOTo 363Y/O2ICqyM9PBK8z6nhjpgQ0zutk89TZm9KRwdBhvNakTi8Y9bFlkP6xmRdMTOpfYE jlckAGjUqLHQhun9vuSQhJ1kSDdN9nYNBYn3OquSSjesesr+xrKRHf4y07oa5NQw56tv sMCev0SrNpSgv1MajhreOKFmX3rETXSBXLzeemwdAtwYYVgc7lGoreb8E65gVZ/ImlsP FWuqSjNE/VBFAMpUZ3DMTo0MNqK7Ul3hxp0/FHhi1WQjuw5SkoHMFsaO3oUib/dXRd8W kp7Q== Received: by 10.68.138.229 with SMTP id qt5mr16139725pbb.122.1351960602471; Sat, 03 Nov 2012 09:36:42 -0700 (PDT) Received: from ulysses (cm198.gamma83.maxonline.com.sg. [202.156.83.198]) by mx.google.com with ESMTPS id qc7sm7604049pbc.15.2012.11.03.09.36.39 (version=SSLv3 cipher=OTHER); Sat, 03 Nov 2012 09:36:40 -0700 (PDT) From: Chong Yidong To: control@debbugs.gnu.org Subject: close 11536 Date: Sun, 04 Nov 2012 00:36:36 +0800 Message-ID: <87y5iimynf.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.1 (/) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: 0.1 (/) close 11536 thanks From debbugs-submit-bounces@debbugs.gnu.org Sun Nov 04 21:38:40 2012 Received: (at 11536) by debbugs.gnu.org; 5 Nov 2012 02:38:40 +0000 Received: from localhost ([127.0.0.1]:49455 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TVCaF-0007Mg-CU for submit@debbugs.gnu.org; Sun, 04 Nov 2012 21:38:40 -0500 Received: from mail-da0-f44.google.com ([209.85.210.44]:53433) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TVCaC-0007MY-DP for 11536@debbugs.gnu.org; Sun, 04 Nov 2012 21:38:37 -0500 Received: by mail-da0-f44.google.com with SMTP id h15so2466299dan.3 for <11536@debbugs.gnu.org>; Sun, 04 Nov 2012 18:35:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type; bh=yyPkRRRzeJc15B1KXCLm+Af19NpLh6LQITmQ+7bePe0=; b=ZAmZ7B0A4Bx77zh6kZ9UuMWfq0mzlDmYhdfGlIVjfWOyeBWfX3kN5gKR6iS2OYJYel 2gFTSnpWRp/IIOYPqW8FozJW8+kwYmiIxqXcCj9PeaR355vOi6iCieyCftRHdhQTHvSJ rX+IJ9f7bzNy6B2ASjdf/4PhsK3b2iu0Sb5bGdUs7UN/BGRqsF0n9s4XOQSkMGHyxHhm w9WCgC6ysMQ24KbCN7XueH2Bx3tB0Yj/hVavvVdzxXaLHypHfQlBZtvYsVnyZKKJbCJv wfBSeMmacdugpjD55NglyE9E4GGeG/8W0337DUcdcAQErPTiMIj4L6KTsw/xyW/lKnza Fn6Q== Received: by 10.68.83.68 with SMTP id o4mr26841727pby.25.1352082932315; Sun, 04 Nov 2012 18:35:32 -0800 (PST) Received: from ulysses ([155.69.16.255]) by mx.google.com with ESMTPS id sy1sm9722218pbc.66.2012.11.04.18.35.28 (version=SSLv3 cipher=OTHER); Sun, 04 Nov 2012 18:35:31 -0800 (PST) From: Chong Yidong To: "Herbert J. Skuhra" Subject: Re: [Emacs-diffs] /srv/bzr/emacs/trunk r110781: Fix a race condition in wait_reading_process_output (tiny change). References: <86objdhreu.wl%hskuhra@eumx.net> Date: Mon, 05 Nov 2012 10:35:24 +0800 In-Reply-To: <86objdhreu.wl%hskuhra@eumx.net> (Herbert J. Skuhra's message of "Mon, 05 Nov 2012 00:36:25 +0100") Message-ID: <87ehk8epzn.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.1 (/) X-Debbugs-Envelope-To: 11536 Cc: Jim Paris , 11536@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.6 (--) "Herbert J. Skuhra" writes: > the changes in r110781 (and r110782) make Emacs hang on both Arch > GNU/Linux (i686) and FreeBSD 9.1-PRERELEASE (i386), e.g: > when Wanderlust is checking IMAP4 mailboxes. > > Strace on GNU/Linux is showing a loop of: > > poll([{fd=5, events=POLLIN}, {fd=6, events=POLLIN}, {fd=7, > events=POLLIN}, {fd=3, events=POLLIN}], 4, 0) = 0 (Timeout) > pselect6(13, [12], [], NULL, {0, 0}, {NULL, 8}) = 0 (Timeout) > clock_gettime(CLOCK_REALTIME, {1352071692, 886361097}) = 0 > clock_gettime(CLOCK_REALTIME, {1352071692, 886549522}) = 0 > recv(6, 0x887ea58, 4096, 0) = -1 EAGAIN (Resource temporarily > unavailable) > > Ktrace on FreeBSD is showing a loop of: > > 11723 emacs-24.3.50 RET poll 0 > 11723 emacs-24.3.50 CALL pselect(0x13,0xbfbf98bc,0xbfbf983c,0,0xbfbf99f8,0) > 11723 emacs-24.3.50 RET pselect 0 > 11723 emacs-24.3.50 CALL read(0x3,0x849a018,0x1000) > 11723 emacs-24.3.50 RET read -1 errno 35 Resource temporarily unavailable OK. I'm reverting the change and reopening Bug#11536. From unknown Thu Sep 11 06:33:49 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: Did not alter fixed versions and reopened. Date: Mon, 05 Nov 2012 02:39:02 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # Did not alter fixed versions and reopened. thanks # This fakemail brought to you by your local debbugs # administrator From debbugs-submit-bounces@debbugs.gnu.org Mon Aug 23 11:05:03 2021 Received: (at 11536) by debbugs.gnu.org; 23 Aug 2021 15:05:03 +0000 Received: from localhost ([127.0.0.1]:42342 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mIBVW-0000IV-UG for submit@debbugs.gnu.org; Mon, 23 Aug 2021 11:05:03 -0400 Received: from quimby.gnus.org ([95.216.78.240]:44906) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mIBVU-0000Hu-A3 for 11536@debbugs.gnu.org; Mon, 23 Aug 2021 11:05:01 -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=H4ehiBKdXH7CoTF5ab5vdTTWJAAwSC1WmIt6oe653sA=; b=sC2pdaHjWIW8DF+jicfhXTrsZx aWzA3CPlAuh0j+eFFSFY60T3w8S6XFASDPeOxPmLgWFIuedWXQKk/+j1owG/mmWThpW6SDy0sv5z8 /ozKoDxuDCDO3dLqZgNzkcsE5KYZE0J7RHNXCu1OQBXiZVzgb/o0gSrL+CNx4PfULudY=; Received: from [84.212.220.105] (helo=elva) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mIBVJ-0004UO-UR; Mon, 23 Aug 2021 17:04:54 +0200 From: Lars Ingebrigtsen To: Jim Paris Subject: Re: bug#11536: 23.4; frequent spurious auto-save while typing References: <20120521212217.GA29282@psychosis.jim.sh> Date: Mon, 23 Aug 2021 17:04:49 +0200 In-Reply-To: <20120521212217.GA29282@psychosis.jim.sh> (Jim Paris's message of "Mon, 21 May 2012 17:22:17 -0400") Message-ID: <87eeakqk1a.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: Jim Paris writes: > I've had a recurring problem with various versions of emacs over the > years: as I type into a buffer, "Auto-saving...done" flashes repeatedly > in the minibuffer. On some systems, it happens every [...] 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: -2.3 (--) X-Debbugs-Envelope-To: 11536 Cc: 11536@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: -3.3 (---) Jim Paris writes: > I've had a recurring problem with various versions of emacs over the > years: as I type into a buffer, "Auto-saving...done" flashes repeatedly > in the minibuffer. On some systems, it happens every few characters > that I type, while on other systems, it is less frequent (but still more > frequent than my auto-save-interval of 300 characters, or my > auto-save-timeout value of 30 seconds). [...] > I believe that this happens due to a race condition with SIGIO delivery > inside wait_reading_process_output, as follows. Line numbers are from > process.c in debian's emacs23-23.4+1. The pseudocode is roughly: (I'm going through old bug reports that unfortunately weren't resolved at the time.) I seem to remember there being some work done in this area over the last few years, so this may be fixed by now. Are you still seeing this issue in recent Emacs versions? -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Mon Aug 23 11:05:09 2021 Received: (at control) by debbugs.gnu.org; 23 Aug 2021 15:05:09 +0000 Received: from localhost ([127.0.0.1]:42345 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mIBVd-0000It-5U for submit@debbugs.gnu.org; Mon, 23 Aug 2021 11:05:09 -0400 Received: from quimby.gnus.org ([95.216.78.240]:44924) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mIBVb-0000IO-3A for control@debbugs.gnu.org; Mon, 23 Aug 2021 11:05:07 -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=pPRDEFTpm9/QoUa3TGzL8dh621BISrmlVqe0ByoFmk8=; b=OZ7guldHYRxL75bucpnqJSgaRX Ak+kaEvw5H6XcrBKD9BYbisHbvuE1/g+8jcnmmyVAwK7vbn1ThWSbg/9s+T1YH4pjkL7VAHOqg9kz xIOrDUfKdl5nDOKMXL0GSUCnYLN62cCT8GU6cGsh5vFYZW9l7cuDNTt0GHLJGPLeSEd8=; Received: from [84.212.220.105] (helo=elva) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mIBVT-0004UV-IY for control@debbugs.gnu.org; Mon, 23 Aug 2021 17:05:01 +0200 Date: Mon, 23 Aug 2021 17:04:59 +0200 Message-Id: <87czq4qk10.fsf@gnus.org> To: control@debbugs.gnu.org From: Lars Ingebrigtsen Subject: control message for bug #11536 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 11536 + 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: -2.3 (--) 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: -3.3 (---) tags 11536 + moreinfo quit From debbugs-submit-bounces@debbugs.gnu.org Tue Sep 21 01:41:03 2021 Received: (at 11536) by debbugs.gnu.org; 21 Sep 2021 05:41:03 +0000 Received: from localhost ([127.0.0.1]:44646 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mSYWd-0008Kr-Id for submit@debbugs.gnu.org; Tue, 21 Sep 2021 01:41:03 -0400 Received: from quimby.gnus.org ([95.216.78.240]:40198) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mSYWc-0008Jb-0K for 11536@debbugs.gnu.org; Tue, 21 Sep 2021 01:41:02 -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=BKIGA5NqGzW5+dz8uXn0X/YzXrc+HThXMLvVqCx5B58=; b=afALndc+mKUyoOHQqDKzIJT4Et rSEwWzwKgShujY6DZcNNTGhuiiZsrx7kGQIFPoCDz90bXb/eugoyYki8HNxLzpBOiyq6iOv7QNKOD X8MVcRjS/f5gx1a63dD3dAAvDforvyvMgePsPhs0CnRiqd8Z+rWg4KC6By/mt2YMgC7o=; Received: from [84.212.220.105] (helo=elva) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mSYWS-0001RO-LH; Tue, 21 Sep 2021 07:40:55 +0200 From: Lars Ingebrigtsen To: Jim Paris Subject: Re: bug#11536: 23.4; frequent spurious auto-save while typing References: <20120521212217.GA29282@psychosis.jim.sh> <87eeakqk1a.fsf@gnus.org> X-Now-Playing: Mofaya!'s _Like One Long Dream_: "Your Country" Date: Tue, 21 Sep 2021 07:40:52 +0200 In-Reply-To: <87eeakqk1a.fsf@gnus.org> (Lars Ingebrigtsen's message of "Mon, 23 Aug 2021 17:04:49 +0200") Message-ID: <871r5ieba3.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: > I seem to remember there being some work done in this area over the last > few years, so this may be fixed by now. Are you still seeing this issue > in recent Emacs versions? 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: -2.3 (--) X-Debbugs-Envelope-To: 11536 Cc: 11536@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: -3.3 (---) Lars Ingebrigtsen writes: > I seem to remember there being some work done in this area over the last > few years, so this may be fixed by now. Are you still seeing this issue > in recent Emacs versions? More information was requested, but no response was given within a month, so I'm closing this bug report. If the problem still exists, please respond to this email and we'll reopen the bug report. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Tue Sep 21 01:41:07 2021 Received: (at control) by debbugs.gnu.org; 21 Sep 2021 05:41:08 +0000 Received: from localhost ([127.0.0.1]:44649 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mSYWh-0008LE-Q9 for submit@debbugs.gnu.org; Tue, 21 Sep 2021 01:41:07 -0400 Received: from quimby.gnus.org ([95.216.78.240]:40212) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mSYWf-0008Ji-NI for control@debbugs.gnu.org; Tue, 21 Sep 2021 01:41:05 -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=b8z/FfRwPwFvtbXqYOkLMzjANxhed29ImBVQPcrsphc=; b=GZiwDojA4LR0RcdKKM8VgNzYUS quK7Jyg2fxzWU0Ve9cX3gciiJQloew3wnXVRA8H0vpR6FPgD4zQcDrlFE2/841mctp5UVPcP2TwzN D/dbMTRQnvCr1SH6XEH3b5QFF9Y60X7pb2JhkxBY9Ku6KhQXUOPWQWetQb6pcHJ1nbVo=; Received: from [84.212.220.105] (helo=elva) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mSYWX-0001RW-N2 for control@debbugs.gnu.org; Tue, 21 Sep 2021 07:40:59 +0200 Date: Tue, 21 Sep 2021 07:40:57 +0200 Message-Id: <87zgs6cwpi.fsf@gnus.org> To: control@debbugs.gnu.org From: Lars Ingebrigtsen Subject: control message for bug #11536 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 11536 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: -2.3 (--) 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: -3.3 (---) close 11536 quit From unknown Thu Sep 11 06:33:49 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, 19 Oct 2021 11:24:06 +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