If the controllers are left attached when the application is terminated,
the virtio library might receive notifications about memory being
unregistered from the mem_map. The apps in json_config test are
preallocating 1GB of memory, which should stop DPDK from releasing the
hugepages back to the system, but if they allocate more, that extra
pages can be released, which would generate the mem_map notifications .
This actually happened in #2951 - spdk_tgt was built with ocf support,
which preallocates an extra ~300MB mempools, exceeding 1GB, which caused
mem_map notifications to be sent when iscsi mempools were destroyed
triggering an assertion in virtio.
Another option to fix this would be to increase the size of the
preallocated memory, but detaching the controllers achieves the same
thing without requiring more resources.
Fixes#2951.
Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Change-Id: I743af39acfee68caba55ec4fccd593a696ab688b
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/17265
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>