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(&params->configured);
+       pthread_barrier_destroy(&params->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

Reply via email to