all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Leftovers and lost SIGIOs
@ 2002-09-13 13:20 Pontus Skoeld
  2002-09-14 17:35 ` Richard Stallman
  0 siblings, 1 reply; 4+ messages in thread
From: Pontus Skoeld @ 2002-09-13 13:20 UTC (permalink / raw)



	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=/it/sw/gnu --with-gif --datadir=/it/sw/gnu/share/lib --libexecdir=/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



-- 

Pontus Sköld, see <URL:http://soua.net/> for more information.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Leftovers and lost SIGIOs
  2002-09-13 13:20 Leftovers and lost SIGIOs Pontus Skoeld
@ 2002-09-14 17:35 ` Richard Stallman
  2002-09-16 13:25   ` Pontus Skoeld
  0 siblings, 1 reply; 4+ messages in thread
From: Richard Stallman @ 2002-09-14 17:35 UTC (permalink / raw)
  Cc: bug-gnu-emacs

We have added #undef BROKEN_SIGIO to src/s/sol2-5.h.  Please
see if rebuilding with that change solves the problem.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Leftovers and lost SIGIOs
  2002-09-14 17:35 ` Richard Stallman
@ 2002-09-16 13:25   ` Pontus Skoeld
  2002-09-16 19:28     ` Richard Stallman
  0 siblings, 1 reply; 4+ messages in thread
From: Pontus Skoeld @ 2002-09-16 13:25 UTC (permalink / raw)
  Cc: bug-gnu-emacs

Richard Stallman <rms@gnu.org> writes:

> We have added #undef BROKEN_SIGIO to src/s/sol2-5.h.  Please
> see if rebuilding with that change solves the problem.

After doing the following to stop it from dying during bootstrap
because of unrequest_sigio

ida$ diff -u src/sysdep.c.real src/sysdep.c
--- src/sysdep.c.real	Mon Sep 16 11:15:33 2002
+++ src/sysdep.c	Mon Sep 16 11:52:23 2002
@@ -988,7 +988,7 @@
 
 #else /* not FASYNC, not STRIDE */
  
-#ifdef _CX_UX
+#if defined(_CX_UX) || (defined(SOLARIS2) && !defined(BROKEN_SIGIO))
 
 #include <termios.h>
 
@@ -1020,7 +1020,7 @@
   interrupts_deferred = 1;
 }
 
-#else /* ! _CX_UX */
+#else /* ! _CX_UX || (SOLARIS2 && !BROKEN_SIGIO) */
 
 void
 request_sigio ()
@@ -1039,8 +1039,7 @@
 
   croak ("unrequest_sigio");
 }
- 
-#endif /* _CX_UX */
+#endif /* _CX_UX || (SOLARIS2 && !BROKEN_SIGIO) */
 #endif /* STRIDE */
 #endif /* FASYNC */
 #endif /* F_SETFL */
ida$

I have so far (after a couple of hours of usage) noticed no ill
effects. Given how seldom the problem has occurred earlier, I think
I'll have to try it for a couple of months before I know whatever it
helps.

	/Pontus
-- 

Pontus Sköld, see <URL:http://soua.net/> for more information.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Leftovers and lost SIGIOs
  2002-09-16 13:25   ` Pontus Skoeld
@ 2002-09-16 19:28     ` Richard Stallman
  0 siblings, 0 replies; 4+ messages in thread
From: Richard Stallman @ 2002-09-16 19:28 UTC (permalink / raw)
  Cc: bug-gnu-emacs

It looks like this will be fixed in our next version, then.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2002-09-16 19:28 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-09-13 13:20 Leftovers and lost SIGIOs Pontus Skoeld
2002-09-14 17:35 ` Richard Stallman
2002-09-16 13:25   ` Pontus Skoeld
2002-09-16 19:28     ` Richard Stallman

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.