Spdk/test/unit/lib
Ziye Yang 4cd6544d44 nvmf: solve the memory leak issue caused by subsystem listerner port
The possible issue could be following if you shutdown NVMe-oF target
with TCP transport as an example,

=================================================================
==61022==ERROR: LeakSanitizer: detected memory leaks

Direct leak of 560 byte(s) in 1 object(s) allocated from:
    #0 0x7ffff6efcfe0 in calloc (/lib64/libasan.so.3+0xc6fe0)
    #1 0x4c6216 in spdk_nvmf_tcp_listen /home/ziyeyang/spdk/lib/nvmf/tcp.c:680

Indirect leak of 48 byte(s) in 1 object(s) allocated from:
    #0 0x7ffff6efcfe0 in calloc (/lib64/libasan.so.3+0xc6fe0)
    #1 0x4a77b8 in spdk_posix_sock_create /home/ziyeyang/spdk/lib/sock/posix/posix.c:291

After checking the issue, it seems that we did not call
spdk_nvmf_transport_stop_listen when removing the subsystem listener.
And this patch can solve this issue.

Change-Id: Ic75d99cb0c6a3ba1c47ac79a2d8e3887b0f6b012
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/447020
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: yidong0635 <dongx.yi@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Seth Howell <seth.howell5141@gmail.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-03-08 20:33:33 +00:00
..
bdev test/bdev/raid: use strip_size_kb 2019-03-04 08:44:44 +00:00
blob thread: Optionally allow the current time to be passed to 2019-02-11 22:58:45 +00:00
blobfs thread: Optionally allow the current time to be passed to 2019-02-11 22:58:45 +00:00
event event: No longer require event in spdk_subsystem_fini 2019-03-08 03:21:45 +00:00
ftl test/unit/ftl: Fix assert in write pointer test 2019-02-26 07:51:20 +00:00
ioat test/unit: remove duplicate mk/spdk.common.mk includes 2019-02-11 09:30:27 +00:00
iscsi iscsi: Add a function to read PDU data from socket by spdk_sock_readv 2019-03-08 01:21:26 +00:00
json json: add utilities function enabling itaration over JSON object 2018-10-18 16:07:37 +00:00
jsonrpc jsonrpc: fix received JSON buffer overwrite 2019-01-10 14:31:37 +00:00
log test/unit: remove duplicate mk/spdk.common.mk includes 2019-02-11 09:30:27 +00:00
lvol test/unit: remove duplicate mk/spdk.common.mk includes 2019-02-11 09:30:27 +00:00
nvme nvme: use asynchronous probe API in spdk_nvme_probe() 2019-03-08 04:42:21 +00:00
nvmf nvmf: solve the memory leak issue caused by subsystem listerner port 2019-03-08 20:33:33 +00:00
reduce test/unit: remove duplicate mk/spdk.common.mk includes 2019-02-11 09:30:27 +00:00
scsi scsi: Add an API to return DIF context of bdev and CDB 2019-03-08 01:21:26 +00:00
sock sock: Add spdk_sock_readv(sock, iov, iovcnt) 2019-03-08 01:21:26 +00:00
thread test/unit: remove duplicate mk/spdk.common.mk includes 2019-02-11 09:30:27 +00:00
util dif: Create iovec array so that a space for metadata is left for each block 2019-03-07 07:03:27 +00:00
vhost rte_vhost: introduce get/set vring base idx APIs 2019-02-27 01:43:16 +00:00
json_mock.c subsystem: add per module configuration dump 2018-03-23 02:47:40 -04:00
Makefile ftl: Added unit tests for FTL library 2019-01-22 23:22:16 +00:00