From bugs+emacs@karlt.net Tue May 5 14:00:41 2009 Received: (at submit) by emacsbugs.donarmstrong.com; 5 May 2009 21:00:42 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: * X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=1.3 required=4.0 tests=FOURLA,IMPRONONCABLE_1, MURPHY_WRONG_WORD2 autolearn=no version=3.2.5-bugs.debian.org_2005_01_02 Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n45L0acC027498 for ; Tue, 5 May 2009 14:00:37 -0700 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1M1Rki-0003D4-8U for bug-gnu-emacs@gnu.org; Tue, 05 May 2009 17:00:36 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1M1Rkd-0003CH-QI for bug-gnu-emacs@gnu.org; Tue, 05 May 2009 17:00:35 -0400 Received: from [199.232.76.173] (port=57445 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1M1Rkd-0003CE-KJ for bug-gnu-emacs@gnu.org; Tue, 05 May 2009 17:00:31 -0400 Received: from dm-mail01.mozilla.org ([63.245.208.150]:53601) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1M1Rkd-0007jw-0x for bug-gnu-emacs@gnu.org; Tue, 05 May 2009 17:00:31 -0400 Received: from blackhawk. (219-89-53-135.dialup.xtra.co.nz [219.89.53.135]) (Authenticated sender: ktomlinson@mozilla.com) by dm-mail01.mozilla.org (Postfix) with ESMTP id 33B48B8032 for ; Tue, 5 May 2009 14:00:28 -0700 (PDT) To: bug-gnu-emacs@gnu.org Subject: session manager hang due to block on ice_fd (failure to check for EINTR in select) From: Karl Tomlinson Date: Wed, 06 May 2009 09:00:49 +1200 Message-ID: <87prenqn7i.fsf@karlt.net> User-Agent: Gnus/5.1008 (Gnus v5.10.8) Emacs/22.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) 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 From debbugs-submit-bounces@debbugs.gnu.org Wed Oct 05 15:02:27 2011 Received: (at 3225) by debbugs.gnu.org; 5 Oct 2011 19:02:27 +0000 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 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 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 From: Glenn Morris To: Karl Tomlinson Subject: Re: bug#3225: session manager hang due to block on ice_fd (failure to check for EINTR in select) References: <87prenqn7i.fsf@karlt.net> 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") Message-ID: User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Score: -6.4 (------) X-Debbugs-Envelope-To: 3225 Cc: 3225@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 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.4 (------) 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. From debbugs-submit-bounces@debbugs.gnu.org Wed Oct 05 20:09:45 2011 Received: (at 3225) by debbugs.gnu.org; 6 Oct 2011 00:09:45 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RBbWy-0005fm-45 for submit@debbugs.gnu.org; Wed, 05 Oct 2011 20:09:45 -0400 Received: from dm-mail03.mozilla.org ([63.245.208.213]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RBbIt-0005JI-Mj for 3225@debbugs.gnu.org; Wed, 05 Oct 2011 19:55:13 -0400 Received: from soul (unknown [60.234.54.74]) (Authenticated sender: ktomlinson@mozilla.com) by dm-mail03.mozilla.org (Postfix) with ESMTP id 436514AED88; Wed, 5 Oct 2011 16:54:58 -0700 (PDT) From: Karl Tomlinson To: Glenn Morris Subject: Re: bug#3225: session manager hang due to block on ice_fd (failure to check for EINTR in select) In-Reply-To: (Glenn Morris's message of "Wed, 05 Oct 2011 15:02:18 -0400") References: <87prenqn7i.fsf@karlt.net> Date: Thu, 06 Oct 2011 12:54:53 +1300 Message-ID: <87wrcjvvsi.fsf@karlt.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Score: -6.0 (------) X-Debbugs-Envelope-To: 3225 X-Mailman-Approved-At: Wed, 05 Oct 2011 20:09:42 -0400 Cc: Karl Tomlinson , 3225@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 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.0 (------) Glenn Morris writes: > 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. > > Sorry for the delay. Is this still an issue? The current code does not > look like that. I haven't tested, but it looks like this should be fixed by http://bzr.savannah.gnu.org/lh/emacs/trunk/revision/103065 From debbugs-submit-bounces@debbugs.gnu.org Thu Oct 06 02:08:45 2011 Received: (at 3225) by debbugs.gnu.org; 6 Oct 2011 06:08:45 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RBh8P-0008Rk-5w for submit@debbugs.gnu.org; Thu, 06 Oct 2011 02:08:45 -0400 Received: from smtprelay-b12.telenor.se ([62.127.194.21]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RBh8N-0008RY-Es for 3225@debbugs.gnu.org; Thu, 06 Oct 2011 02:08:44 -0400 Received: from iph3.telenor.se (iph3.telenor.se [195.54.127.134]) by smtprelay-b12.telenor.se (Postfix) with ESMTP id 69404C26C for <3225@debbugs.gnu.org>; Thu, 6 Oct 2011 08:08:30 +0200 (CEST) X-SENDER-IP: [85.225.45.201] X-LISTENER: [smtp.bredband.net] X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AgA+AENFjU5V4S3JPGdsb2JhbABEqCYZAQEBATcygVMBAQU4Dw8iARALGAkWDwkDAgECARsMChQGDQEHAQGHewSoQo1khykEmRWDNohp X-IronPort-AV: E=Sophos;i="4.68,495,1312149600"; d="scan'208";a="125717055" Received: from c-c92de155.25-1-64736c10.cust.bredbandsbolaget.se (HELO coolsville.localdomain) ([85.225.45.201]) by iph3.telenor.se with ESMTP; 06 Oct 2011 08:08:30 +0200 Received: from [10.225.16.4] (unknown [193.45.43.33]) by coolsville.localdomain (Postfix) with ESMTPSA id 1F2667FA058; Thu, 6 Oct 2011 08:08:29 +0200 (CEST) Message-ID: <4E8D45DB.4070102@swipnet.se> Date: Thu, 06 Oct 2011 08:08:27 +0200 From: "Jan D." User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:7.0.1) Gecko/20110929 Thunderbird/7.0.1 MIME-Version: 1.0 To: Karl Tomlinson Subject: Re: bug#3225: session manager hang due to block on ice_fd (failure to check for EINTR in select) References: <87prenqn7i.fsf@karlt.net> <87wrcjvvsi.fsf@karlt.net> In-Reply-To: <87wrcjvvsi.fsf@karlt.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -2.1 (--) X-Debbugs-Envelope-To: 3225 Cc: Karl Tomlinson , Glenn Morris , 3225@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 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.1 (--) Karl Tomlinson skrev 2011-10-06 01:54: > Glenn Morris writes: > >> 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. >> >> Sorry for the delay. Is this still an issue? The current code does not >> look like that. > > I haven't tested, but it looks like this should be fixed by > http://bzr.savannah.gnu.org/lh/emacs/trunk/revision/103065 > It should be. The select call in process.c is now used and it handles EINTR properly. Jan D. From debbugs-submit-bounces@debbugs.gnu.org Thu Oct 06 02:50:14 2011 Received: (at control) by debbugs.gnu.org; 6 Oct 2011 06:50:14 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RBhmT-0000zG-1T for submit@debbugs.gnu.org; Thu, 06 Oct 2011 02:50:13 -0400 Received: from fencepost.gnu.org ([140.186.70.10]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RBhmO-0000z6-S9 for control@debbugs.gnu.org; Thu, 06 Oct 2011 02:50:06 -0400 Received: from rgm by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1RBhmH-0006gY-1f for control@debbugs.gnu.org; Thu, 06 Oct 2011 02:49:57 -0400 Date: Thu, 06 Oct 2011 02:49:57 -0400 Message-Id: Subject: control message for bug 3225 To: X-Mailer: mail (GNU Mailutils 2.1) From: Glenn Morris X-Spam-Score: -6.4 (------) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 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.4 (------) close 3225 From unknown Sat Aug 16 15:57:25 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Thu, 03 Nov 2011 11:24:05 +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