Hi Harman, Bruce
Could you please help to review this patch, thank you so much!
Best regards
Zhichao
> -----Original Message-----
> From: Zeng, ZhichaoX <[email protected]>
> Sent: Wednesday, June 15, 2022 2:02 PM
> To: [email protected]
> Cc: [email protected]; Yang, Qiming <[email protected]>;
> [email protected]; [email protected];
> [email protected]; Zeng, ZhichaoX <[email protected]>;
> Richardson, Bruce > <[email protected]>; Harman Kalra
> <[email protected]>
> Subject: [PATCH v4] lib/eal: fix segfaults due to thread exit order
>
> From: Zhichao Zeng <[email protected]>
>
> 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. And add some atomic operations to avoid executing
> rte_eal_cleanup in the child process spawned by fork() in some test > cases,
> e.g. debug_autotest of dpdk-test.
>
> Cc: [email protected]
>
> ---
> v2:
> add the same API for FreeBSD
> ---
> v3:
> fix rte_eal_cleanup crash in debug_autotest
> ---
> v4:
> shorten the prompt message and optimize the commit log
>
> Suggested-by: David Marchand <[email protected]>
> Signed-off-by: Zhichao Zeng <[email protected]>