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 DCDA142C99 for ; Mon, 12 Jun 2023 16:47:35 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D6BD242B8E; Mon, 12 Jun 2023 16:47:35 +0200 (CEST) Received: from out4-smtp.messagingengine.com (out4-smtp.messagingengine.com [66.111.4.28]) by mails.dpdk.org (Postfix) with ESMTP id 3FD6E40698; Mon, 12 Jun 2023 16:47:33 +0200 (CEST) Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id C8C765C010D; Mon, 12 Jun 2023 10:47:32 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute2.internal (MEProxy); Mon, 12 Jun 2023 10:47:32 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= cc:cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to; s=fm2; t= 1686581252; x=1686667652; bh=rtp+19M8a0H+dgaBbrz+8rkcO9voUMZSiJG 6PJJ+Ce4=; b=ag+pJW5a8CwIbnzto0Lbwbg3m7dMIYldO4BLVPEak0ByTB/p4Rs x1tDwF0pWYmH+qJ/8qwzyeDJ703u3wzRRZ2lPYnJFslJ6qnkaWolry6HiB+UweBd 0Wuu7zI5gILeJYHWswdTQCUgXR6o+O8nDWZ5Y/9qaw/24+Vu0sZ/wi1FUbFftnZi 1NSN6RK/Tq6hWcUu5JB60TclaAtlACfS0wGPSuUJvADbbP5zzjHvdjLu0RJRw8eq WyVGCzHR5YUiUICuyv7bRp2178IWfGtrey+bAMmYAguIeNG3TA5T1XieMWeUGKRi XuU9GvuN8DG5QacJDDkFReOfamGNy66XXrQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t= 1686581252; x=1686667652; bh=rtp+19M8a0H+dgaBbrz+8rkcO9voUMZSiJG 6PJJ+Ce4=; b=qmEBrE0a5HSreVSGWR0Y7Hsrx5Oruk2IDIOP46kkvE8AG3KTAAL BkEYqf0dNF+8ZkGqOg72tYF/hiA9LlpDDawC3kbjVpqnsf4b463D4MvGXi1u9bpw yp1tpSZHB3AX8SeZiwKIqKD7YitciPn6jPXABlIw3JkXhBzUugkKFZTXM969SnY5 fHH909COdCpwG+vZz6HRPuPEr+8NKIZLAO/a7tpoDRRDfz1BJMEFNj8FxS02acqP Aq8xsHKsHyzZ81lKG3KAQYFVC0/3gCemSB04SoGbAGX3yzv24ofZLFfneJ5JmOWr DGG6SDhxH1PDoVYo01PU5V26edlS5qcsr3A== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrgeduhedgjeelucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvvefufffkjghfggfgtgesthfuredttddtvdenucfhrhhomhepvfhhohhm rghsucfoohhnjhgrlhhonhcuoehthhhomhgrshesmhhonhhjrghlohhnrdhnvghtqeenuc ggtffrrghtthgvrhhnpeejjefffffgffekfefflefgkeelteejffelledugefhheelffet heevudffudfgvdenucffohhmrghinhepughpughkrdhorhhgnecuvehluhhsthgvrhfuih iivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepthhhohhmrghssehmohhnjhgrlhho nhdrnhgvth X-ME-Proxy: Feedback-ID: i47234305:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 12 Jun 2023 10:47:30 -0400 (EDT) From: Thomas Monjalon To: Ruifeng Wang Cc: "olivier.matz@6wind.com" , dev@dpdk.org, "stable@dpdk.org" , "stephen@networkplumber.org" , Justin He , Honnappa Nagarahalli , nd , "Burakov, Anatoly" Subject: Re: [PATCH] test/mbuf: fix the forked process segment fault Date: Mon, 12 Jun 2023 16:47:28 +0200 Message-ID: <1986042.PIDvDuAF1L@thomas> In-Reply-To: References: <20230522060137.225154-1-ruifeng.wang@arm.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" 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 23/05/2023 12:12, Burakov, Anatoly: > On 5/23/2023 4:45 AM, Ruifeng Wang wrote: > >> -----Original Message----- > >> From: Burakov, Anatoly > >> Sent: Monday, May 22, 2023 6:19 PM > >> To: Ruifeng Wang ; olivier.matz@6wind.com > >> Cc: dev@dpdk.org; stable@dpdk.org; thomas@monjalon.net; stephen@networkplumber.org; Justin > >> He ; Honnappa Nagarahalli ; nd > >> > >> Subject: Re: [PATCH] test/mbuf: fix the forked process segment fault > >> > >> On 5/22/2023 10:55 AM, Ruifeng Wang wrote: > >>>> -----Original Message----- > >>>> From: Burakov, Anatoly > >>>> Sent: Monday, May 22, 2023 5:24 PM > >>>> To: Ruifeng Wang ; olivier.matz@6wind.com > >>>> Cc: dev@dpdk.org; stable@dpdk.org; thomas@monjalon.net; > >>>> stephen@networkplumber.org; Justin He ; Honnappa > >>>> Nagarahalli ; nd > >>>> Subject: Re: [PATCH] test/mbuf: fix the forked process segment fault > >>>> > >>>> On 5/22/2023 7:01 AM, Ruifeng Wang wrote: > >>>>> Access of any memory in the hugepage shared file-backed area will > >>>>> trigger an unexpected forked child process segment fault. The root > >>>>> cause is DPDK doesn't support fork model [1] (calling rte_eal_init() before fork()). > >>>>> Forked child process can't be treated as a secondary process. > >>>>> > >>>>> Hence fix it by avoiding fork and doing verification in the main process. > >>>>> > >>>>> [1] https://mails.dpdk.org/archives/dev/2018-July/108106.html > >>>>> > >>>>> Fixes: af75078fece3 ("first public release") > >>>>> Cc: stable@dpdk.org > >>>>> > >>>>> Signed-off-by: Jia He > >>>>> Signed-off-by: Ruifeng Wang > >>>>> --- > >>>> > >>>> Would this be something that a secondary process-based test could test? > >>>> That's how we test rte_panic() and other calls. > >>> > >>> This case validates mbuf. IMO there is no need to do validation in a secondary process. > >>> Unit test for rte_panic() also uses fork() and could have the same issue. > >>> > >> > >> In that case, rte_panic() test should be fixed as well. > >> > >> My concern is that ideally, we shouldn't intentionally crash the test app if something > >> goes wrong, and calling rte_panic() accomplishes just that - which is why I suggested > >> running them in secondary processes instead, so that any call into rte_panic happens > >> inside a secondary process, and the main test process doesn't crash even if the test has > >> failed. > > > > Agree that intentionally crashing the test app is bad. > > In this patch, verification of mbuf is changed to use another API without rte_panic(). > > Then the verification can be done directly in the primary. And the indirectness of > > using a secondary process is removed. Because verification will not crash the process. > > > > Oh, > > My apologies, I did not notice that. In that case, > > Acked-by: Anatoly Burakov Applied, thanks.