From debbugs-submit-bounces@debbugs.gnu.org Sun Jul 14 05:17:52 2013 Received: (at submit) by debbugs.gnu.org; 14 Jul 2013 09:17:52 +0000 Received: from localhost ([127.0.0.1]:53698 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1UyIRD-00034q-Tx for submit@debbugs.gnu.org; Sun, 14 Jul 2013 05:17:52 -0400 Received: from eggs.gnu.org ([208.118.235.92]:43053) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1UyIRB-00034I-6X for submit@debbugs.gnu.org; Sun, 14 Jul 2013 05:17:50 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UyIR4-0002CO-Vm for submit@debbugs.gnu.org; Sun, 14 Jul 2013 05:17:43 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-99.2 required=5.0 tests=BAYES_50,USER_IN_WHITELIST autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:41104) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UyIR4-0002CK-Sj for submit@debbugs.gnu.org; Sun, 14 Jul 2013 05:17:42 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44765) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UyIR3-0001Cq-5W for bug-gnu-emacs@gnu.org; Sun, 14 Jul 2013 05:17:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UyIR1-0002Bn-Kt for bug-gnu-emacs@gnu.org; Sun, 14 Jul 2013 05:17:41 -0400 Received: from mathmail.math.s.chiba-u.ac.jp ([133.82.132.2]:58606) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UyIR1-0002B4-42 for bug-gnu-emacs@gnu.org; Sun, 14 Jul 2013 05:17:39 -0400 Received: from church.math.s.chiba-u.ac.jp (church [133.82.132.36]) by mathmail.math.s.chiba-u.ac.jp (Postfix) with ESMTP id 15905C055D for ; Sun, 14 Jul 2013 18:17:32 +0900 (JST) Date: Sun, 14 Jul 2013 18:17:32 +0900 Message-ID: From: YAMAMOTO Mitsuharu To: bug-gnu-emacs@gnu.org Subject: 24.3.50; Subprocess invocation hangs User-Agent: Wanderlust/2.14.0 (Africa) SEMI/1.14.6 (Maruoka) FLIM/1.14.8 (=?ISO-8859-4?Q?Shij=F2?=) APEL/10.6 Emacs/22.3 (sparc-sun-solaris2.8) MULE/5.0 (SAKAKI) Organization: Faculty of Science, Chiba University MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) The following should only be reproducible on the platforms where neither O_CLOEXEC nor O_NOINHERIT is available, such as CentOS 5 or Mac OS X <= 10.6. * Steps to reproduce 1. $ emacs -Q 2. M-x shell RET * Result Emacs hands, blocking at line 1897 in process.c: 1889 /* Wait for child_setup to complete in case that vfork is 1890 actually defined as fork. The descriptor wait_child_setup[1] 1891 of a pipe is closed at the child side either by close-on-exec 1892 on successful execve or the _exit call in child_setup. */ 1893 { 1894 char dummy; 1895 1896 emacs_close (wait_child_setup[1]); 1897 emacs_read (wait_child_setup[0], &dummy, 1); 1898 emacs_close (wait_child_setup[0]); 1899 } where wait_child_setup[] are intended to be close-on-exec: src/process.c: 1670 if (pipe2 (wait_child_setup, O_CLOEXEC) != 0) 1671 report_file_error ("Creating pipe", Qnil); But O_CLOEXEC is actually defined as 0 on the platforms where neither O_CLOEXEC nor O_NOINHERIT is available. lib/fcntl.in.h: 194 #if !defined O_CLOEXEC && defined O_NOINHERIT 195 /* Mingw spells it 'O_NOINHERIT'. */ 196 # define O_CLOEXEC O_NOINHERIT 197 #endif 198 199 #ifndef O_CLOEXEC 200 # define O_CLOEXEC 0 201 #endif As a result, the above pipe2 call does not set the close-on-exec flag for the created file descriptors. Just setting O_CLOEXEC to some non-zero value would cause another problem, because emacs_open uses it for checking its availability: src/sysdep.c: 2168 if (! O_CLOEXEC && 0 <= fd) 2169 fcntl (fd, F_SETFD, FD_CLOEXEC); YAMAMOTO Mitsuharu mituharu@math.s.chiba-u.ac.jp In GNU Emacs 24.3.50.1 (i686-pc-linux-gnu, GTK+ Version 2.10.4) of 2013-07-14 on localhost.localdomain Bzr revision: 113419 eggert@cs.ucla.edu-20130714051848-v62h26m8r874rvlf Windowing system distributor `The X.Org Foundation', version 11.0.70101000 System Description: CentOS release 5.9 (Final) From debbugs-submit-bounces@debbugs.gnu.org Tue Jul 16 03:07:46 2013 Received: (at 14862) by debbugs.gnu.org; 16 Jul 2013 07:07:46 +0000 Received: from localhost ([127.0.0.1]:57408 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1UyzMO-00060V-4c for submit@debbugs.gnu.org; Tue, 16 Jul 2013 03:07:44 -0400 Received: from smtp.cs.ucla.edu ([131.179.128.62]:51495) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1UyzML-000609-Cl for 14862@debbugs.gnu.org; Tue, 16 Jul 2013 03:07:42 -0400 Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp.cs.ucla.edu (Postfix) with ESMTP id 674D339E8106; Tue, 16 Jul 2013 00:07:35 -0700 (PDT) X-Virus-Scanned: amavisd-new at smtp.cs.ucla.edu Received: from smtp.cs.ucla.edu ([127.0.0.1]) by localhost (smtp.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id IaEXl08li17s; Tue, 16 Jul 2013 00:07:34 -0700 (PDT) Received: from [192.168.1.9] (pool-71-108-49-126.lsanca.fios.verizon.net [71.108.49.126]) by smtp.cs.ucla.edu (Postfix) with ESMTPSA id DF56C39E8008; Tue, 16 Jul 2013 00:07:34 -0700 (PDT) Message-ID: <51E4F132.8070203@cs.ucla.edu> Date: Tue, 16 Jul 2013 00:07:30 -0700 From: Paul Eggert Organization: UCLA Computer Science Department User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130623 Thunderbird/17.0.7 MIME-Version: 1.0 To: YAMAMOTO Mitsuharu Subject: Re: 24.3.50; Subprocess invocation hangs X-Enigmail-Version: 1.5.1 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Score: -2.7 (--) X-Debbugs-Envelope-To: 14862 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.7 (--) Thanks for reporting that. I installed what I hope is a fix. Could you please try trunk bzr 113430 or later, on one of those platforms? From debbugs-submit-bounces@debbugs.gnu.org Tue Jul 16 21:46:04 2013 Received: (at 14862-done) by debbugs.gnu.org; 17 Jul 2013 01:46:04 +0000 Received: from localhost ([127.0.0.1]:59487 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1UzGod-0000vy-SP for submit@debbugs.gnu.org; Tue, 16 Jul 2013 21:46:04 -0400 Received: from mathmail.math.s.chiba-u.ac.jp ([133.82.132.2]:64991) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1UzGoZ-0000vN-Vd for 14862-done@debbugs.gnu.org; Tue, 16 Jul 2013 21:46:01 -0400 Received: from church.math.s.chiba-u.ac.jp (church [133.82.132.36]) by mathmail.math.s.chiba-u.ac.jp (Postfix) with ESMTP id 48FDAC055D; Wed, 17 Jul 2013 10:45:55 +0900 (JST) Date: Wed, 17 Jul 2013 10:45:55 +0900 Message-ID: From: YAMAMOTO Mitsuharu To: Paul Eggert Subject: Re: 24.3.50; Subprocess invocation hangs In-Reply-To: <51E4F132.8070203@cs.ucla.edu> References: <51E4F132.8070203@cs.ucla.edu> User-Agent: Wanderlust/2.14.0 (Africa) SEMI/1.14.6 (Maruoka) FLIM/1.14.8 (=?ISO-8859-4?Q?Shij=F2?=) APEL/10.6 Emacs/22.3 (sparc-sun-solaris2.8) MULE/5.0 (SAKAKI) Organization: Faculty of Science, Chiba University MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII X-Spam-Score: -0.4 (/) X-Debbugs-Envelope-To: 14862-done Cc: 14862-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.4 (/) >>>>> On Tue, 16 Jul 2013 00:07:30 -0700, Paul Eggert said: > Thanks for reporting that. I installed what I hope is a fix. Could > you please try trunk bzr 113430 or later, on one of those platforms? Yes. Subprocess invocation no longer hangs on Cent OS 5 or Mac OS X 10.6. Closing the bug. BTW, the transition from explicit file descriptor close before exec by close-process-descs to the use of close-on-exec seems to work as a workaround for a kernel bug on OS X 10.8, which causes kernel panic on exit (Bug IDs 13682, 13726, 13799, 13901, 14119, and 14478). YAMAMOTO Mitsuharu mituharu@math.s.chiba-u.ac.jp From unknown Sun Aug 17 01:23:32 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Wed, 14 Aug 2013 11:24:03 +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