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 79C2C42B7F for ; Tue, 23 May 2023 12:12:40 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 6AE6E42BB1; Tue, 23 May 2023 12:12:40 +0200 (CEST) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by mails.dpdk.org (Postfix) with ESMTP id A0FB540689; Tue, 23 May 2023 12:12:37 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1684836757; x=1716372757; h=message-id:date:subject:to:cc:references:from: in-reply-to:content-transfer-encoding:mime-version; bh=OkoqdDT8wSCji6DfeTlAZIFUwajdKj7VBDe4drf5ZyE=; b=W2SkerAqPzSZAN3vKVnoHuh02hVla94DXIv+smTZlJw6yecvgCEaez4d zOicF6tMEqX9/vjEQ3rOrubdEnnsIprxex1BdHqt+hKIch6eVwM3AcJIi EPJ8W1e40iUS8/JzV2ZgDw0XXGhcaUEH96ciFDuCSr3HyXSYQckEo+RdV m3w06gcYaz9HlX/bBbwitzGV2qBT3Up8oA4/mnnnbcKPEzsKE99zzzcL8 IQ2NJg0RvQezLxm7cqWuB1NP+k3sT15zUF/uQRSrVLFcn95uyHng0HbUG AD2/aZXzMva2ojyMBh/IE31NAPuepsRGNYNoj5lvzvC/EiFDaICzy2xPc w==; X-IronPort-AV: E=McAfee;i="6600,9927,10718"; a="381438094" X-IronPort-AV: E=Sophos;i="6.00,185,1681196400"; d="scan'208";a="381438094" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 May 2023 03:12:22 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10718"; a="768948614" X-IronPort-AV: E=Sophos;i="6.00,185,1681196400"; d="scan'208";a="768948614" Received: from fmsmsx601.amr.corp.intel.com ([10.18.126.81]) by fmsmga008.fm.intel.com with ESMTP; 23 May 2023 03:12:21 -0700 Received: from fmsmsx610.amr.corp.intel.com (10.18.126.90) by fmsmsx601.amr.corp.intel.com (10.18.126.81) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.23; Tue, 23 May 2023 03:12:21 -0700 Received: from FMSEDG603.ED.cps.intel.com (10.1.192.133) by fmsmsx610.amr.corp.intel.com (10.18.126.90) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.23 via Frontend Transport; Tue, 23 May 2023 03:12:21 -0700 Received: from NAM12-MW2-obe.outbound.protection.outlook.com (104.47.66.42) by edgegateway.intel.com (192.55.55.68) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.23; Tue, 23 May 2023 03:12:20 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=XrsWI8ACXvJTF6dV0NXnXCX1WAesc4IgWOqKg/eVxdBNqjl9b7aoT7hvlgzVDuUf6JpdToWwwYUJO/Bm7ZmadrZUoiLtcOjUE2VayGHB3WP4FV+3uWY2LOQHllRIUgWgeK7mS9D1zwisnYyNzZQ7z5wPMEkXGjqXTRQwTojnDuyYNIcBofi2fOpQt98EJs9/Sag0ivUCoHXEMzS8xUcBBE+QwH5lrvsuKbf4yJOIG5r56KmGy7rT0UjcWP/1afH8A5elK8rwbhYQKgG6SpimhMAFQobf4hVaaJwMT+yY+co6n8oDM7KtIZlhkEOI43q4BBdZW8aAIY0tlC3yBnKGtg== 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=JdT9vngKqn9wjHh1zaocNnQ1r9yBnG1cTzswoQE54Ss=; b=igWMww92mOYhjr+UJpY+qKVy2WM5Cj76+jnMj3i2OnCEjYclM713CZlVJl+u93f4CA3fiiTFQO3YWtohUR97x/DdyTaOjHx6JxggBXSCrRzUB/kWGTm4WfLLCzT+JL6Tp3nAHrB4veaSQIcdIEIuEf5gsEiZTNBy3mtKKuI/3yo2CyHAPG+8CHwyNbDx7XkP8omCv94n3PJl9MqhU5EPPSF2Y3ySYINfN3GdPI3T0GXGo4a24mldG5+TV7oRp50Z+bXCbhRjKMxhK3Jw6pwZ7UJz6arHBs44LIOUkjza8WRrG4x9bzo3ATj1sHLyilWBW/m+cIaGvoSW5ve97//uhQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; Received: from DM4PR11MB6502.namprd11.prod.outlook.com (2603:10b6:8:89::7) by SA0PR11MB4638.namprd11.prod.outlook.com (2603:10b6:806:73::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6411.28; Tue, 23 May 2023 10:12:19 +0000 Received: from DM4PR11MB6502.namprd11.prod.outlook.com ([fe80::49c0:aa4c:e5b4:e718]) by DM4PR11MB6502.namprd11.prod.outlook.com ([fe80::49c0:aa4c:e5b4:e718%5]) with mapi id 15.20.6411.028; Tue, 23 May 2023 10:12:19 +0000 Message-ID: Date: Tue, 23 May 2023 11:12:13 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Firefox/102.0 Thunderbird/102.11.0 Subject: Re: [PATCH] test/mbuf: fix the forked process segment fault Content-Language: en-US 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 References: <20230522060137.225154-1-ruifeng.wang@arm.com> <2613b0c5-c3a1-60e2-9472-db84fe87cdb3@intel.com> From: "Burakov, Anatoly" In-Reply-To: Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: DB6PR0301CA0035.eurprd03.prod.outlook.com (2603:10a6:4:3e::45) To DM4PR11MB6502.namprd11.prod.outlook.com (2603:10b6:8:89::7) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DM4PR11MB6502:EE_|SA0PR11MB4638:EE_ X-MS-Office365-Filtering-Correlation-Id: 76a8125b-3439-4fb0-1ee7-08db5b7630e3 X-LD-Processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: lgfuPFMwSrQciYzGD9s7pp3fOGBm0AUBc2E5q6ZR9uH1fU51SqEMEyf5B1xlkQSXUBLkbyBEtwhQQGuEECb0FfHEsMQh6O4J6Xw8FRi3QIbD53r2+QM2tq112bgqKc49SZONL09EzW59n7COOjULL3yCPuwYUD7M0QhbzbrLuX9C2BFMbC3SFrR26U8XJE5lPK2yw4UrF8aWk0GACECI/9uSJd60gs6mP7O9nVIaPcCpuzjfJuCrwXCKSrHXb73D5vOCeAoF9+2LSFP+X/EkSiYaURdVQ0f4XPGbShb9y5BJeLJOby8PQ8v1rLByGbs2mniu69wbzhM3Ex8aJybAiFS1i/Yr1VlFIdbLg6lAxJdUvMHfk3JxCtTqApET9Xgl1rQCSzIA7h3xj3rJ7c+zeWLI30pCM1IWbya3Ai/aLflERjwbo0RUJ4WlnhIBf17XukfYoDGgzbm26U1ouSMwt1YIVC4g4L9D1dS5rUWWbLF203MRw3RF0QEieVSvuvpRp2Rjd/go4CT/Ks/aUWTdvSu1vcXmANI6oGSdz+GGfslB9n2Y0HN/eL60u01S9ACFNl2FyM8x+U61EI/Yr720l35f7nQLlKoucB99cHIBe3AJPASY8vLGo6RjYw7ht2mej/XLH2fZA42fBrMv31/0PQ== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM4PR11MB6502.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230028)(396003)(376002)(136003)(39860400002)(366004)(346002)(451199021)(110136005)(4326008)(66946007)(66556008)(66476007)(478600001)(31686004)(86362001)(31696002)(54906003)(6666004)(41300700001)(6486002)(966005)(316002)(66899021)(5660300002)(8936002)(8676002)(38100700002)(6512007)(6506007)(26005)(186003)(53546011)(82960400001)(2906002)(36756003)(83380400001)(2616005)(43740500002)(45980500001); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?TXp5amtkZUZhdUZIOGdHUmJWbUxDUVZTeXFaYVdBZ2VCbWh3SFNVUE1HSWU2?= =?utf-8?B?OWN6dzJ3RzRsYm5IRkhRSTVPUXBEbDYxWkkyQldKeUlRdEZTdWdBeVB6YVlo?= =?utf-8?B?Y1JNMnJmanV4SmlOb1FtMnpMaTRzN0JSYUozTHNVc3QrS25GTFB3aUJaUnlH?= =?utf-8?B?ZitRUFNaekdNYWZlY1lrQXNMa0cxeXAzMm52dkpOT3J6dHlPMWdaazJEcE9J?= =?utf-8?B?bFVuUWNxbDNnb25ENng0TjFUakRhdkxwM1pKWHFEYXVGV2F6dkxMM2wvMVo3?= =?utf-8?B?RnA3MkI4OVZnMHhYdENkYUUwa2ZyL0JCYnZPcGw3cGgwd3JKQnErNkVjWHlD?= =?utf-8?B?d2h6TjFyT1MwYkxIZ21HcDBaR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B?dUE9PQ==?= X-MS-Exchange-CrossTenant-Network-Message-Id: 76a8125b-3439-4fb0-1ee7-08db5b7630e3 X-MS-Exchange-CrossTenant-AuthSource: DM4PR11MB6502.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 May 2023 10:12:18.9941 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: NKfAa2cu7srQLyQcN6XXmWxQL1gb3gMIxHAh3c7zTpqdfuQf+FWTbbV+yePLcktakhqYTR0sc6xyGc3AR1sFDb41UvDC8QPqUKWy3BSLXlw= X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA0PR11MB4638 X-OriginatorOrg: intel.com 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 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 -- Thanks, Anatoly