[PATCH v2] lib/eal: fix segfaults due to thread exit order

David Marchand david.marchand at redhat.com
Mon May 23 14:10:39 CEST 2022


On Mon, May 23, 2022 at 5:17 AM <zhichaox.zeng at intel.com> wrote:
>
> From: Zhichao Zeng <zhichaox.zeng at intel.com>
>
> The eal-intr-thread is not closed before memory cleanup in the
> process of exiting. There is a small probability that when the
> eal-intr-thread is about to use some pointers, the memory were
> just cleaned, which cause the segment fault error caught by ASan.
>
> This patch close the eal-intr-thread before memory cleanup when
> exiting to avoid segment fault.

This breaks the debug_autotest unit test.
It results in a segfault in a forked process executing
rte_exit()/rte_eal_cleanup().

That's probably because intr_thread thread does not exist in the forked process.


-- 
David Marchand



More information about the dev mailing list