From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Pontus Skoeld Newsgroups: gmane.emacs.bugs Subject: Leftovers and lost SIGIOs Date: 13 Sep 2002 15:20:55 +0200 Sender: bug-gnu-emacs-admin@gnu.org Message-ID: NNTP-Posting-Host: localhost.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: main.gmane.org 1031923318 24482 127.0.0.1 (13 Sep 2002 13:21:58 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Fri, 13 Sep 2002 13:21:58 +0000 (UTC) Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 17pqOS-0006Mh-00 for ; Fri, 13 Sep 2002 15:21:56 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10) id 17pqOf-0004EH-00; Fri, 13 Sep 2002 09:22:09 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10) id 17pqNj-00048M-00 for bug-gnu-emacs@gnu.org; Fri, 13 Sep 2002 09:21:11 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10) id 17pqNf-00047B-00 for bug-gnu-emacs@gnu.org; Fri, 13 Sep 2002 09:21:09 -0400 Original-Received: from elanus.its.uu.se ([130.238.4.143]) by monty-python.gnu.org with esmtp (Exim 4.10) id 17pqNf-00046q-00 for bug-gnu-emacs@gnu.org; Fri, 13 Sep 2002 09:21:07 -0400 Original-Received: from elanus (localhost [127.0.0.1]) by localhost (Postfix) with SMTP id 9392348A7; Fri, 13 Sep 2002 15:17:24 +0200 (DFT) Original-Received: from elanus.its.uu.se(127.0.0.1) by elanus.its.uu.se via virus-scan id s21199; Fri, 13 Sep 02 15:17:14 +0200 Original-Received: from r3.ekonomikum.uu.se (r3.ekonomikum.uu.se [130.238.166.240]) by elanus.its.uu.se (Postfix) with ESMTP id 5F5784827; Fri, 13 Sep 2002 15:17:14 +0200 (DFT) Original-Received: (from pont@localhost) by r3.ekonomikum.uu.se (8.10.2+Sun/8.10.2) id g8DDKts00088; Fri, 13 Sep 2002 15:20:55 +0200 (MEST) X-Authentication-Warning: r3.ekonomikum.uu.se: pont set sender to pont@soua.net using -f Original-To: bug-gnu-emacs@gnu.org Original-Lines: 104 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 Errors-To: bug-gnu-emacs-admin@gnu.org X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.0.11 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Bug reports for GNU Emacs, the Swiss army knife of text editors List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.emacs.bugs:3504 X-Report-Spam: http://spam.gmane.org/gmane.emacs.bugs:3504 Hi there, Context: In GNU Emacs 21.2.1 (sparc-sun-solaris2.7, X toolkit, Xaw3d scroll bars) of 2002-04-08 on ida configured using `configure --with-png --with-tiff --with-jpeg --with-xpm = --with-x --prefix=3D/it/sw/gnu --with-gif --datadir=3D/it/sw/gnu/share/lib = --libexecdir=3D/it/sw/gnu/lib' Important settings: value of $LC_ALL: nil value of $LC_COLLATE: nil value of $LC_CTYPE: iso_8859_1 value of $LC_MESSAGES: nil value of $LC_MONETARY: nil value of $LC_NUMERIC: nil value of $LC_TIME: nil value of $LANG: nil locale-coding-system: iso-latin-1 default-enable-multibyte-characters: t (but this goes for 21.1 too). Apart from standard text file/program code editing, I use Gnus (5.9.0), zenirc (2.1112) and LysKOM (a conferencing system, version 0.46). I run Emacs in a screen (3.09.08 (FAU) 1-Sep-00) on a quad-CPU (with Solaris 8 really, we use the same binaries for Solaris 7 and 8) box with very little to do. I'm having problems with Emacs stopping, not accepting input. Other systems work OK (I can see in the message line that lyskom works at least), except for that, the screen doesn't seem to be updated normally (multiple ^G allows the suspension, and after continuing with fg, the screen is not updated properly), resizing the window (which should send SIGWINCH) makes it update correctly. Sending SIGIO (SIGPOLL seems to be the real "native" thing) to the emacs process gets things running again. This never happened to me while using the same software (except for an earlier Gnus, 5.8.8 IIRC) with Emacs 20.x. (Warning! Dusty code a head :) ) I *think* I'm bitten by the following documented race condition in process.c:wait_reading_process_input, or something similar /* If frame size has changed or the window is newly mapped, redisplay now, before we start to wait. There is a race condition here; if a SIGIO arrives between now and the select and indicates that a frame is trashed, the select may block displaying a trashed screen. */ In the same routine, there's also the following code #if defined(sun) && !defined(USG5_4) else if (nfds > 0 && keyboard_bit_set (&Available) && interrupt_input) /* System sometimes fails to deliver SIGIO. David J. Mackenzie says that Emacs doesn't compile under Solaris if this code is enabled, thus the USG5_4 in the CPP conditional. "I haven't noticed any ill effects so far. If you find a Solaris expert somewhere, they might know better." */ kill (getpid (), SIGIO); #endif which I suppose might as well be rewritten with #ifdef SIGIO (and I notice there is similar code further down, so I'm not that it's at all necessary). The reason compilation fails is that Solaris inherits the BROKEN_SIGIO from USG5 (usg5_4.h), causing SIGIO to be undefed. Another note: keyboard.c seems to duplicate some of the work done by systty.h (which it includes), so if I haven't misunderstood something (quite possible), the following should be redundant: /* Allow m- file to inhibit use of FIONREAD. */ #ifdef BROKEN_FIONREAD #undef FIONREAD #endif /* We are unable to use interrupts if FIONREAD is not available, so flush SIGIO so we won't try. */ #ifndef FIONREAD #ifdef SIGIO #undef SIGIO #endif #endif Unfortunately, this bug occurs very rarely, so whatever the solution, it will be a very long time before I dare guess that it has helped (I think there has been an average of two months or so before it occurs). Anyway, unless anyone has a better idea, I'll try by overriding USG5_4s BROKEN_SIGIO, undefing it for Solaris and see if that helps (or if things break). Regards /Pontus --=20 Pontus Sk=F6ld, see for more information.