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 D946842B71 for ; Mon, 22 May 2023 12:19:59 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D1D0E42D31; Mon, 22 May 2023 12:19:59 +0200 (CEST) Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by mails.dpdk.org (Postfix) with ESMTP id 3C92C410D1; Mon, 22 May 2023 12:19:56 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1684750796; x=1716286796; h=message-id:date:subject:to:cc:references:from: in-reply-to:content-transfer-encoding:mime-version; bh=hQS7f3/yUg5Fnxg46/Gw4e1xj3VNDxOxR+EWxm92OMM=; b=HLR1P9f48UtyM3cStArmiwHvLu7UBDGLKZpbpUyxGk0yg5HzsD/ONifD YDM4umb4xgTLW0M7WPkhtu45kInO28D4f3aDoQczdn7SFcZ0YNKCPAuCU ytFIVhxI5NI3A9sn1ifuGSY7eC5ZNlc0IQGjPrZrIvFJNTBuyUT7J3tAg /wiFcwkOUKLPHX0f/25Vi0c8Jub3yGxuF0llAAz6nVfGw6QoX4ooWa1k9 xrbndwhhCvHaxrdDroryTrO1tAlQSljTrdxspTIK9uwqQCZLSv5lReRn7 43UNm5Dl9uj2T3VnywbDu0BvoD+R1cVhd9lnat0rR+I2Gh7a8DNF9IFBh A==; X-IronPort-AV: E=McAfee;i="6600,9927,10717"; a="333246487" X-IronPort-AV: E=Sophos;i="6.00,184,1681196400"; d="scan'208";a="333246487" Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 May 2023 03:19:34 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10717"; a="1033578194" X-IronPort-AV: E=Sophos;i="6.00,184,1681196400"; d="scan'208";a="1033578194" Received: from orsmsx602.amr.corp.intel.com ([10.22.229.15]) by fmsmga005.fm.intel.com with ESMTP; 22 May 2023 03:19:34 -0700 Received: from orsmsx610.amr.corp.intel.com (10.22.229.23) by ORSMSX602.amr.corp.intel.com (10.22.229.15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.23; Mon, 22 May 2023 03:19:34 -0700 Received: from ORSEDG601.ED.cps.intel.com (10.7.248.6) by orsmsx610.amr.corp.intel.com (10.22.229.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.23 via Frontend Transport; Mon, 22 May 2023 03:19:34 -0700 Received: from NAM12-DM6-obe.outbound.protection.outlook.com (104.47.59.177) by edgegateway.intel.com (134.134.137.102) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.23; Mon, 22 May 2023 03:19:34 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=IJbsy72KfyqxnbafXHaf4iKV0OnUfWQO/ORK0rozSd3V16KlWL+dE82J3EFOOrtuxyyH+tHURkEm2eB3NvlqfTWCUAmGKhkL9ySB2riWey6oATKsOe/I25wJ51BmgApejnc0505o90RGfca3U6wHEBYu3R+b56lFkVyEb+L2hCc+guNbn06uFx/FF+CAeh2WSpN4U/SVFW4nBeluTa9FN6L9QOFjon4laL0cWoZiTyIpfOor3ra53OQllNlVUukrUFvHCB85bftLlS5ek1BV2PpomD38FW497mteyNfV90DI7SdUifX2hGQaS0wkaGkWYvWpGcrmGPps5uHobTCD3Q== 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=DI5Y/5J9EWcVbENSIgPLn5NTNZ/AktW2aJm3+92tejk=; b=QrHgRtS/cfSs5Qv0cSRojgBHGjamGJp1d7XpMlBVYPlHWsXR/HuRA2sZKfNaLhhKRlDI3iNaG908G8swU/w4YB0J7O+uko/eD6qvs+PLyIdP/bUrIOnMml6YKLgCEkj0/M9u2yPYoV511T+amgyG8WHrpg/rsxILDS6fAhKYCeq81XjUzH4nxoMTyofnr9q/cwgasNRqNrQxKJrTo+DSZLsVVccsNYWOz5Q4BG729YCXqcB6d/hTiW7epVuLnAQa4z4ybN0m1ynPpcijYRVAkXzkq3Xs4mRxThbeFiwJMOF2aF2S9nj1YHB5b3IaC3g9OtVXE6fiE4McGjkk5Vhw6A== 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 BL1PR11MB5351.namprd11.prod.outlook.com (2603:10b6:208:318::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6411.28; Mon, 22 May 2023 10:19:31 +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; Mon, 22 May 2023 10:19:31 +0000 Message-ID: Date: Mon, 22 May 2023 11:19:24 +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 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> Content-Language: en-US From: "Burakov, Anatoly" In-Reply-To: Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: AS9PR05CA0011.eurprd05.prod.outlook.com (2603:10a6:20b:488::19) To DM4PR11MB6502.namprd11.prod.outlook.com (2603:10b6:8:89::7) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DM4PR11MB6502:EE_|BL1PR11MB5351:EE_ X-MS-Office365-Filtering-Correlation-Id: f0c18887-fe86-46c1-2517-08db5aae07da 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: nSSKe2GAXNltje8k0pxofLw5Y/FCjGx2/tAhUKeivgo9mBjnbRigGVIGKdOZRbuJyC8NoYfzwLuejL5Hsh+9RxFrjdGoeGPBBdCpIYs0ehb1vMyz7uFzeK4bQMkqJAp+s6g2D19eEMPLgU1+FXlKvEy/0yWPzZxQgi/XA3WrebHMkFf1e41THM4WDcK3iDsAEiWbjmgSx8LiBP6jKMOfjknP9ImdZRBBmLKIe7poRo3e4aBm4ksbYpD6SO5cM+kaN19th9yKbhkl7u29cF5eq6yFfHD1/gl7SbaC1v7AiMCWCQPrzi0GR0LzMm00hJtu28gF5qI1Q/8QU+P879gclunxRQJ6DjE8b8iwc9nqctuTUIsYhbagDtXANjPSvHpFA34K6CiRiVqympNjeSIvu4F5dlyqpBj8SR1NrGbk8yYMYWJUfWHczNPaUvEG5dwROiAfF64GsOXK/r1EHhPL4MFbGjb9swqeCuV1EZ2IjA3+vO6jhre/yGzg/H3GvBdRduO16MEgg/WnvXHdKYV1ipQpohz16v7L5k6CrHGSC6K5Rx3icC8ICmXcaBcznGrN05eZU42u33J0EV904vtBVcvrqzRfP+0e8Z9HVXGDG+t7QU+wGpqYxrXlCGhLL3IGCtWoufJSf0Q8uoD8M7Qvqg== 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)(346002)(136003)(39860400002)(366004)(396003)(376002)(451199021)(31686004)(66899021)(2906002)(966005)(6486002)(6666004)(82960400001)(66476007)(66556008)(66946007)(54906003)(478600001)(110136005)(31696002)(2616005)(53546011)(38100700002)(8676002)(8936002)(36756003)(316002)(4326008)(41300700001)(5660300002)(86362001)(6506007)(83380400001)(26005)(186003)(6512007)(43740500002)(45980500001); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?UEVtcFBSRExsdkVPSStmMldaa0FzZXorN21zeitBdEFyZHpsU3p1QXRDc0RD?= =?utf-8?B?WlB5aEpINjQzRzRKUzVRQTJpU1BaV0pCKzZKbUJuNE5HUmhNNXdHMyt6b2Zn?= =?utf-8?B?L2RjMDg4ellCZUVXZThyaGtLM1EyT3NSYzQzOHp6anlYTFRiMnQ3MEplSlFx?= =?utf-8?B?VEwrQm5yZ1ZTRy9IY0d1K2lGei9jTTZuSEhLZ2dmaTVYeVZGbnJXdzN0SE5o?= =?utf-8?B?SDN0L3o0LzRiVjVGODhHcTBRa2pkc0k0cHdxY2UzN2FoRnFRUlhRVk9VRXBz?= =?utf-8?B?aDh2Vll5YnJwcDdoSmkwWVhLZTZxZGJoQUVBVmdFYW51NWxTVUZ5aDhMVXpp?= =?utf-8?B?ZmZpS0prSytSTm5EWGNaWkpmNjg5QUdxSWtuT3RaLytkUDQz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?= X-MS-Exchange-CrossTenant-Network-Message-Id: f0c18887-fe86-46c1-2517-08db5aae07da X-MS-Exchange-CrossTenant-AuthSource: DM4PR11MB6502.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 May 2023 10:19:30.8493 (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: xhG3d41AlPkka+jObviXwVRgCoFYA7VviG1cqxGpTth1ldK1e1DWBij1X8QKPvrz+K2E2sgbfR/6YZw0VTcAaAALGPIAV3BUanQyG51rgxM= X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL1PR11MB5351 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/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. -- Thanks, Anatoly