From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR01-DB5-obe.outbound.protection.outlook.com (mail-db5eur01on0079.outbound.protection.outlook.com [104.47.2.79]) by dpdk.org (Postfix) with ESMTP id B976CCF68 for ; Fri, 27 Apr 2018 19:45:33 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=idVowgAjX+vEjck6lVupL2sGc8aS35J+m/2bZ81xRTI=; b=b1hfaaeAWzVSoG443c5PawLlGaS0YAjn/8jlwhF6VYqVkWvP6FX+MjqKACX5EsBACj30E9wgUnGPzue/jJeanakh4eCTIOl5bXlF+REFu69S/jWy2dKAMcMto8z9voODSOghIZvZuiH3caQxd+ldeTEiZJMFKsr3ObKBswh5L04= Received: from HE1PR0402MB2780.eurprd04.prod.outlook.com (10.175.29.14) by HE1PR0402MB2906.eurprd04.prod.outlook.com (10.175.32.11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.696.13; Fri, 27 Apr 2018 17:45:31 +0000 Received: from HE1PR0402MB2780.eurprd04.prod.outlook.com ([fe80::8d97:47e4:52b9:2040]) by HE1PR0402MB2780.eurprd04.prod.outlook.com ([fe80::8d97:47e4:52b9:2040%14]) with mapi id 15.20.0696.020; Fri, 27 Apr 2018 17:45:31 +0000 From: Shreyansh Jain To: Stephen Hemminger CC: Jianfeng Tan , "dev@dpdk.org" , "thomas@monjalon.net" , Olivier Matz , Anatoly Burakov Thread-Topic: [dpdk-dev] [PATCH] eal: fix threads block on barrier Thread-Index: AQHT3kZZ+iUfTe17WEqHwJZiS//v+qQU3smwgAACIICAAAA1oA== Date: Fri, 27 Apr 2018 17:45:08 +0000 Deferred-Delivery: Fri, 27 Apr 2018 17:44:53 +0000 Message-ID: References: <1524847302-88110-1-git-send-email-jianfeng.tan@intel.com> <20180427103945.511a118e@xeon-e3> In-Reply-To: <20180427103945.511a118e@xeon-e3> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=shreyansh.jain@nxp.com; x-originating-ip: [14.142.187.166] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; HE1PR0402MB2906; 7:3F6G5Gc2V2gBdTaysuEifq9qdZiMLbNAxyLYQxx+6wZb4+heV1f+YflbWWjFyd9QUgSvksSJaxSv6nBel5YyUzAnzHDtGD+WmBFcaQJD83R3JSkI3dBdOyu7EI2/5iBfu5STo00sQOGbxPlc4LRlOHvLqan85+Sj0O0DCgmakKEL8wQfhtRxx8NDTqGkGiK9Tv/HxSRBDgehu2bIHjoSQ27DZxHwexbijRvrlEyIVSat95oxhl1VWxQxOs/nzUFI x-ms-exchange-antispam-srfa-diagnostics: SOS; x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(48565401081)(5600026)(4534165)(7168020)(4627221)(201703031133081)(201702281549075)(2017052603328)(7153060)(7193020); SRVR:HE1PR0402MB2906; x-ms-traffictypediagnostic: HE1PR0402MB2906: x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(185117386973197)(228905959029699); x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(10201501046)(93006095)(93001095)(3231232)(944501410)(52105095)(3002001)(6055026)(6041310)(20161123560045)(20161123562045)(20161123558120)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(6072148)(201708071742011); SRVR:HE1PR0402MB2906; BCL:0; PCL:0; RULEID:; SRVR:HE1PR0402MB2906; x-forefront-prvs: 0655F9F006 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(346002)(366004)(39860400002)(396003)(376002)(39380400002)(13464003)(199004)(189003)(7736002)(3660700001)(102836004)(6116002)(478600001)(7696005)(105586002)(305945005)(81156014)(8676002)(68736007)(25786009)(76176011)(97736004)(66066001)(33656002)(14454004)(186003)(81166006)(2906002)(44832011)(4326008)(6246003)(2900100001)(6506007)(53546011)(106356001)(26005)(229853002)(446003)(486006)(6666003)(59450400001)(8936002)(3280700002)(54906003)(6916009)(99286004)(316002)(5250100002)(53936002)(55016002)(11346002)(3846002)(476003)(86362001)(55236004)(9686003)(6436002)(74316002)(5660300001); DIR:OUT; SFP:1101; SCL:1; SRVR:HE1PR0402MB2906; H:HE1PR0402MB2780.eurprd04.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; received-spf: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: TtE67BR7VWdnREi9ai/EFGdBNq/dCmHgiV9GwvXH/O87p9it7Rn25L5r5yfEvzRxzNySc12fjeh+CDqg/i1McSKok8pWpVmuSANBWtjSQ4vgCDrJDsCUexig0f3X/eDYlhTF1P6YSRE/vFPNTZJ5LBUwCDE9jfGuBVD/MB25zTx1ASldatjYDtSs21N2vu17 spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Office365-Filtering-Correlation-Id: a34dcd29-6a57-4a19-a497-08d5ac66ac46 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: a34dcd29-6a57-4a19-a497-08d5ac66ac46 X-MS-Exchange-CrossTenant-originalarrivaltime: 27 Apr 2018 17:45:31.8183 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1PR0402MB2906 Subject: Re: [dpdk-dev] [PATCH] eal: fix threads block on barrier X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Apr 2018 17:45:34 -0000 > -----Original Message----- > From: Stephen Hemminger [mailto:stephen@networkplumber.org] > Sent: Friday, April 27, 2018 11:10 PM > To: Shreyansh Jain > Cc: Jianfeng Tan ; dev@dpdk.org; > thomas@monjalon.net; Olivier Matz ; Anatoly > Burakov > Subject: Re: [dpdk-dev] [PATCH] eal: fix threads block on barrier >=20 > On Fri, 27 Apr 2018 17:36:56 +0000 > Shreyansh Jain wrote: >=20 > > > -----Original Message----- > > > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Jianfeng Tan > > > Sent: Friday, April 27, 2018 10:12 PM > > > To: dev@dpdk.org > > > Cc: thomas@monjalon.net; Jianfeng Tan ; > Olivier > > > Matz ; Anatoly Burakov > > > > > > Subject: [dpdk-dev] [PATCH] eal: fix threads block on barrier > > > > > > Below commit introduced pthread barrier for synchronization. > > > But two IPC threads block on the barrier, and never wake up. > > > > > > (gdb) bt > > > #0 futex_wait (private=3D0, expected=3D0, futex_word=3D0x7fffffffc= ff4) > > > at ../sysdeps/unix/sysv/linux/futex-internal.h:61 > > > #1 futex_wait_simple (private=3D0, expected=3D0, > > > futex_word=3D0x7fffffffcff4) > > > at ../sysdeps/nptl/futex-internal.h:135 > > > #2 __pthread_barrier_wait (barrier=3D0x7fffffffcff0) at > > > pthread_barrier_wait.c:184 > > > #3 rte_thread_init (arg=3D0x7fffffffcfe0) > > > at ../dpdk/lib/librte_eal/common/eal_common_thread.c:160 > > > #4 start_thread (arg=3D0x7ffff6ecf700) at pthread_create.c:333 > > > #5 clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109 > > > > > > Through analysis, we find the barrier defined on the stack could be > the > > > root cause. This patch will change to use heap memory as the > barrier. > > > > > > Fixes: d651ee4919cd ("eal: set affinity for control threads") > > > > > > Cc: Olivier Matz > > > Cc: Anatoly Burakov > > > > > > Signed-off-by: Jianfeng Tan > > > > Though I have seen Stephen's comment on this (possibly a library > bug), this at least fixes an issue which was dogging dpaa and dpaa2 - > generating bus errors and futex errors with variation in core masks > provided to applications. > > > > Thanks a lot for this. > > > > Acked-by: Shreyansh Jain >=20 > Could you verify there is not a use after free by using valgrind or > some library that poisons memory on free. I will probably do that soon - but for the time being I don't want this iss= ue to block the dpaa/dpaa2 for RC1 - these drivers were completely unusable= without this patch.