During secondary process shutdown, when nvme device would get detached, it would trigger env_dpdk to send rte_eal_hotplug_remove event for the corresponding BDF. But this isn't valid from a secondary process - we can only attach/detach from the primary process. Usually this would just result in a bunch of annoying print messages as the secondary and primary process sent rte messages between each other. But occasionally one of the response messages from the primary process could arrive just as the secondary process was going through rte_eal_cleanup. The message would get kicked to the DPDK intr thread, we would do bus_cleanup which frees all of the PCI state, and then the message would execute on the intr thread causing seg faults, use-after-free or some other violation. It's possible some kind of cleanup should be implemented in DPDK, but for now, let's just not induce incorrect behavior from SPDK, and don't send the hotplug_remove messages from a secondary process. Fixes issue #2651. Signed-off-by: Jim Harris <james.r.harris@intel.com> Change-Id: Ie431a1f8e74503e1de1be36cbb9589682d6dc94a Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16553 Reviewed-by: Michal Berger <michal.berger@intel.com> Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com> Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com> Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> |
||
---|---|---|
.. | ||
22.07 | ||
22.11 | ||
env_internal.h | ||
env.c | ||
env.mk | ||
init.c | ||
Makefile | ||
memory.c | ||
pci_dpdk_2207.c | ||
pci_dpdk_2211.c | ||
pci_dpdk.c | ||
pci_dpdk.h | ||
pci_event.c | ||
pci_idxd.c | ||
pci_ioat.c | ||
pci_virtio.c | ||
pci_vmd.c | ||
pci.c | ||
sigbus_handler.c | ||
spdk_env_dpdk.map | ||
threads.c |