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 A9972A0032; Tue, 12 Jul 2022 01:02:47 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 434F640687; Tue, 12 Jul 2022 01:02:47 +0200 (CEST) Received: from mail-pg1-f179.google.com (mail-pg1-f179.google.com [209.85.215.179]) by mails.dpdk.org (Postfix) with ESMTP id 4A33C40684 for ; Tue, 12 Jul 2022 01:02:46 +0200 (CEST) Received: by mail-pg1-f179.google.com with SMTP id 145so5991610pga.12 for ; Mon, 11 Jul 2022 16:02:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20210112.gappssmtp.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=5in0UnTm0wc/6B3lsJXB3s+IVFMa+f9IVUDYpCue7dw=; b=gEDxZwYCoxTjT6L49EmSytQZybyUY13vYnxBju+X16Bes1UvwL16Que3KyQXew70Yd T0tawrPNG88yD/yIkstj2Xi0BMQothpOCY7HihIP2khCp8yxQvaS4UubqGZkoU1xEYY1 wb2Z36S0bStm+g5YhpF2vfwbRzcp5Z5t/apqc57VjXr1DsjTgV+DtjPVS/bxCogp1ore hCAawET7GmfijkaYcYhbeilft+arhcQX1TKjZ3oWWogXey/yykJMah3uL2tkQQPDWndg yrRCBcCOQlvecIynni3j+J7lt00Vzlt7+gconLNq0kWYSrYn97rKBzjwnfemIGN3+Et5 d6aA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=5in0UnTm0wc/6B3lsJXB3s+IVFMa+f9IVUDYpCue7dw=; b=5xjnk0sK3IipKhmbM0WvxQetBE/9DgVCpeNDOpCvjHn1CI+pq7KcFb9avXVvhFNaxp NCLpiXgWVZLP64SrvGsnkOSDg2xkJCDCPKihMfORt6CNhJ7+5Bqnd9N3kjmXxlRLnfTw HhQx65nrhPv2izGQ/qJum0NPdZQWvHCQK+S4jAz/n2S6pRCp2AMeM4116MpQ5jkXj5Gl IhI5exNDYzhTk2O+vv5LpVkmD2sOWk++qdAzCdibxp1RBpTzAZDSLV1QxmtoLM0UofAq dYneRcOov88M+b7W1iD0LN5Kn6PBgZkgxpQ0gem4CcmAA6eIKpiy5Gh9iQe0Ule+WhLW EHjg== X-Gm-Message-State: AJIora9LeJB3727xLyl9XOqMoDUoVSZb5w8osSy80g0VBNBFmPEEqm5d IB0WAGKbuKOPBCwP/lGp+ymfzfyyM2SRDA== X-Google-Smtp-Source: AGRyM1skFVsCv0xlvzZmrarTPOH8BMNkZjkI8uKDfJa5di9XP6P8Ovujl0PsXipMv6CooU0kcrXXfA== X-Received: by 2002:a63:4722:0:b0:40d:289e:8637 with SMTP id u34-20020a634722000000b0040d289e8637mr17764194pga.362.1657580565075; Mon, 11 Jul 2022 16:02:45 -0700 (PDT) Received: from hermes.local (204-195-112-199.wavecable.com. [204.195.112.199]) by smtp.gmail.com with ESMTPSA id z2-20020a1709027e8200b0016be2bb8e68sm5206856pla.303.2022.07.11.16.02.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Jul 2022 16:02:43 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Tyler Retzlaff , Chengwen Feng , Anatoly Burakov Subject: [PATCH v3] doc/eal: add signal safety warning Date: Mon, 11 Jul 2022 16:02:41 -0700 Message-Id: <20220711230241.557453-1-stephen@networkplumber.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220705204401.158650-1-stephen@networkplumber.org> References: <20220705204401.158650-1-stephen@networkplumber.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 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. + +.. 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. + + cgroup control ~~~~~~~~~~~~~~ -- 2.35.1