Whamcloud - gitweb
LU-10931 lnet: handle unlink before send completes 44/35444/4
authorAmir Shehata <ashehata@whamcloud.com>
Mon, 8 Jul 2019 19:33:31 +0000 (12:33 -0700)
committerOleg Drokin <green@whamcloud.com>
Wed, 21 Aug 2019 04:46:40 +0000 (04:46 +0000)
commitd8fc5c23fe541e0ff6ce5bec6302957714c3f69f
treeb27f4cea835e4590aa8d55fddcc0e236cbe8e5be
parent4485ee8be4cf224e2543f6344efc6e1cb295a0a7
LU-10931 lnet: handle unlink before send completes

If LNetMDUnlink() is called on an md with md->md_refcount > 0 then
the eq callback isn't called.
There is a scenario where the response times out before the send
completes. So we have a refcount on the MD. The Unlink callback gets
dropped on the floor. Send completes, but because we've already timed
out, the REPLY for the GET is dropped. Now we're left with a peer
that is in the following state:
LNET_PEER_MULTI_RAIL
LNET_PEER_DISCOVERING
LNET_PEER_PING_SENT
But no more events are coming to it, and the discovery never
completes.

This scenario can get RPCs stuck as well if the response times out
before the send completes.

The solution is to set the event status to -ETIMEDOUT to inform
the send event handler that it should not expect a reply

Signed-off-by: Amir Shehata <ashehata@whamcloud.com>
Change-Id: Ica0e1a823d0d1200bb8cc42a6e058785da1d4fa4
Reviewed-on: https://review.whamcloud.com/35444
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: Chris Horn <hornc@cray.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Alexandr Boyko <c17825@cray.com>
Reviewed-by: Olaf Weber <olaf.weber@hpe.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lnet/lnet/lib-msg.c