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 E0FF643B70; Thu, 7 Mar 2024 07:59:43 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id CB546402F2; Thu, 7 Mar 2024 07:59:43 +0100 (CET) Received: from NAM04-DM6-obe.outbound.protection.outlook.com (mail-dm6nam04on2081.outbound.protection.outlook.com [40.107.102.81]) by mails.dpdk.org (Postfix) with ESMTP id ECDBC402EA for ; Thu, 7 Mar 2024 07:59:42 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=iUFtUFcywQfMTwBfEgFonDd8yEhquuLiesk/CC4VxRAga1QZ3PM2oZrjre1Ygn/EkO8/gwnnqHXG4kDq6wED1604AEXEdGatFEBU2VqacqaSO5NB51vpJkEcTahLgpJA7D/oVH9Y40P1GxPhptFGYq96CVvIRTWmfNTVrRMNlFU4kgfL7/iX3tCYYGSpYuARrjwhIDjfw5pOdrmkVebH07CKqOe/GtXUOI4WmFkLnRbaWmeo4+9VeeRmXMlDaWm9pfW1JvF6GWbsspfSKrG1/+HswmIOqQmfzAm+N4C8PkyXrMvZ7Cummm4K32Sb9eIPPSV3p3gmZtKefnZ+XnMMIA== 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=YnRUd6AM6J0KWLKSOjHAJctXiRosHE/Gw1uE64aJtjLMpMJ++tXQnFedhpPC5Xt5D1vQhmr59cjwBy4p6Fs/zrvEfPfys660lwOVRo9jhMqjUWxE0tLYsqGu5J2ESx/q7U4rlTamcfLlVJdDeHapWVDmR8Nw6Ww8A3gUIJtvsdPyjXLsa0mV6CzAXO9GTZnWH7hO8MrOEchJoTg4Ndmhe1SBFEZ9MapBxqMQva41rbOaxVWeim7Eaiv1D8xCRi2p3swwXoE792//A7U8aAHDEgBzc9kruRb8Rl/nSXqx/+A27RHoiydzsGOj5+eSl2slIj+qxpDOnnNHcd0+IzCD4w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.161) 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=L1QbE6gGZsnS1WhMKbxJpnn7XKmB/EqPG50xqTDy+KSLVdjkkGPPBHs7BQVMWh1GpxYnEh7x33VQMZzFTNbSOM+ToKkIVtrMQjnQ1m6Pp5cFDaah4DUrZ+mptTP/Bcl8sz3VGhNVTtiXeNUR4V9jYAo8/1RCd24Lf7G2lL8xDO2CnhuwxY4tQvNNPoMiuPzoqVDmmKBLY1lo5kFGQumvWHcLmesMQ5DtW2phK3xfEjWTGP2z9SJNARoujf5GjPvqAMXiKqww9VASgZKRR6s3UKAjq9vk4HvsQFvWc883Q9L40Ez/sJbAjcQMnip0IuoXRsjGTmqnsFaZCZ1F/rsG6Q== Received: from CH0PR03CA0266.namprd03.prod.outlook.com (2603:10b6:610:e5::31) by DS7PR12MB8346.namprd12.prod.outlook.com (2603:10b6:8:e5::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7339.40; Thu, 7 Mar 2024 06:59:40 +0000 Received: from CH1PEPF0000AD7C.namprd04.prod.outlook.com (2603:10b6:610:e5:cafe::38) by CH0PR03CA0266.outlook.office365.com (2603:10b6:610:e5::31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7292.49 via Frontend Transport; Thu, 7 Mar 2024 06:59:40 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.161) 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.161 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.161; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.161) by CH1PEPF0000AD7C.mail.protection.outlook.com (10.167.244.84) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7362.11 via Frontend Transport; Thu, 7 Mar 2024 06:59:40 +0000 Received: from rnnvmail203.nvidia.com (10.129.68.9) by mail.nvidia.com (10.129.200.67) 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 22:59:24 -0800 Received: from rnnvmail205.nvidia.com (10.129.68.10) 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 22:59:24 -0800 Received: from nvidia.com (10.127.8.9) by mail.nvidia.com (10.129.68.10) 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 22:59:23 -0800 From: Artemy Kovalyov To: CC: Thomas Monjalon Subject: [PATCH 0/5] addressing races in concurrent process startup Date: Thu, 7 Mar 2024 06:59:11 +0000 Message-ID: <20240307065921.29505-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: CH1PEPF0000AD7C:EE_|DS7PR12MB8346:EE_ X-MS-Office365-Filtering-Correlation-Id: 94f89b07-7564-401f-8d74-08dc3e7428f5 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: gjklzfQkWOEjcziZ68ws8aJQLIHOd55jOfwoxSGYnQlgTOR0Xx2Uqyq2n9i6ZL9LdRZRaZpkmkMmR2BziY7Ohv2UliPSjGcmKSBzymezRo615Lny5eIPEpsu37RDv/TA1NOYJXlTqG0M/WDN6twJWf8zb9INIAFWnxchFXK53JNdNm0BSEvtQ9X8VHLBjUl5RVRQJz1cSAnYfxOwyT/k3NU4PT3r6wYGjQfVakqdV2/Jserj6XlqLsLJGoN4+ZoggppuYKvEOm2gPzsqOV1CbPIkLike+ZZsj8MnLmiJ6uBU3FZKB6AjfC9vdfLDGktJnhj9BvmhUupDvjxRl/Rsx7rK9FYpK9AICRPnhzEjIolmmq2+ccdB4uBAHdcxm+p6GEWc690C4gbRqJoGLsmfhOBXeoEQK36bq1MRJoos6LcOqw3GemfzGRGCveshmk6IZVbLUcs3X9IhBT4CUTxNpZuRpscrEuwtPwstzlOgfaLTEcIZh8poggckrW3fuo28x1BsfcFy5dpe9nLr7uQXRtFLIIwUUgsDg1RfN3DBs/lcsAmsVq3iMBX2AWKZYMEgurFyOu8/ytEsbHyMUKREm4fUzfNaJIu4OwBSkXUzPQkZRRmoq55Q/CfB6j5LKAYljlVeKD9HahLjgTX1ZUyp88woKkc5+hEPwqnymOq6fqqxx61Gsa6nLQ8KPv03IEnYDLAVbKCAwkAd0zzfhZVw82rEnw1U9F/GEbYxPQRf9vavsbM+t6cwOl+tzA0jqLgo X-Forefront-Antispam-Report: CIP:216.228.117.161; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:dc6edge2.nvidia.com; CAT:NONE; SFS:(13230031)(376005)(82310400014)(36860700004); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Mar 2024 06:59:40.2514 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 94f89b07-7564-401f-8d74-08dc3e7428f5 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.161]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: CH1PEPF0000AD7C.namprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS7PR12MB8346 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