From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by dpdk.org (Postfix) with ESMTP id 0AA9423C for ; Wed, 2 May 2018 12:01:24 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 02 May 2018 03:01:22 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.49,354,1520924400"; d="scan'208";a="50834500" Received: from tanjianf-mobl.ccr.corp.intel.com (HELO [10.67.64.103]) ([10.67.64.103]) by fmsmga004.fm.intel.com with ESMTP; 02 May 2018 03:01:20 -0700 To: Olivier Matz , "Burakov, Anatoly" References: <20180403130439.11151-1-olivier.matz@6wind.com> <20180424144651.13145-1-olivier.matz@6wind.com> <4256B2F0-EF9D-4B22-AC1A-D440C002360A@6wind.com> <39d5baf8-2bad-6df8-0419-a06c65d41475@redhat.com> <2d828aa1-482f-7f19-1909-c3ca4599c9b2@intel.com> <5e5611b7-e3dd-e0fa-157f-1749f46198c5@intel.com> <20180502095730.hcdgbqtfxtkfp5vd@neon> Cc: Maxime Coquelin , dev@dpdk.org, Thomas Monjalon From: "Tan, Jianfeng" Message-ID: <1350d4e4-e4bc-716b-38ea-3e81e8cb09a6@intel.com> Date: Wed, 2 May 2018 18:01:20 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: <20180502095730.hcdgbqtfxtkfp5vd@neon> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] pthread_barrier_deadlock in -rc1 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: Wed, 02 May 2018 10:01:25 -0000 Hi Olivier and Anatoly, [...] >>> Below patch can fix another strange sigsegv issue in my VM. Please check >>> if it works for you. I doubt it's use-after-free problem which could >>> lead to different issues in different env. Please have a try. >>> >>> >>> diff --git a/lib/librte_eal/common/eal_common_thread.c >>> b/lib/librte_eal/common/eal_common_thread.c >>> index de69452..d91b67d 100644 >>> --- a/lib/librte_eal/common/eal_common_thread.c >>> +++ b/lib/librte_eal/common/eal_common_thread.c >>> @@ -205,6 +205,7 @@ rte_ctrl_thread_create(pthread_t *thread, const char >>> *name, >>> goto fail; >>> >>> pthread_barrier_wait(¶ms->configured); >>> + pthread_barrier_destroy(¶ms->configured); >>> free(params); >> Should destroy also be called in fail case? > Yes, and also pthread_barrier_wait(). > > I did a quick test simulating a failure of rte_thread_setname(), and > without the wait, the barrier in the child thread blocks forever. > v1 has been sent without seeing this email. You are right, I misunderstood it. Will send a v2 based on this result. Thanks, Jianfeng