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 0EA81436CB; Tue, 12 Dec 2023 05:25:41 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id CCC0E42DD9; Tue, 12 Dec 2023 05:25:36 +0100 (CET) Received: from NAM04-MW2-obe.outbound.protection.outlook.com (mail-mw2nam04on2041.outbound.protection.outlook.com [40.107.101.41]) by mails.dpdk.org (Postfix) with ESMTP id 9594B402EB for ; Tue, 12 Dec 2023 05:25:34 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=OyCW1Y0N3mhfX/5rr+Q8dKa4LEcEPg5N2OsR9ntDbEuPICbdB3QeZpFtj0CSPFwy+/Ymyfke/19p2wJmX2QecJvpcqoqntwtTd8F/hCGSUXrnQ4z+NK23qEz2FD08C7bVo87R/lC/1287EC8eE4FBBdgvdoM4YCFyPyoWU1Pkim1ypZg7/BKWe3Kj/h1cSNtfn3ThUQKgJKIkB/fiskQ5VE+zlxcweewQpROg+XZsDOdzNUDDEr0/LtPHLOSTSA6GxyQEvZCmEkmdhwPwwRXNaz35H7nBNZzx1WEdAZbV42dqSbME5widzBmfRe9ZJA4QPO3jfWToQ/BpnMqo8P6Fg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=K/qYhBxMLprsZaQVZPWaDbfApxRS6aP193I7+76WZuY=; b=AteTMnhX0llpz3m7o42pK13YIGOdYynvJwhqVow0AAClmfGPOZ7tyaylR1MkTM/nYnoikAQiGJUyCSVeTGbpErfAdAWpOMqpSrkxsTzx+MdOriCI7DuGJgTbi7uCDSHBr9M/6W+3cNxpYTXaJby/wIIuAt2QuBNDanp4aH94QWY+/krf1EglIJdLUj4aUY3b0w8JajEV7FD4ZHbLkbr5sApZZG5oPEXVObFGYr/sx6OTgBoKDb3e06C4l5HVowq++QPAWsZyz7LI+XV4h2Ea4HBsZ3WXpDp5wOfHXXbTOB7nHzCT4iRS23MluS8yzcZQZC2FFB4/6nZ3WXhd+sFX7g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.118.232) smtp.rcpttodomain=dpdk.org smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=K/qYhBxMLprsZaQVZPWaDbfApxRS6aP193I7+76WZuY=; b=RRJdgPaX1m9dul3u+gAeIuJZkXl3m/a6rsRJCiMinZCCdVLKTrIf+A78bTucBis9ZvPrSaFpftinP0QqLpFrA62ekgrYm5P6xu7Du+71ik7N49aQjz3HgMSHKkL+KZK05WaFRJxWV04jmIrv86F6XCMIaZjElo0bNaSltFf5gI6clfSDQsnFgqFEa9D49dIfMu4vDCWjx4DgIrYo0gC63HcRJAXfyXpro4EfCsM0L/mdBoqOfny7pl7xbqo25yPf1YqAsvr+PbJRuc5eZAdSDqdFax8ReQrbZoUilISC9q4HKCsIdvW0zyO6sl2cxCrAomCaBr6Lcq/WbjPW5iCzuw== Received: from PH0PR07CA0091.namprd07.prod.outlook.com (2603:10b6:510:4::6) by BN9PR12MB5382.namprd12.prod.outlook.com (2603:10b6:408:103::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7068.33; Tue, 12 Dec 2023 04:25:30 +0000 Received: from SA2PEPF000015CA.namprd03.prod.outlook.com (2603:10b6:510:4:cafe::86) by PH0PR07CA0091.outlook.office365.com (2603:10b6:510:4::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7068.33 via Frontend Transport; Tue, 12 Dec 2023 04:25:30 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.118.232) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.118.232 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.118.232; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.118.232) by SA2PEPF000015CA.mail.protection.outlook.com (10.167.241.200) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7091.18 via Frontend Transport; Tue, 12 Dec 2023 04:25:30 +0000 Received: from drhqmail201.nvidia.com (10.126.190.180) by mail.nvidia.com (10.127.129.5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.41; Mon, 11 Dec 2023 20:25:19 -0800 Received: from drhqmail201.nvidia.com (10.126.190.180) by drhqmail201.nvidia.com (10.126.190.180) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.41; Mon, 11 Dec 2023 20:25:19 -0800 Received: from nvidia.com (10.127.8.9) by mail.nvidia.com (10.126.190.180) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.41 via Frontend Transport; Mon, 11 Dec 2023 20:25:18 -0800 From: Artemy Kovalyov To: CC: Thomas Monjalon Subject: [PATCH 0/5] addressing races in concurrent process startup Date: Tue, 12 Dec 2023 06:25:11 +0200 Message-ID: <20231212042517.164353-1-artemyko@nvidia.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-NV-OnPremToCloud: ExternallySecured X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SA2PEPF000015CA:EE_|BN9PR12MB5382:EE_ X-MS-Office365-Filtering-Correlation-Id: 09b081cc-ed39-48c9-5177-08dbfaca5fda X-LD-Processed: 43083d15-7273-40c1-b7db-39efd9ccc17a,ExtAddr X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: P/gKLQz1L3VT1f5tQAWNzWKqyklwE0j8zNW4dksdy1QozvDvcevk7yb5FC4xf+35B6N1jNCO6zVrhmky3ctgbAQD8GL9v3kRPAsMQMufoi3qufca/YYwZt82jzuRwCxjNYfeUcjRPYwCHakUcjFjLBDmF+vm4dvVHYzlJKrdbWyG6BCjeYk9rFhIW0wueqElSQBhaYu2AQJRvBppi7cmM/otiT1WlPYHd6DvpplInhKfT8i8am+0iUsrv/9GnbpHsEYHnhGgCyvukN08yV8ssVi3cl/wCv0Vi/vEcJKRV0ojVr6xDmXGmd8pty11fTtmeKXj2sG2m8CogH3ZDCeeifw7wDq7u6LHzNkWS7tQJHG2Tf4rijEJmwipmZVaJ50cUP3bvYtmyZ+hkZflLind2/4g388IJGeasAxubNML/o4Ew5ollLC9asOZPLWOvl6lHdQTV2F9IvKocQLZYgqyfcOGV5n7eOnTyKC9uAmV+ndTHLVq+ttAoblZHyA5qSxHILrVHO1mcxx5wSTaLW75nr60sc4r5YMazGRD0xmR1V1TN/s9cZVV99Vw12GF8ICXuaHWD6clgy/7gX1chMs704rfcl2z76GjAKQGPtRnKR/1c2O10IREqe4l5mhjf0dnvCFzT8NmV1IQprBJD/UI4SNTb5PmzqAS5MIHtNkXlaHmVC4LdEs86liGslRDk5sp9cix/BFV3lunjvXHjaWAe734GgrqEHdYVdEiiKbrzLMHdqm2HCd6oGXdeBIRkjC4 X-Forefront-Antispam-Report: CIP:216.228.118.232; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:dc7edge1.nvidia.com; CAT:NONE; SFS:(13230031)(4636009)(136003)(376002)(346002)(396003)(39860400002)(230922051799003)(451199024)(186009)(82310400011)(64100799003)(1800799012)(46966006)(36840700001)(40470700004)(41300700001)(82740400003)(7636003)(8676002)(8936002)(86362001)(316002)(36756003)(70586007)(70206006)(6916009)(478600001)(356005)(2906002)(6286002)(40480700001)(426003)(7696005)(336012)(55016003)(1076003)(26005)(5660300002)(2616005)(83380400001)(40460700003)(47076005)(6666004)(4326008)(36860700001); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Dec 2023 04:25:30.0288 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 09b081cc-ed39-48c9-5177-08dbfaca5fda X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.118.232]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: SA2PEPF000015CA.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN9PR12MB5382 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 In the process of initiating multiple processes concurrently, specifically with automatic detection of the primary process, certain race conditions have been identified. This patch series introduces a straightforward test that showcases the issue and subsequently addresses the problems surfaced by the test. These fixes aim to ensure the robust and secure utilization of DPDK within intricate solutions that involve starting processes with job orchestrators such as Slurm or Hadoop YARN. Artemy Kovalyov (5): app/test-pm: add multiprocess test eal: fix multiprocess hotplug race ipc: fix mp channel closure to prevent message loss eal: fix first time primary autodetect eal: fix memzone fbarray cleanup app/meson.build | 1 + app/test-mp/main.c | 49 +++++++++++++++++++++++++++++++++++++ app/test-mp/meson.build | 8 ++++++ app/test-mp/run.sh | 39 +++++++++++++++++++++++++++++ lib/eal/common/eal_common_memzone.c | 12 +++++++++ lib/eal/common/eal_common_proc.c | 4 +-- lib/eal/common/eal_private.h | 5 ++++ lib/eal/common/hotplug_mp.c | 3 +++ lib/eal/linux/eal.c | 3 ++- 9 files changed, 121 insertions(+), 3 deletions(-) create mode 100644 app/test-mp/main.c create mode 100644 app/test-mp/meson.build create mode 100755 app/test-mp/run.sh -- 1.8.3.1