From owner-freebsd-stable@freebsd.org Sat Aug 29 13:01:42 2015 Return-Path: Delivered-To: freebsd-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3E7D29C58D1 for ; Sat, 29 Aug 2015 13:01:42 +0000 (UTC) (envelope-from jilles@stack.nl) Received: from mx1.stack.nl (relay04.stack.nl [IPv6:2001:610:1108:5010::107]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client CN "mailhost.stack.nl", Issuer "CA Cert Signing Authority" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 03CA3B83 for ; Sat, 29 Aug 2015 13:01:41 +0000 (UTC) (envelope-from jilles@stack.nl) Received: from snail.stack.nl (snail.stack.nl [IPv6:2001:610:1108:5010::131]) by mx1.stack.nl (Postfix) with ESMTP id 79843B8411; Sat, 29 Aug 2015 15:01:38 +0200 (CEST) Received: by snail.stack.nl (Postfix, from userid 1677) id 6226C28494; Sat, 29 Aug 2015 15:01:38 +0200 (CEST) Date: Sat, 29 Aug 2015 15:01:38 +0200 From: Jilles Tjoelker To: Konstantin Belousov Cc: Michiel Boland , Mark Martinec , freebsd-stable@freebsd.org Subject: Re: Latest stable (r287104) bash leaves zombies on exit Message-ID: <20150829130138.GA41321@stack.nl> References: <63a84f64baf8768a551fc6464e8e9526@mailbox.ijs.si> <20150827162602.GJ2072@kib.kiev.ua> <55DF5C95.90502@xs4all.nl> <20150827201644.GO2072@kib.kiev.ua> <55DFFADB.2080003@xs4all.nl> <20150828100118.GR2072@kib.kiev.ua> <55E083CA.2050705@xs4all.nl> <20150828161847.GX2072@kib.kiev.ua> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150828161847.GX2072@kib.kiev.ua> User-Agent: Mutt/1.5.21 (2010-09-15) X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 29 Aug 2015 13:01:42 -0000 On Fri, Aug 28, 2015 at 07:18:47PM +0300, Konstantin Belousov wrote: > On Fri, Aug 28, 2015 at 05:52:42PM +0200, Michiel Boland wrote: > > set -e > > for a in `seq 1000` > > do > > echo -n "$a " > > xterm -e ssh nonexisting > > done > > echo "" > > (The idea here is that 'ssh nonexisting' should do some work and then exit, > > "xterm -e false", etc. don't appear to trigger the bug.) > > Prior to the patch, one of the xterms would hang after the counter > > reaches a random (reasonably small) number. > > After the patch the script runs till completion. > Thank you for testing. Funny detail is that your loop does not hangs for > me, I see flapping xterms until the completion. How many cpus does your > machine have ? > Below is a slightly improved version of the change, to avoid unnecessary > relocations. Would be good to rebuild the world and confirm that you > see no regression (the patch also affects rtld in some way). Looks good to me, except that I think a vforked child (in system() and posix_spawn*()) should use the system calls and not libthr's wrappers. This reduces the probability of weird things happening between vfork and exec, and also avoids an unexpected error when posix_spawnattr_setsigdefault()'s mask contains SIGTHR. -- Jilles Tjoelker