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 2ABBAA0544; Tue, 5 Jul 2022 22:44:16 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id BE5B040687; Tue, 5 Jul 2022 22:44:15 +0200 (CEST) Received: from mail-pj1-f47.google.com (mail-pj1-f47.google.com [209.85.216.47]) by mails.dpdk.org (Postfix) with ESMTP id 2936540223 for ; Tue, 5 Jul 2022 22:44:15 +0200 (CEST) Received: by mail-pj1-f47.google.com with SMTP id o31-20020a17090a0a2200b001ef7bd037bbso8493574pjo.0 for ; Tue, 05 Jul 2022 13:44:15 -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=rtEunflPPbDcJY2lUyAv8LKImmxZNHN4ZD3+OfiRRDYnS5bU7G5vqLG1xHbADCSYG0 iO/pSjU05EuUnXDl07QbsF+nFGNW1sCdDHHjAcJFZftRljxsY/KrFib7/YCVZ9AXs2WW bbe9vSlPYVmKhPcnOs75kov5NoGtJdu1YIDMoDjF3tUrW3Dt0cXdgwfvCmawUPcPSIps q1L1iQktj1cYcKgMazj+0hm0vofrYSk2Pb7Ax0lLwaVlndklFolTxbB+zJAC7NntYQbk aG8EMcpkuq4yl2pdJHVGdvem5Rp0wppdfcRd5iH+W6Ire4pe1TAo3lo8vPgkzYD2vv2o 9lLA== 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=LvZAwxW78af0KEsIIbdw+kYEnKZw9dB6R4saxHiiP9EtXW3y6pE+2wTPf9bj6/hoWs EcEbafGIyj/VQuXzweTuOX0t9VgzNu1cJN6Mnzcg6pScu4P6GH7OcfF9K6d/s1rcKgSA imrp1eWTScpyWRzswLdkT9DBzmCQaYL7ZbvVWuFv5jW9m/TYImd4T/if1J8Lg9hjd9zA 5X0jvgl8Y+xDZFebxHQ0Jc1EjiyNtTq4dJswSdhH6/NWqItPBrUUZQRpC1+szP62nTj9 jM5mnFPxk4ZgignAEJ9hZPqDf0mH1BEQLiB7d/Fjj2W9mULlmD7ZitkV1nQjaozE/aot bazQ== X-Gm-Message-State: AJIora/D49KLIjU/lpiFVwYuAeEI8y02OAm2onHc3JuOIjDSNPuCV5m/ xcTemrTwfWiqfH1nSlauCykgnFr+k/khYUzA X-Google-Smtp-Source: AGRyM1tiv5doPi3kSYrF0LZm19pv+xBbf+RxTOFhURaoNzW74wTpbqbhxVwFj39Bkfl9j46xB5CF9Q== X-Received: by 2002:a17:903:22c6:b0:16b:faf2:8a2f with SMTP id y6-20020a17090322c600b0016bfaf28a2fmr2160420plg.123.1657053853842; Tue, 05 Jul 2022 13:44:13 -0700 (PDT) Received: from hermes.local (204-195-112-199.wavecable.com. [204.195.112.199]) by smtp.gmail.com with ESMTPSA id n63-20020a17090a5ac500b001ec8c53544esm15645062pji.46.2022.07.05.13.44.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Jul 2022 13:44:13 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Tyler Retzlaff , Chengwen Feng , Anatoly Burakov Subject: [PATCH v2] doc/eal: add signal safety warning Date: Tue, 5 Jul 2022 13:44:02 -0700 Message-Id: <20220705204401.158650-1-stephen@networkplumber.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220610152343.38455-1-stephen@networkplumber.org> References: <20220610152343.38455-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