From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Glenn Morris Newsgroups: gmane.emacs.bugs Subject: bug#3225: session manager hang due to block on ice_fd (failure to check for EINTR in select) Date: Wed, 05 Oct 2011 15:02:18 -0400 Message-ID: References: <87prenqn7i.fsf@karlt.net> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1317841387 2357 80.91.229.12 (5 Oct 2011 19:03:07 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 5 Oct 2011 19:03:07 +0000 (UTC) Cc: 3225@debbugs.gnu.org To: Karl Tomlinson Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Oct 05 21:03:03 2011 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1RBWkA-0005UZ-QU for geb-bug-gnu-emacs@m.gmane.org; Wed, 05 Oct 2011 21:03:02 +0200 Original-Received: from localhost ([::1]:52484 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RBWkA-000059-B2 for geb-bug-gnu-emacs@m.gmane.org; Wed, 05 Oct 2011 15:03:02 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:35530) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RBWk7-0008Tu-T1 for bug-gnu-emacs@gnu.org; Wed, 05 Oct 2011 15:03:00 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RBWk6-0001Nq-Iv for bug-gnu-emacs@gnu.org; Wed, 05 Oct 2011 15:02:59 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:48947) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RBWk6-0001Nh-HC for bug-gnu-emacs@gnu.org; Wed, 05 Oct 2011 15:02:58 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1RBWkA-0004pc-C2 for bug-gnu-emacs@gnu.org; Wed, 05 Oct 2011 15:03:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Glenn Morris Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 05 Oct 2011 19:03:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 3225 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 3225-submit@debbugs.gnu.org id=B3225.131784134718518 (code B ref 3225); Wed, 05 Oct 2011 19:03:02 +0000 Original-Received: (at 3225) by debbugs.gnu.org; 5 Oct 2011 19:02:27 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RBWja-0004oc-Iw for submit@debbugs.gnu.org; Wed, 05 Oct 2011 15:02:27 -0400 Original-Received: from fencepost.gnu.org ([140.186.70.10]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RBWjY-0004oV-7r for 3225@debbugs.gnu.org; Wed, 05 Oct 2011 15:02:25 -0400 Original-Received: from rgm by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1RBWjT-0006wR-0s; Wed, 05 Oct 2011 15:02:19 -0400 X-Spook: infowar genetic wire transfer event security AGT. AMME X-Ran: Ha_{W{RL%"mP]=h-)--Wh<*iQyz9Bvu=peRapVg*-XNaH{[ (Karl Tomlinson's message of "Wed, 06 May 2009 09:00:49 +1200") User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Wed, 05 Oct 2011 15:03:02 -0400 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 1) X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:52228 Archived-At: Karl Tomlinson wrote: > 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 Sorry for the delay. Is this still an issue? The current code does not look like that.