-
Notifications
You must be signed in to change notification settings - Fork 423
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
UCP/CORE/GTEST: Fix possible purge of requests after discarding is in-progress after error handling #7672
UCP/CORE/GTEST: Fix possible purge of requests after discarding is in-progress after error handling #7672
Conversation
2dc5069
to
7b19d38
Compare
Maybe just don't call purge during ep_close if the ep is already failed? |
do you mean to not do invoke |
if you mean to not invoke |
Maybe discard with a different callback? |
maybe just not do discard in case of |
@yosefe wdyt about the current solution pushed as the second commit? |
3 line fix is definitely better :) i'll review the test |
@yosefe is it ok now? |
EXPECT_FALSE(ucs_hlist_is_empty(&ucp_ep_ext_gen(ep)->proto_reqs)); | ||
ucp_tag_message_h message; | ||
ucp_tag_recv_info_t info; | ||
message = message_wait(receiver(), 0, 0, &info); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
check if message is NULL
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good catch
done
…-progress after error handling
62a93bc
to
b2a935b
Compare
What
Fix possible purge of requests after discarding is in-progress after error handling.
Why ?
It fixes a new type of "iov data corruption" issue found by MTT/IO-Demo testing:
ucp_ep_set_failed
discards all UCT lanes (they operations are in-progress)ucp_ep_set_failed
invokes a user's error callback which closes the failed endpoint with mode=FORCEucp_ep_reqs_purge
is called fromucp_ep_discard_lanes
, since no lanes to discardHow ?
ucp_ep_discard_lanes_t
in the control extension of UCP endpoint.discard_lanes
was already allocated: if so - use it, otherwise - allocate a new one. So all discarding operations will use the samediscard_lanes
argument and UCP EP protected from being purged before all UCT lanes are closed.