From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pg0-f67.google.com (mail-pg0-f67.google.com [74.125.83.67]) by dpdk.org (Postfix) with ESMTP id A9E45AAF5 for ; Fri, 27 Apr 2018 19:39:48 +0200 (CEST) Received: by mail-pg0-f67.google.com with SMTP id i6-v6so2080825pgv.3 for ; Fri, 27 Apr 2018 10:39:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=/JIhYAjmQSYiIoctpzjTlsxpdh2T2xfTUrhRn7VvQeI=; b=Qy/FraYgTb+Wnp5zR70DaS3Ow5iyUgUnI7ai3VogBBvzi7c/qNMQngu2+5KqGnCkKp YXNWRcf84l5sqDmVk3LRAyU0Ye27g8ahrs0iJVgtvnEWe/FK4eT0IlnMaQrQUjlDkFMe WnUpeZO8uT5ga5w/2HR9CWq4CxcxESugI4bHw/yQRE6ZqFo3PyX+MspshRuXv4nuQEO9 atMnYSoCsSsEGlccIZCU92CZUOxJJDycUZcDjPNrNg/ItcD9CewQp9rdcfbo5vJE+Zyv u8X5AWpJRqmeIqKHG80cmLPLNzbsw1CL4FiGwByn9iaENa0fTnoN8KDq6qgbA6UP/Pv3 TZ4g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=/JIhYAjmQSYiIoctpzjTlsxpdh2T2xfTUrhRn7VvQeI=; b=Pw0rAEgQm5kbjJWfGESn4SjzEGE4SgYbLOKHccKSeC2ysPGkIny4nmUOc5Wt2RbTCt yZsFksf8MoOEcTUFXA6XEWCDoVr4+pjMQWIV9VwO2EZHkij2CTbjkv4hQ3GgYZ75M85J PeoDWz7AT/XcDmfe7MhTwtZ2eXn351VE3UzPkYlpnN84QUWElDWN/zMCqA/b4vCskRWE jiCyGC9d6X/LtPdBAKF/7L7jG/XCMK8++jS7yEYh9JOfaNeiAtCB6Uh7le11zh3t0kmY psTbx2asjbyYwElwWaWvipwrd/tslZU6bvdFhqOXakGpcyH+XD7C7zqw3vqx/9qifzem 96JA== X-Gm-Message-State: ALQs6tD7867d9mrKtUiBwDtVEw8WEgyNUQoZNoCbF4NWn5OPRXPCEHV7 8HdJush0nYwI7sASesNft+GyrQ== X-Google-Smtp-Source: AB8JxZqjttTPMGVn/MURDZmhBjSCdsB48nIffKTYOzU0wK0W7MYOdgaOOR5xADDzucxekXTTQ1MuEw== X-Received: by 2002:a17:902:284b:: with SMTP id e69-v6mr3024449plb.240.1524850787892; Fri, 27 Apr 2018 10:39:47 -0700 (PDT) Received: from xeon-e3 (204-195-71-95.wavecable.com. [204.195.71.95]) by smtp.gmail.com with ESMTPSA id z15-v6sm3206361pgr.55.2018.04.27.10.39.47 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 27 Apr 2018 10:39:47 -0700 (PDT) Date: Fri, 27 Apr 2018 10:39:45 -0700 From: Stephen Hemminger To: Shreyansh Jain Cc: Jianfeng Tan , "dev@dpdk.org" , "thomas@monjalon.net" , Olivier Matz , Anatoly Burakov Message-ID: <20180427103945.511a118e@xeon-e3> In-Reply-To: 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: 7bit 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:39:48 -0000 On Fri, 27 Apr 2018 17:36:56 +0000 Shreyansh Jain wrote: > > -----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=0, expected=0, futex_word=0x7fffffffcff4) > > at ../sysdeps/unix/sysv/linux/futex-internal.h:61 > > #1 futex_wait_simple (private=0, expected=0, > > futex_word=0x7fffffffcff4) > > at ../sysdeps/nptl/futex-internal.h:135 > > #2 __pthread_barrier_wait (barrier=0x7fffffffcff0) at > > pthread_barrier_wait.c:184 > > #3 rte_thread_init (arg=0x7fffffffcfe0) > > at ../dpdk/lib/librte_eal/common/eal_common_thread.c:160 > > #4 start_thread (arg=0x7ffff6ecf700) 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 Could you verify there is not a use after free by using valgrind or some library that poisons memory on free.