[dpdk-dev] pthread_barrier_deadlock in -rc1
Tan, Jianfeng
jianfeng.tan at intel.com
Wed May 2 12:01:20 CEST 2018
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
More information about the dev
mailing list