From mboxrd@z Thu Jan 1 00:00:00 1970 From: Shreyansh Jain Subject: Re: [PATCH] eal: fix threads block on barrier Date: Fri, 27 Apr 2018 17:36:56 +0000 Message-ID: References: <1524847302-88110-1-git-send-email-jianfeng.tan@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Cc: "thomas@monjalon.net" , Olivier Matz , Anatoly Burakov To: Jianfeng Tan , "dev@dpdk.org" 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) In-Reply-To: <1524847302-88110-1-git-send-email-jianfeng.tan@intel.com> Content-Language: en-US List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" > -----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