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 E1831A0545 for ; Tue, 7 Jun 2022 12:14:50 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C9AFC42685; Tue, 7 Jun 2022 12:14:50 +0200 (CEST) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by mails.dpdk.org (Postfix) with ESMTP id BFA2C40156; Tue, 7 Jun 2022 12:14:47 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1654596888; x=1686132888; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=pTPULbLJ4cZ7wijNHRKrP4hvNrnjhpQC1JImZ+kT5Ic=; b=Xr0slUCR0iOBbBqd8hMekToHGMJ+GrQp8u8+FcTjJJYPGQhpHQyVPw/J YUnnT3gSX2uo5pZt6/+9xq79nb6HUyNkFlqjpnx6Ri0pHXmQaJMFTLaum imli3hldSALlLFdXuGjlQEZLkW6SJumyNTvqhHZKJ3HfME7I0Or6oWup4 0IOEnI0l44jHEITd+bpTajXT906nVtpRhaWjDFrgY0UFNddwkVdgLBa+s WM2IXt2QVyNpvd9RYUGGUrJ5yWUECaN7EnaTNr6eoO1EQ9ObI34F76URJ KQejopSkH8ub/RNx/QI1Q9QLaoieKB1LQIOkLILjwc0ScO5Y1CzhN4MMi Q==; X-IronPort-AV: E=McAfee;i="6400,9594,10370"; a="265066350" X-IronPort-AV: E=Sophos;i="5.91,283,1647327600"; d="scan'208";a="265066350" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Jun 2022 03:14:46 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.91,283,1647327600"; d="scan'208";a="669912714" Received: from fmsmsx604.amr.corp.intel.com ([10.18.126.84]) by FMSMGA003.fm.intel.com with ESMTP; 07 Jun 2022 03:14:46 -0700 Received: from fmsmsx607.amr.corp.intel.com (10.18.126.87) by fmsmsx604.amr.corp.intel.com (10.18.126.84) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.27; Tue, 7 Jun 2022 03:14:46 -0700 Received: from fmsmsx611.amr.corp.intel.com (10.18.126.91) by fmsmsx607.amr.corp.intel.com (10.18.126.87) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.27; Tue, 7 Jun 2022 03:14:45 -0700 Received: from fmsedg601.ED.cps.intel.com (10.1.192.135) by fmsmsx611.amr.corp.intel.com (10.18.126.91) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.27 via Frontend Transport; Tue, 7 Jun 2022 03:14:45 -0700 Received: from NAM12-MW2-obe.outbound.protection.outlook.com (104.47.66.41) by edgegateway.intel.com (192.55.55.70) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2308.27; Tue, 7 Jun 2022 03:14:44 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ADld/2jL/L4Gdaj6xFH3vXDxNmMEZ87e2Hvbuue37UsGPhOxPPfGH4jhQ0THLsV323o/XIJgLN5wKLIm8kYDDjb25J9gjN/IZu8CB+9d17/IvcTrvO8fAEKTOw19dR8/2WF87zRwMa1mQ3NF3FGcvIiCH39UYNCD1VLFJGnX21D5mLN6h+4paZg5XZTQZJls7pYQZykV4Tr3LcgfXEXl03SFA8qaCqNLHXo7kKDZ2kPtRxf88GRg6kG2xovtVZC4uJbFV7qWnPj0MTTfeiMTs53ERhXUdKPj1KeIR+7gGlY6sfDq22V83lh8e5rh7Jx1zpROaZjf7nVDL9fD6dQ+zw== 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=pTPULbLJ4cZ7wijNHRKrP4hvNrnjhpQC1JImZ+kT5Ic=; b=ahfmKYYGT/G45b+JDRmIq47SMRUR/d7anmCpvUmQ/K2T3rAoMS12Cm08jDRJAM534D0ugZSaGaFtfee0li1JneAiKb2b9tSHUdLlUt+iaFCl1bacIjjnKkGEYtSajsgLvzkZV+Txk0O8sFT4w+i6bHN91kFoBoSOvPkZbB3pK0IU2M3qyFnVPEHq2iiv8HDO7YG4QFblvK8qhBGOqjmP0n4qSu7hkWOmf8jE1SUcfWp18+1a2FHnyHRjb4+/kUCAv8et5D53o3rvuCdAjKR5wdVujm6V0RUdUsdbheip7c1lP+3HRLvnEUJJuTAt3jwrF5x1keAFLEbNxIwU/VO4fA== 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 Received: from CO6PR11MB5602.namprd11.prod.outlook.com (2603:10b6:303:13a::5) by BYAPR11MB2710.namprd11.prod.outlook.com (2603:10b6:a02:c7::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5314.15; Tue, 7 Jun 2022 10:14:42 +0000 Received: from CO6PR11MB5602.namprd11.prod.outlook.com ([fe80::a0a0:842:e19d:e5df]) by CO6PR11MB5602.namprd11.prod.outlook.com ([fe80::a0a0:842:e19d:e5df%7]) with mapi id 15.20.5314.019; Tue, 7 Jun 2022 10:14:42 +0000 From: "Zeng, ZhichaoX" To: "dev@dpdk.org" , "hkalra@marvell.com" , "david.marchand@redhat.com" CC: "aconole@redhat.com" , "Matz, Olivier" , "thomas@monjalon.net" , "stable@dpdk.org" , Stephen Hemminger , "Richardson, Bruce" , "Yang, Qiming" Subject: RE: [PATCH v3] lib/eal: fix segfaults due to thread exit order Thread-Topic: [PATCH v3] lib/eal: fix segfaults due to thread exit order Thread-Index: AQHYc+jZCxt9Qc+HpEe/EKl0LmAnw61DRKGQ Date: Tue, 7 Jun 2022 10:14:42 +0000 Message-ID: References: <20220523111642.10406-1-zhichaox.zeng@intel.com> <20220530134738.488602-1-zhichaox.zeng@intel.com> In-Reply-To: <20220530134738.488602-1-zhichaox.zeng@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 8ad384e2-4d0e-42bc-eb21-08da486e89f5 x-ms-traffictypediagnostic: BYAPR11MB2710:EE_ x-ld-processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr x-microsoft-antispam-prvs: x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: VAGRdJFmGO+hAFNb5QFN81nkmhj734FrNzFB2HJbxSSee6ueu8+n+uzETdSfLYimDtEfz4wcCotTAhOs81hsUxn5ATIqkFSoWzZ+pGCDxOKZYA84EoUmpfoPB7C+NNjxOpTIAtNw1OPiEN6CjjjT+/k6mF40fLp/cJzaTfwtVRLajQaV2Jrj8xmQLxVpSoVKg5w2N423qEb7W4eohNYYHc3RLQCBmbnYl3RmJlOnSlJfFj1F+EeEOE+5/w1LD0B/5UNi6RHig0DoDBP9cR6oyg6o8XwYArz68wdCi/l5e6HACfQjcRJP4fTp3HIIbecnPE9r/Y8IfbKQLV9XMYI6TeLZiCTiKyQ30syoQ5z8kSaPrB3mgdfQAG7566TBUeKZv+TLT39Qy1dDSp38FnZOAXV2QOtJQQW8eLiuiFC6W/nNndaFoPTGjJqa79cqMr+VlBH5qBrUc3xvlF6eLuNh5s6ExmgOu2Y+6WODcGPRbhNBrTzbh4Fl4eORgSPNbF+cayvLOf5S82fgAMQwA/aliMxoWDrSNXyXhe8DqzPJe10pnWbItBQQjAmjK3zxLKJnYUuBJBSsCVlwhr17m8sYbLmfoNUyn41g08apA8yyYprcLi80OJe7SW2GTzuc5XTlF5SFMEpF+VcIvvgwPkbhG93dzUfE0AMo4VTBVOKXsFc/mcwoBIKTWWd8mV+/sZx6eC5ih0AfRqSTI83J5xJT4g== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:CO6PR11MB5602.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230001)(366004)(107886003)(71200400001)(86362001)(186003)(122000001)(2906002)(9686003)(110136005)(54906003)(52536014)(38070700005)(83380400001)(316002)(26005)(82960400001)(508600001)(55016003)(76116006)(4326008)(8936002)(6506007)(7696005)(33656002)(38100700002)(66476007)(66946007)(66446008)(66556008)(5660300002)(64756008)(8676002); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?7nBYCCSOalyHL2zWtrKn2BpW3yHnjttHw03jW3wwMFksNaik1ALNCZbvz/di?= =?us-ascii?Q?xnfUe6uHOH5pww7f4PrV+yyV4Gr3PQ0EgdJXfXNHk3p8ST9sdxA/bWm/XiOt?= =?us-ascii?Q?3eUskGS14Ap/lqrsXKmEpl0SgKKhcBDXwWyn2wnbPkP8vnwrAg5lvQCo0bYI?= =?us-ascii?Q?WcVJaWuuzwJJmo2zLKrWnI+DyhtatxemYi3bEUOmtA3BAKrH6Dlq2XlNeXKT?= =?us-ascii?Q?ysq0cjTRKHSQv3xAup5s52W3IiKNUZt93fzkJTxlhQTZFGziricOaWbMT7Cu?= =?us-ascii?Q?imktGB7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HTky2hXUstY7yf?= =?us-ascii?Q?KPV/Q/xjDe3yy9SiXz0G3Me2xY9kzHAep5ddpDUTyq0IzKTbqaPY0U+2Ygmf?= =?us-ascii?Q?pzvLPq3q3dIvV3lqvgnoHEyrpxLwcES6lRo8+qrssKr92TJvDquqzjdEi0SJ?= =?us-ascii?Q?mTUlMHQ/PjLsTd48pZxjRlwRKeNP+vUrMFSqZfVbBffXOOynxhENqZLc8BN4?= =?us-ascii?Q?egosi2Ji7LCJAMCVQ6nKtAjYcqh+46mUXVef4K24WJrFIU3PJunDBNGYx00Z?= =?us-ascii?Q?H1Mmwys3yQQ/9ego4zpzQailrvd8tk0uzB1c9c785E760vuoL/ym7ZXkjEhf?= =?us-ascii?Q?QfjQrp0/xebmkydjKVOr0jera6lVo51BKCdGVloUejf+zOJLLHj/xERRWH/+?= =?us-ascii?Q?2EZDMIeCAwx4XMYwouO4Hj1bXkuL/xheIzsOA96a1loiAcLnyy2EBheCCBIc?= =?us-ascii?Q?Foi4KRzGvQGSckguAWuJmfiiK2sihfVx/+Pc0tBlIWrw/n37+/FMIxLBjd5Y?= =?us-ascii?Q?s4yokkHSvV9UaX8FF/FLyUmFwWvdj10bDWDyYAToiVRI8073N3qoXsfxlGIt?= =?us-ascii?Q?PPqbzvpgYg=3D=3D?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: CO6PR11MB5602.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 8ad384e2-4d0e-42bc-eb21-08da486e89f5 X-MS-Exchange-CrossTenant-originalarrivaltime: 07 Jun 2022 10:14:42.4231 (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: qwjVUtwv5XRoAvr2IqC/JQdpSeKN/6tuwDwct7ARzt0RNZJs5WXma5AVQ61iuPWSyOWFA11y6hjFT2+bWDbX+g== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR11MB2710 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 Hi David, Harman Please review this patch at your convenience. Thanks! In addition, I tried to figure out the reason for the failure of the CI tes= t. There is a saying that this is a problem with Asan when cancelling a thread that is waiting on epo= ll. After adding the=20 '-fstack-protector-all' parameter, there will be no exception. But I don't = know the software=20 environment for automated testing, so I can't verify this statement. Regards > Subject: [PATCH v3] lib/eal: fix segfaults due to thread exit order > From: Zhichao Zeng > The eal-intr-thread is not closed before memory cleanup in the process of= exiting. There is a small probability that when the eal-intr-thread is abo= ut to use some pointers, the memory were just cleaned, which cause the segm= ent fault error caught by ASan. > This patch close the eal-intr-thread before memory cleanup when exiting t= o avoid segment fault. > --- > v2: add the same API for FreeBSD > --- > v3: fix rte_eal_cleanup crash in debug_autotest > Signed-off-by: Zhichao Zeng