Spdk/include/spdk_internal
Ziye Yang 03aa8995e9 lib/sock: Fix the coredump issue in sock_map_realese
When tested on Linux 5.8 kernel and configure spdk
with debug mode (--enable-debug), and test SPDK NVMe-oF
tcp transport, and we see the coredump in sock_map_release
with the following statements:
	assert(entry->ref > 0);

After debug, I can confirm that the placement_id value got
from the following function (sock->net_impl->get_placement_id)
changes.
It means that: When the sock is added into the poll group
(spdk_sock_group_add_sock), we get the placement_id (named as
Value(begin)); and when the sock is removed from the poll group
(spdk_sock_group_remove_sock), we get the plaemednt_id on
the same sock (named as Vaule(end)). I found that
Value(begin) ! = Value(end).

So our solution is for a socket, we will get placement_id once,
then we can solve this issue.

Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Change-Id: Ia1d0cf39247b53410260561aca5af38130cc0abb
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3983
Community-CI: Mellanox Build Bot
Community-CI: Broadcom CI
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2020-09-01 07:51:27 +00:00
..
accel_engine.h lib/accel: change task alloc from global mempool->per chan list 2020-08-21 08:25:04 +00:00
assert.h include: Move the remainder of the code base to stdinc.h 2017-05-08 13:20:36 -07:00
event.h lib/event: add subsystem iterator functions. 2020-04-22 09:21:55 +00:00
idxd.h lib/idxd: implement idxd back end for CRC 2020-05-15 08:12:13 +00:00
log.h lib/log: fully remove log backtrace prints 2020-08-28 07:19:40 +00:00
lvolstore.h lvol: remove lvol_task structure 2020-04-24 15:45:21 +00:00
mock.h test: add generic unlink wrapper 2020-05-06 12:43:57 +00:00
nvme_tcp.h nvme_tcp: Move the default buffer factor size in nvme_tcp.h 2020-07-22 12:21:07 +00:00
rdma.h rdma: Add new API spdk_rdma_qp_accept 2020-06-18 07:28:04 +00:00
sock.h lib/sock: Fix the coredump issue in sock_map_realese 2020-09-01 07:51:27 +00:00
thread.h lib/thread: Cleanup thread structure 2020-04-14 11:33:05 +00:00
uring.h bdev/uring: Do not use IORING_SETUP_IOPOLL. 2020-08-04 18:27:56 +00:00
utf.h utf.h: remove #include "spdk/json.h" 2018-01-31 14:37:16 -05:00
vhost_user.h vhost_user: add VHOST_USER_PROTOCOL_F_INFLIGHT_SHMFD definition 2020-01-13 12:43:16 +00:00
virtio.h virtio: remove VHOST_USER_F_PROTOCOL_FEATURES from virtio.h 2020-01-10 08:45:45 +00:00