ipc: stop mp control thread on cleanup
authorDavid Marchand <david.marchand@redhat.com>
Wed, 7 Jul 2021 11:02:29 +0000 (13:02 +0200)
committerDavid Marchand <david.marchand@redhat.com>
Thu, 8 Jul 2021 11:05:55 +0000 (13:05 +0200)
commite7885281ded1dbda63dcf3f6eb3640131113a6eb
tree98d4bfa8d931e862cf38f0373c3bf821e683badf
parent225735428c534155dbafc4132d79e47597c14c6d
ipc: stop mp control thread on cleanup

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@dpdk.org
Reported-by: Owen Hilyard <ohilyard@iol.unh.edu>
Signed-off-by: David Marchand <david.marchand@redhat.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
lib/eal/common/eal_common_proc.c