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 3EFCD46C1F for ; Fri, 8 Aug 2025 18:17:44 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2B53040673; Fri, 8 Aug 2025 18:17:44 +0200 (CEST) Received: from mail-wr1-f42.google.com (mail-wr1-f42.google.com [209.85.221.42]) by mails.dpdk.org (Postfix) with ESMTP id A0A8D402AB for ; Fri, 8 Aug 2025 18:17:41 +0200 (CEST) Received: by mail-wr1-f42.google.com with SMTP id ffacd0b85a97d-3b783ea5014so1211341f8f.0 for ; Fri, 08 Aug 2025 09:17:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1754669861; x=1755274661; darn=dpdk.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:from:to:cc:subject:date :message-id:reply-to; bh=4AggQjGn6RbPsBpCgHvZ1ORbX9g44hgITpPwTANAAdk=; b=iHqU3D1WG1krqUCGjbpLbcdeWbp1jfpdivVE6O1zILReUFkSYw8BX3+TWEjVPKwZPb AFieX3HlHr3vqblWnJQ7e0rL3sAhk7fvKtqb9CcHJTxH63oUmxeJ9hyp0fXnckUukSfk Qgz1c3qnuh5+plzgZAED9vdsOwjTsRHSJdXUVoeVFe+n+0TsGg1QQj+PVTVu91Vb1tCl pFiiRNMvAq6ywmiLvzeCKoefS7srgHXvJ9gutfZypHUr8dbUbpC4ad4FkH6hVXyQN2V+ QMwHebwnWNkZM/EnRYq+76N0U0gZkPamfdINu34SH6u8CpkYh/MMOSHAV0dgzfG23fEE eA4Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1754669861; x=1755274661; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=4AggQjGn6RbPsBpCgHvZ1ORbX9g44hgITpPwTANAAdk=; b=scqH8YZ8ZF0zrg1GFMV7M4PE1e2L3Eab60mMTV1bZ8KwD4jv2RlP5kLeNymBn0l1yH dHvUp41NpEzSRLZWnS8wuJn0R+yrI2vVAwP31yYqtywdyTb3donYVzx4T58eYD1a4Ri6 icwUBnRu6MtpEGAKs3U+zAR5C33ZJiZvEyJ/g3X7Dj9j+7tKR3GEITkOmJi7MRs+m0wL /fU191Oj2R8cF6GCNbHap3moxYWpuBpc6PBybTNUUAZ/av5ovEh71lh9soZk0Uha+OYU 95OTdJc6A7FzoDiqtlmQ36+xuLyoPekMDZAhGw/pLsw3MNN+RBVI9YWW3yfxgw2wMkyn AGpQ== X-Forwarded-Encrypted: i=1; AJvYcCVxIPSqPGeG2ETWLob1E6Dv2UPMX5v7YLpZ6elTgaYx+fVeKdt0GVYznxCSHOiK6QxlCHQrc7U=@dpdk.org X-Gm-Message-State: AOJu0Yws3wLj541BcC4XxUonEJ2C2Epf6vQ4qv5xLSma8Fhks6PeyA36 uXGnoTAap7QXpV7SFjvWtKdW6dfwkjzDMsEXnoohkblUjq/dbrdV2JHTTBrCB0dNUNw= X-Gm-Gg: ASbGncvrY8SgOBgt8Fgtcz2TqCVieivhtuCeq8GdNvOzndn3PSXo7BUos2yH1Ebm91R HY4LrZCyKxrVbvtOdkR2E8RrYYx9/n51nEOxWv7KNEgKtjR7LIcSpMCBCSAOX34hl8W5u5zbJqo kzbWbBSz6WYdeycfOy2xhwOX4zboikgn28NGrzZTtyVmO4R1MzUUu2kPvmZHSKVOz8lloBaFVkW iROXB96zEINgb93ZpbizE/59CTun4JDi3aMsI8RhgKinFyN3xDwBJkL+kmVXaNoj82NlUIZr7XD 4H4xHbFgw8NMgchBMrz/NRTptXg8ekmUjM3QSKS97UL78PZL30ULrEmmJBRceUjLSKlB/aapC93 ODp8jLo+fAhZqnm01RXIOoUDaS/+62K7E126aQyAZFixlNz/nCKTBbboYdOcEvFpGSYL1C+tQb2 o= X-Google-Smtp-Source: AGHT+IFaDnz4/rWbvbKLmO+59BbCfOCeqMFa1atuzHOtizmwIiZFVwZ+d5BU3a4zHEc44F++JbStqg== X-Received: by 2002:a05:6000:40ce:b0:3b7:c703:ce4 with SMTP id ffacd0b85a97d-3b900b6aad8mr2778504f8f.59.1754669861127; Fri, 08 Aug 2025 09:17:41 -0700 (PDT) Received: from hermes.local (204-195-96-226.wavecable.com. [204.195.96.226]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-458af917d20sm175601055e9.2.2025.08.08.09.17.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Aug 2025 09:17:40 -0700 (PDT) Date: Fri, 8 Aug 2025 09:17:35 -0700 From: Stephen Hemminger To: "Varghese, Vipin" Cc: Khadem Ullah <14pwcse1224@uetpeshawar.edu.pk>, "thomas@monjalon.net" , "Yigit, Ferruh" , "andrew.rybchenko@oktetlabs.ru" , "dev@dpdk.org" , "stable@dpdk.org" Subject: Re: [PATCH] [PATCH v5] app/testpmd: fix segfault in secondary process by monitoring primary Message-ID: <20250808091735.561e6cbb@hermes.local> In-Reply-To: References: <20250729144850.2392840f@hermes.local> <20250730052412.78178-1-14pwcse1224@uetpeshawar.edu.pk> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org On Fri, 8 Aug 2025 03:44:40 +0000 "Varghese, Vipin" wrote: > [AMD Official Use Only - AMD Internal Distribution Only] > > Hi Khadem, > > Snipped > > > > > > > Hi Stephen, > > > > Many thanks for the fix and for the suggestion that the secondary should exit > > immediately without attempting any cleanups once it detects the primary has exited. > > Can you please explain why cleanup of secondary resources are not to be done, If there is specific memory like external hugepage backed mempool none of the callback will be called. Also releasing internal stack memory and heap of secondary is not cleaned. > > Is there specific reason why you do not want to clean? If yes, can you please point to the right direction what is breaking? What happens is that both primary and secondary process have a list head that lists devices (like ethdev). The ethdev's shared part lives in huge pages. When primary exits, it calls the cleanup which frees the list (local part) and the shared part. When secondary calls cleanup, its local part now points to freed data in shared huge pages. That leads to all sorts of issues. There is no need for secondary to do any cleanup, all the local memory disappears when process exits. Also, there is no locking between primary and secondary process.