From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTPS id A6E2838515F6 for ; Thu, 20 Oct 2022 11:55:51 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org A6E2838515F6 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1666266951; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=cj48Exf1Sez+b667Lc7LRL65YW7hA6fIL841LpGub24=; b=R4ANIHCnz+IBICPEZONAnXXj2fBTkhZR65OSOn5bx+YhXRIb2p4khtrO5TTNNjGEafsxki j5pr4DmQyl+0leGiMgRqjw3s4ywPmeAy6SDsoEsOO+cWz05GbumN9GuVNNaYhYHeUmnxkb 3bsKvChru0ROwc7SuQoka5sVVbjy+Jk= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-81-p3U3WI9jOKSi1Jyxnad5Bg-1; Thu, 20 Oct 2022 07:55:50 -0400 X-MC-Unique: p3U3WI9jOKSi1Jyxnad5Bg-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id BA6241C09C90; Thu, 20 Oct 2022 11:55:49 +0000 (UTC) Received: from oldenburg.str.redhat.com (unknown [10.2.16.74]) by smtp.corp.redhat.com (Postfix) with ESMTPS id B77F3C15BA5; Thu, 20 Oct 2022 11:55:48 +0000 (UTC) From: Florian Weimer To: Adhemerval Zanella Netto Cc: Christian Brauner , Adhemerval Zanella Netto via Libc-help , Rain Subject: Re: posix_spawn: parent can get stuck in uninterruptible sleep if child receives SIGTSTP early enough References: <2921668c-773e-465d-9480-0abb6f979bf9@www.fastmail.com> <7727e4de-a8da-1e6b-4d7c-68a132750996@linaro.org> <64917a2f-788b-4695-b799-63bbb8a4873f@www.fastmail.com> <87tu64w33v.fsf@oldenburg.str.redhat.com> <7c356365-34db-cc00-bb92-0e55e7a89118@linaro.org> <877d27vbdx.fsf@oldenburg.str.redhat.com> <5bcba9d3-7bdd-1855-afb7-1f9d63014842@linaro.org> <87leqbmwkl.fsf@oldenburg.str.redhat.com> <87leqb1f9j.fsf@oldenburg.str.redhat.com> <88e5f61f-253d-5e2a-a0bd-39beff55c82c@linaro.org> <87pmezztah.fsf@oldenburg.str.redhat.com> <47b750c6-f05c-2538-114d-3799628ebf56@linaro.org> Date: Thu, 20 Oct 2022 13:55:46 +0200 In-Reply-To: <47b750c6-f05c-2538-114d-3799628ebf56@linaro.org> (Adhemerval Zanella Netto's message of "Tue, 18 Oct 2022 17:04:29 -0300") Message-ID: <87zgdqd7zx.fsf@oldenburg.str.redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.8 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain X-Spam-Status: No, score=-5.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: * Adhemerval Zanella Netto: >> I don't think switching back to fork by default is really an option. >> The impact on latency is much worse than with vfork. > > I agree and I have been chatting with Christian if we can improve this > with some kernel support. My idea would to add a new clone3 argument > to define a signal mask and another options (either through clone3 > itself or with a new execve variant) to setup the desired signal mask > after execve call. > > The first features is more an optimization to avoid the sigprocmask > (although I think we will need it anyway to proper reap the child if > the spawni fails), while the second feature should fix the issue > raised in this thread. But I think it would only work for SIGTSTP, not for SIGSTOP, right? But maybe SIGSTOP is sufficiently unusual that fixing SIGTSP on its own is already a welcome improvement. Thanks, Florian