[dpdk-dev] [PATCH v2] ipc: stop mp control thread on cleanup

Maxime Coquelin maxime.coquelin at redhat.com
Thu Jul 8 09:23:16 CEST 2021



On 7/7/21 1:02 PM, David Marchand wrote:
> When calling rte_eal_cleanup, the mp channel cleanup routine only sets
> mp_fd to -1 leaving the rte_mp_handle control thread running.
> This control thread can spew warnings on reading on an invalid fd.
> This is especially noticed with ASAN enabled.
> 
> To handle this situation, set mp_fd to -1 to signal the control thread
> it should exit, but since this thread might be sleeping on the socket,
> cancel the thread too.
> 
> Fixes: 85d6815fa6d0 ("eal: close multi-process socket during cleanup")
> Cc: stable at dpdk.org
> 
> Reported-by: Owen Hilyard <ohilyard at iol.unh.edu>
> Signed-off-by: David Marchand <david.marchand at redhat.com>
> ---
> Changes since v1:
> - no functional change, but left close_socket_fd() helper to keep
>   symmetry with rte_mp_channel_init()/open_socket_fd(),
> 
> ---
>  lib/eal/common/eal_common_proc.c | 22 ++++++++++++++--------
>  1 file changed, 14 insertions(+), 8 deletions(-)
> 

Reviewed-by: Maxime Coquelin <maxime.coquelin at redhat.com>

Thanks,
Maxime



More information about the dev mailing list