From owner-freebsd-hackers@freebsd.org Fri Aug 24 19:10:47 2018 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id ABA4A1091A6A for ; Fri, 24 Aug 2018 19:10:47 +0000 (UTC) (envelope-from eric@vangyzen.net) Received: from smtp.vangyzen.net (hotblack.vangyzen.net [199.48.133.146]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 59E7172D7F for ; Fri, 24 Aug 2018 19:10:47 +0000 (UTC) (envelope-from eric@vangyzen.net) Received: from hammy.vangyzen.net (unknown [70.97.188.230]) by smtp.vangyzen.net (Postfix) with ESMTPSA id D4B835646E; Fri, 24 Aug 2018 14:10:39 -0500 (CDT) Subject: Re: Strange hang when calling signal() To: Konstantin Belousov , Gleb Popov <6yearold@gmail.com> Cc: freebsd-hackers References: <20180824185328.GE2340@kib.kiev.ua> From: Eric van Gyzen Message-ID: <4e555da7-9384-0f22-3ef9-8b3661a48529@vangyzen.net> Date: Fri, 24 Aug 2018 14:10:36 -0500 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:60.0) Gecko/20100101 Thunderbird/60.0 MIME-Version: 1.0 In-Reply-To: <20180824185328.GE2340@kib.kiev.ua> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Aug 2018 19:10:47 -0000 On 8/24/18 1:53 PM, Konstantin Belousov wrote: > Since then, we started locking most of that locks in parent around fork(2), > all the code in lib/libthr/thread/thr_fork.c. In particular, we lock rtld, > malloc, and disable cancellation around fork. So if your program used fork(2) > but ended with the broken rtld it is worrying. > > On the other hand, we do not do that for vfork(2). So yes, the minimal We also do not do that for rfork(2). I think we should, but I have not done any research into it. Eric