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 AC343A0032; Fri, 21 Oct 2022 21:58:28 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 52B3A400D6; Fri, 21 Oct 2022 21:58:27 +0200 (CEST) Received: from mail-pf1-f173.google.com (mail-pf1-f173.google.com [209.85.210.173]) by mails.dpdk.org (Postfix) with ESMTP id 9A50640042 for ; Fri, 21 Oct 2022 21:58:25 +0200 (CEST) Received: by mail-pf1-f173.google.com with SMTP id g28so3549556pfk.8 for ; Fri, 21 Oct 2022 12:58:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20210112.gappssmtp.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:from:to:cc:subject:date :message-id:reply-to; bh=hOwe0sGlxrYRjYdiscRtx30OrqlIH44o8o+n/nhJR8c=; b=gH/4MGIYZ+pGwI3LpVB0P9mvZib/yuoz5hDrT6MU2REyleeMJCbGdqY1oFMZGuq4O6 QTlnx1oEOfdI9Xgean9BeDUtR5XHh/Xs0TnrjK76YKSlfwbDnwWYrHF5PEbhSZbQrYm3 tRAXn1h0sADScY+/MiGP/ux5cU2eYhtMR6E6SHbPz4bijBrVow+AjjwpBPg6c/W5excj 4uCyVLfV7hqUYni1JFe0HeTvSQ6lEQg4R3lk/SUpS6TSr1zHLONwPPRIQSEwBPiI2RGt VtZFsyZjb6RWy5i4SuBxu79CiXQpqKNBXXGcqZuK96wFiWvvXsXOJlG8SJI6A5Yabi5g TynQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=hOwe0sGlxrYRjYdiscRtx30OrqlIH44o8o+n/nhJR8c=; b=w/1KQm9qFvAQ0PxxmlLS3T2s4hwtWuZ/Tt18GVVmT9+yIXlX6rm+270Gy69hj6D7qO 0TCW3Lx5m2LXaz1ZD9HFROvqQf8YvwK2d4rLEDIop1HiRAYX8F7wEGIFKnQXARsAZjDE uzjaef3YHV4mUygIl5oMYSMh20C4gYOV4e2NmEOHirkHbvUDJ+BTy4CcyWJ9xTvuSfC0 ItELE+TcoFb5x9mXdUNRs/mbNhgth23coL86MeRJWabvrnjUPWsdPz00omu6KF0PEcWT tyGbOqe0ivz3sfZswN8K/8qMdNwo1Y4kq4zNFzOL8jB1Jra1TUHWDd5PwbcAXex65Lou ZBhA== X-Gm-Message-State: ACrzQf2yIUHosha7pqp4YnjaFpR6NNR1jkhLmlyUp2LEqlwIJeCBDiKF eYUoL6gVt1AXGEBc867yofuVAQ== X-Google-Smtp-Source: AMsMyM5wizD45BtDx177P6KxbHygxk99UijdPvSfcETtgHjR9ec1SncF0k982YCnmd+1i0DPBcNWkA== X-Received: by 2002:aa7:8e8c:0:b0:562:a549:efc5 with SMTP id a12-20020aa78e8c000000b00562a549efc5mr20831944pfr.20.1666382304644; Fri, 21 Oct 2022 12:58:24 -0700 (PDT) Received: from hermes.local (204-195-120-218.wavecable.com. [204.195.120.218]) by smtp.gmail.com with ESMTPSA id z18-20020aa79592000000b0053e2b61b714sm15377842pfj.114.2022.10.21.12.58.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 21 Oct 2022 12:58:24 -0700 (PDT) Date: Fri, 21 Oct 2022 12:58:22 -0700 From: Stephen Hemminger To: Thomas Monjalon 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 Message-ID: <20221021125822.25c75e39@hermes.local> In-Reply-To: <3005473.57xzQst1vy@thomas> References: <20220610152343.38455-1-stephen@networkplumber.org> <20220705204401.158650-1-stephen@networkplumber.org> <3005473.57xzQst1vy@thomas> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit 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 On Mon, 11 Jul 2022 23:15:26 +0200 Thomas Monjalon wrote: > 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? Yes. this is true, please apply this patch. It is not safe to call functions that do any of the following: printf malloc according to Linux async-signal-safe documentation And because these all have locking or equivalent atomic the following in DPDK are unsafe. rte_ring rte_timer rte_spinlock, rte_rwlock, ... any PMD operations