From: Karl Tomlinson <bugs+emacs@karlt.net>
To: bug-gnu-emacs@gnu.org
Subject: bug#3225: session manager hang due to block on ice_fd (failure to check for EINTR in select)
Date: Wed, 06 May 2009 09:00:49 +1200 [thread overview]
Message-ID: <87prenqn7i.fsf@karlt.net> (raw)
x_session_check_input in xmsfns.c has this code:
if (select (ice_fd+1, &read_fds,
(SELECT_TYPE *)0, (SELECT_TYPE *)0, &tmout) < 0)
{
ice_fd = -1;
return 0;
}
So ice_fd is set to -1 when select returns due to a signal
(with errno == EINTR). This leaves the fd open but prevents
further processing.
ksmserver then blocks on this connection and so other apps opening
an ICE connection also block during start-up.
The simple solution that I have tested is to only set ice_fd to -1
when errno != EINTR. x_session_check_input can still return early
in this situation as it will be called again in the future.
(Perhaps ice_fd never needs to be set to -1 here. I don't know if
there is ever a good reason why is should be set to -1.)
In GNU Emacs 22.3.1 (x86_64-pc-linux-gnu, GTK+ Version 2.12.11)
of 2009-01-16 on blackhawk
Windowing system distributor `The X.Org Foundation', version 11.0.10503000
configured using `configure '--prefix=/usr' '--host=x86_64-pc-linux-gnu' '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--datadir=/usr/share' '--sysconfdir=/etc' '--localstatedir=/var/lib' '--program-suffix=-emacs-22' '--infodir=/usr/share/info/emacs-22' '--without-carbon' '--with-sound' '--with-x' '--without-toolkit-scroll-bars' '--with-jpeg' '--with-tiff' '--with-gif' '--with-png' '--with-xpm' '--with-x-toolkit=gtk' '--without-hesiod' '--with-kerberos' '--with-kerberos5' '--libdir=/usr/lib64' '--build=x86_64-pc-linux-gnu' '--enable-new-ldflags' 'build_alias=x86_64-pc-linux-gnu' 'host_alias=x86_64-pc-linux-gnu' 'CFLAGS=-O2 -pipe -march=nocona -g1' 'LDFLAGS=-Wl,-O1''
Important settings:
value of $LC_ALL: nil
value of $LC_COLLATE: C
value of $LC_CTYPE: nil
value of $LC_MESSAGES: nil
value of $LC_MONETARY: nil
value of $LC_NUMERIC: nil
value of $LC_TIME: nil
value of $LANG: en_NZ.UTF-8
locale-coding-system: utf-8
default-enable-multibyte-characters: t
Major mode: Group
Minor modes in effect:
gnus-undo-mode: t
msb-mode: t
minibuffer-electric-default-mode: t
auto-image-file-mode: t
mouse-wheel-mode: t
menu-bar-mode: t
file-name-shadow-mode: t
global-font-lock-mode: t
font-lock-mode: t
blink-cursor-mode: t
unify-8859-on-encoding-mode: t
utf-translate-cjk-mode: t
auto-compression-mode: t
temp-buffer-resize-mode: t
column-number-mode: t
line-number-mode: t
transient-mark-mode: t
next reply other threads:[~2009-05-05 21:00 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-05 21:00 Karl Tomlinson [this message]
2011-10-05 19:02 ` bug#3225: session manager hang due to block on ice_fd (failure to check for EINTR in select) Glenn Morris
2011-10-05 23:54 ` Karl Tomlinson
2011-10-06 6:08 ` Jan D.
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87prenqn7i.fsf@karlt.net \
--to=bugs+emacs@karlt.net \
--cc=3225@emacsbugs.donarmstrong.com \
--cc=bug-gnu-emacs@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 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.