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 9DD9543B6C; Thu, 7 Mar 2024 08:01:35 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8905E402F2; Thu, 7 Mar 2024 08:01:35 +0100 (CET) Received: from NAM10-DM6-obe.outbound.protection.outlook.com (mail-dm6nam10on2056.outbound.protection.outlook.com [40.107.93.56]) by mails.dpdk.org (Postfix) with ESMTP id B9EB1402EA for ; Thu, 7 Mar 2024 08:01:34 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=b40nvRXL/hXx0xCsfVnmPrDTMLUnc9MFhNmrLrI66EIwhosmXnPXzWeB122u3IInBSwp8RUAaCvkjmNG3y64hbbheevaYKj85JTrsBhX0tCsdEFLy9ZGh7Uv78F28uyPF3D1cnQYRUojlOx+9NGqEmMvdvf/F98uoQDj3sJ779lSs6Sjoqt76hDysTI9j0n7UH7s+ZBZe0kRMfXrtp9u2VDhd7zo/qVLO66We3NiC+5tvZlz5t2j+YnDh17nvnteYSvQyMj9xHorMVRD+3O7d+UepZAYwBsAlqxf3792Y2cOPakweC5h7ZSvoXXc8+fSfq7lYMxdReVaogt87weR+A== 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=IzyutoTbw/yX+7a60WgeeJLExaa4C4o3zMz7XaUPTBU=; b=gFhGnq3Xh1H+HZK6cCosFh2G+5Vizc56sXFTy6yrwbjHFIHAkiAP3xTCAs7a+PIGeSJTWDRwiVfNar3kkKPlAHO73oGzG+kYM928XuqzRQ9tiIutTWIKcna/EfEw2btFxOo9kOGH+vRS/7pPUzfPdiowx0XVyAt3ypx2XxWPohUgEzNiXF6dJEWtEEvufav1KeoA/LWdCu7RaNePhtZB+PPFnI8cHUP8lr028zFvX91EPbZsUi3UdXjRqO17je5hgH8+jsXAJ+w7tIUgPOyB8yBV2tM599vzAz7EdcNQ++zB3l+v4Ybs4HapdZiNKmw9sXEEp8Zt2C6xZaIFnfhpYw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.160) 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=IzyutoTbw/yX+7a60WgeeJLExaa4C4o3zMz7XaUPTBU=; b=KeVu9sXH3oCuVcxjWtBJv3LRpd61+kUGu8LR8JIAY3aclZeInQfQlETqK9k3X4UXVjDhR1vzsy7PGQ6vO/oPhTf86QzGaCck8vW0b5LmncYoPfj7/MPL8OGYX51p35Mp5CafMpK+eYFcDCVe0+4TVv0Fbja7uLRkRgeo89xh7e43MqOa2txwbiLK0f8aLI8YqEE/Cgxyq1CbiDgs8+aXUB7geWCnaDkEeuVAad4aR4ErRV4FPyv8leE8FWzmDYssGo6IjqHOTRpti5M/0B3u3vWUa0OkSOkek0qrLPy/D2W/jEubc/d5FjhZE7mtx60f6Wdb/rYa6v63JrI8rWdtcQ== Received: from MW4PR04CA0197.namprd04.prod.outlook.com (2603:10b6:303:86::22) by SJ1PR12MB6099.namprd12.prod.outlook.com (2603:10b6:a03:45e::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7362.24; Thu, 7 Mar 2024 07:01:31 +0000 Received: from CO1PEPF000044FC.namprd21.prod.outlook.com (2603:10b6:303:86:cafe::7c) by MW4PR04CA0197.outlook.office365.com (2603:10b6:303:86::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7362.24 via Frontend Transport; Thu, 7 Mar 2024 07:01:31 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.160) 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.117.160 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.160; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.160) by CO1PEPF000044FC.mail.protection.outlook.com (10.167.241.202) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7386.0 via Frontend Transport; Thu, 7 Mar 2024 07:01:31 +0000 Received: from rnnvmail203.nvidia.com (10.129.68.9) by mail.nvidia.com (10.129.200.66) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.41; Wed, 6 Mar 2024 23:01:16 -0800 Received: from rnnvmail203.nvidia.com (10.129.68.9) by rnnvmail203.nvidia.com (10.129.68.9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1258.12; Wed, 6 Mar 2024 23:01:16 -0800 Received: from nvidia.com (10.127.8.9) by mail.nvidia.com (10.129.68.9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1258.12 via Frontend Transport; Wed, 6 Mar 2024 23:01:15 -0800 From: Artemy Kovalyov To: CC: Thomas Monjalon Subject: [PATCH 0/5] addressing races in concurrent process startup Date: Thu, 7 Mar 2024 07:01:08 +0000 Message-ID: <20240307070113.29580-1-artemyko@nvidia.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231212042517.164353-2-artemyko@nvidia.com> References: <20231212042517.164353-2-artemyko@nvidia.com> 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: CO1PEPF000044FC:EE_|SJ1PR12MB6099:EE_ X-MS-Office365-Filtering-Correlation-Id: 661a644c-419f-4a1c-4ed4-08dc3e746b2e 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: /J85H8UEFwZpkuHcGl7mUBJxHt9Ig036nWIJLUzjuUa1A9kNP5zlmgpgwsAvB7phXcC8QbS/Cec+sLuYL0Aema5ruUHknZ8S+iR1zf0GxG3yLRl0MNCGwhcMtbqCmN6kNblWseANZyAAyeRsUjQuwYz8QhWJ9GCQkLp4/d24YqUTYpsmL99vGyHpuE4WTkaU4WfmaICRn89Z6ODg3EjRWIA60a7Olbt2DyRV2Nmcff2prrlBf0cMTv2sfz9P/fBGzF0ZwEVrOBkF9V3BTM6ayu+lJQMm97QNYyBsvo9e8WXDdVNh3mHcXyo70Iu8Q4eADhdJMwS4VllmcPw+IEiNWINCcijWQ5cFKImmoVwi75aMcEVlEysgHgvyVBxeXbD5hPLi+VFV5YSoAnxQz9JB7O7ar3VKu4olXJA5JE9AA090zFIt5DDq5GtMphh8joCOq7f/8/XHnwIKkxc0KgzYHx2bym8qZp1vaWjrtyW8bSB/IYEl20M2Qlx00XsRYh5J69VhjI9RpOniqKfUwyS6Qo46OwktAVr3VliUkiaDDTyywowmaPEIwNgLIxFCM/X7uqWQwPONM2yR8NNE2U07uYQG4QhlnZ8cBpdhY51j+FfPheLPHx5HRxY0QoW++z6iR9rsTMXHc41I+QmP6sjDXG04FUwFHCySRkH606cgAsPuwU2I5YT37yUK6w4PLxquHhpYWxHHNc5NNOPxxgvl+Qkzuem/HDt5ejJB0BkhvTu3HMXZOhyCU2tgnyZl0aiU X-Forefront-Antispam-Report: CIP:216.228.117.160; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:dc6edge1.nvidia.com; CAT:NONE; SFS:(13230031)(36860700004)(376005)(82310400014); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Mar 2024 07:01:31.3530 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 661a644c-419f-4a1c-4ed4-08dc3e746b2e X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.117.160]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: CO1PEPF000044FC.namprd21.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ1PR12MB6099 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-mp: 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 | 52 +++++++++++++++++++++++++++++++++++++ app/test-mp/meson.build | 8 ++++++ app/test-mp/run.sh | 40 ++++++++++++++++++++++++++++ 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, 125 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