From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR01-HE1-obe.outbound.protection.outlook.com (mail-he1eur01on0048.outbound.protection.outlook.com [104.47.0.48]) by dpdk.org (Postfix) with ESMTP id AF421AAF3 for ; Fri, 27 Apr 2018 19:37:02 +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=aZn9bfO3THM48Krtsq0FBu3lGPv0+iM9FBbJPj++4wQ=; b=g2puahV0aT92TCtz+sfWwzYWSWZTaSsKUPIn+t1KerSfAE8jvjKDML4BhlszLXQjJw7n2sXMYwq3UElk2MvhPlsY5pqQA4TDxO/ZSKGOni22UNLgg2SGujkxDvMXXKihkGTvs5s1YKKv7U97YwCt1E58Xiw4jixtgVKM3KYCecw= Received: from HE1PR0402MB2780.eurprd04.prod.outlook.com (10.175.29.14) by HE1PR0402MB3595.eurprd04.prod.outlook.com (10.167.126.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.696.15; Fri, 27 Apr 2018 17:37:01 +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:37:01 +0000 From: Shreyansh Jain To: Jianfeng Tan , "dev@dpdk.org" CC: "thomas@monjalon.net" , Olivier Matz , Anatoly Burakov Thread-Topic: [dpdk-dev] [PATCH] eal: fix threads block on barrier Thread-Index: AQHT3kZZ+iUfTe17WEqHwJZiS//v+qQU3smw Date: Fri, 27 Apr 2018 17:36:56 +0000 Deferred-Delivery: Fri, 27 Apr 2018 17:36:33 +0000 Message-ID: References: <1524847302-88110-1-git-send-email-jianfeng.tan@intel.com> In-Reply-To: <1524847302-88110-1-git-send-email-jianfeng.tan@intel.com> 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; HE1PR0402MB3595; 7:ai5GumD0yk0fc5yJz8m1prQkq7FdT0b90CURXx5XVqK4yL193ZeJ+d5b49GxfVosKXg6K78fhJOptE9DwlV6A78p2mBbEYUMTczIceBBWhj8S8hk+6grQWTnJa+qwH6TJY0s7kKdPcE3u4BlhjJVVW8zRVWQQbcw5d8oEIcBesnue9sdIWbVElnsxY8BumQ+R9psWqirrRdlUD7UEiHY12rfYOasVe5AKx0tSbpqSMK2YF/uJE/ksdpd1qjBcwjX 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:HE1PR0402MB3595; x-ms-traffictypediagnostic: HE1PR0402MB3595: 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)(3231232)(944501410)(52105095)(3002001)(93006095)(93001095)(10201501046)(6055026)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123562045)(20161123564045)(20161123558120)(6072148)(201708071742011); SRVR:HE1PR0402MB3595; BCL:0; PCL:0; RULEID:; SRVR:HE1PR0402MB3595; x-forefront-prvs: 0655F9F006 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(39860400002)(366004)(39380400002)(376002)(396003)(346002)(199004)(13464003)(189003)(9686003)(33656002)(3846002)(2906002)(6246003)(53936002)(102836004)(186003)(5250100002)(53546011)(7736002)(305945005)(2501003)(5660300001)(55016002)(2900100001)(478600001)(55236004)(6436002)(68736007)(106356001)(6506007)(25786009)(8676002)(3280700002)(3660700001)(6666003)(229853002)(105586002)(81166006)(66066001)(110136005)(81156014)(54906003)(446003)(14454004)(44832011)(486006)(86362001)(97736004)(4326008)(8936002)(7696005)(99286004)(11346002)(26005)(74316002)(476003)(76176011)(6116002)(316002); DIR:OUT; SFP:1101; SCL:1; SRVR:HE1PR0402MB3595; 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: N2KHSwcG0neLVopEgJ2Nb78Qy4as5C0YL2mHsvD27VIqjct/H3xCL/caOnY8PUbDCLHURilkQw8D/7cU30GvtD4d94lnIOPAfgAnSwezsfefYBn+iPxKUnsykdaBCgtvGc4nEYdLosLZqPWxIf1HLFBw4C8ZBXBIWWWdynC/h4km/iBmI8ohnNQSHO6yDZ/e 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: 0acecb1a-7f78-4372-114f-08d5ac657bd1 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 0acecb1a-7f78-4372-114f-08d5ac657bd1 X-MS-Exchange-CrossTenant-originalarrivaltime: 27 Apr 2018 17:37:01.0360 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1PR0402MB3595 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:37:02 -0000 > -----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 >=20 > Below commit introduced pthread barrier for synchronization. > But two IPC threads block on the barrier, and never wake up. >=20 > (gdb) bt > #0 futex_wait (private=3D0, expected=3D0, futex_word=3D0x7fffffffcff4) > 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 >=20 > 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. >=20 > Fixes: d651ee4919cd ("eal: set affinity for control threads") >=20 > Cc: Olivier Matz > Cc: Anatoly Burakov >=20 > 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 applicatio= ns. Thanks a lot for this. Acked-by: Shreyansh Jain