From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 18C4BA0032; Mon, 11 Jul 2022 23:15:34 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id AC2FB40687; Mon, 11 Jul 2022 23:15:33 +0200 (CEST) Received: from wout5-smtp.messagingengine.com (wout5-smtp.messagingengine.com [64.147.123.21]) by mails.dpdk.org (Postfix) with ESMTP id DB27640156 for ; Mon, 11 Jul 2022 23:15:32 +0200 (CEST) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.west.internal (Postfix) with ESMTP id 059D23200708; Mon, 11 Jul 2022 17:15:29 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute1.internal (MEProxy); Mon, 11 Jul 2022 17:15:30 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= cc:cc:content-transfer-encoding:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to; s=fm3; t=1657574129; x= 1657660529; bh=uYjkcyMDeqbG/HLpSrl0L8eJQh/GrbJ4piOxVhd82yE=; b=t s6Bj/KzIB2OyZGFFgxJ5glAzBPGy5lKEuQMBcVciwq5cDHfeV+EHOcqJKK/4o6Hp NyKOIp5L0dd7YMDpADiS7PMWwEYU4+BhIyl+MICI6bjK1VpH6aOVK+I6gAHRGFoz WDMTVeasx2mYhbBYF9bwOFZIMIqYlnYZIuy08w9qJ1mVf+38DywB/Sv4eXoACyyy NQ6qZyCQq1UmQm8Xk3DAb1QiqOlkc/LXo8zacBElAbtwcPLFjSeGblqi45rMpAy9 kAhR9bqfbXE1+84oCMhfcZWI4J+oNBzSIKUL39j+Mn+7uj4t+RpIiPc16Ngl9nyZ JBoGp2GTMqYsZ0pZv5Dbw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t=1657574129; x= 1657660529; bh=uYjkcyMDeqbG/HLpSrl0L8eJQh/GrbJ4piOxVhd82yE=; b=P h5Q2NhPlmerzZSU58saGxGwS7MtK7xqHFaNFZ5XZ+NjdfttP2nM2a2k9Bl5vTfn1 6qvjWsA7bFOA/NG+nxn1QGRgh45v43CgEsl28YmQS8xqco1GV6zhmnk6/GPBIepo GJMx2vnBf1bBtZ/CqktsLG8LLnmq5bClUWXAOns+hoFOooMIsnOrH9WFTGlPzzai rsm0QoMxczisC9TekcMwsZ4jgHvKm3tVVgyDaVE3pVlpsYf9WMydjr5TAObrcSnD esR1qJlxpgMqi4YNOmPudy5nW+mQ2VUQkTF0DlETyrlwkeFiYRbt4751NmLWycHa 3GmjLurHFENT4/S7R/hJw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedrudejfedgudehkecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefhvfevufffkfgjfhgggfgtsehtufertddttddvnecuhfhrohhmpefvhhho mhgrshcuofhonhhjrghlohhnuceothhhohhmrghssehmohhnjhgrlhhonhdrnhgvtheqne cuggftrfgrthhtvghrnheptdejieeifeehtdffgfdvleetueeffeehueejgfeuteeftddt ieekgfekudehtdfgnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilh hfrhhomhepthhhohhmrghssehmohhnjhgrlhhonhdrnhgvth X-ME-Proxy: Feedback-ID: i47234305:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 11 Jul 2022 17:15:27 -0400 (EDT) From: Thomas Monjalon To: Stephen Hemminger Cc: dev@dpdk.org, Tyler Retzlaff , Chengwen Feng , Anatoly Burakov , david.marchand@redhat.com, bruce.richardson@intel.com Subject: Re: [PATCH v2] doc/eal: add signal safety warning Date: Mon, 11 Jul 2022 23:15:26 +0200 Message-ID: <3005473.57xzQst1vy@thomas> In-Reply-To: <20220705204401.158650-1-stephen@networkplumber.org> References: <20220610152343.38455-1-stephen@networkplumber.org> <20220705204401.158650-1-stephen@networkplumber.org> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org 05/07/2022 22:44, Stephen Hemminger: > The DPDK is not designed to be used from a signal handler. > Add a notice in the documentation describing this limitation, > similar to Linux signal-safety manual page. > > Bugzilla ID: 1030 > Signed-off-by: Stephen Hemminger > Acked-by: Tyler Retzlaff > Acked-by: Chengwen Feng > --- > doc/guides/prog_guide/env_abstraction_layer.rst | 15 +++++++++++++++ > 1 file changed, 15 insertions(+) > > diff --git a/doc/guides/prog_guide/env_abstraction_layer.rst b/doc/guides/prog_guide/env_abstraction_layer.rst > index 67842ae27207..de7ee92bba39 100644 > --- a/doc/guides/prog_guide/env_abstraction_layer.rst > +++ b/doc/guides/prog_guide/env_abstraction_layer.rst > @@ -818,6 +818,21 @@ Known Issues > > The debug statistics of rte_ring, rte_mempool and rte_timer are not supported in an unregistered non-EAL pthread. > > ++ signal safety > + > + The DPDK library is not designed to be async-signal-safe. > + Except where explicitly stated otherwise [#]_, the DPDK functions are nonreentrant and are unsafe to call from a signal handler. > + > +.. [#] Only the function ``rte_dump_stack()`` can safely be called from signal handler in this version of DPDK. Really? Are you sure? Note: the use of [#] is probably limited to a single usage in the page? > + > +.. note:: > + The kinds of issues that make DPDK functions unsafe can be understood when > + one considers that much of the code in DPDK uses locks and other shared > + resources. If a device driver holding a ``rte_spinlock`` is interrupted > + by a signal and control operation is then performed that would acquire > + the same lock, a deadlock would result. I find this note quite confusing.