prov/psm3: Internal polling must use timeout to prevent infinite loop…#11916
prov/psm3: Internal polling must use timeout to prevent infinite loop…#11916tatarintsevsv wants to merge 1 commit intoofiwg:mainfrom
Conversation
e18b2e4 to
68dd8c2
Compare
j-xiong
left a comment
There was a problem hiding this comment.
In addition to the comment below, note that the return value of psm3_amsh_am_short_request and psm3_amsh_generic_inner is not handled by the upper layer in its call chain. As a result, in case of resource exhaustion, the application is able to break out from the infinite loop but may silently treat this error as success.
Error hadling added. |
|
Thanks. I do see a few other places in the call chain the error code is still ignored (e.g. The review process here is different from some other repos that do auto squash on merging. Please squash the commits and do a force push. For this specific case, it is fine to keep the commits separate, but then you will need to add proper commit message and "signed-off" line. |
77abab9 to
d79e0af
Compare
|
Thanks! Commits squashed |
|
I will review the code and get back to you. |
Thanks, i will wait for your review! |
acgoldma
left a comment
There was a problem hiding this comment.
I still think there is a better solution as we should already have timers waiting for ACKs. the point of the yield to receive thread is that the rec thread should check timers.
|
some fixes pushed |
06cce92 to
3c1713b
Compare
3c1713b to
b669958
Compare
b669958 to
0fa46bc
Compare
|
Please remove the second commit. Or use rebase instead of merge if you want the CI to pick up all the changes from main. |
… during resources acquiring Due to a lack of resources, the AMSH_POLL_UNTIL() and PSMI_BLOCKUNTIL() may never complete. If resources polling was not finished within timeout, an interrupt will occur and error will be returned. Signed-off-by: Sergey Tatarintsev <s.tatarintsev@postgrespro.ru>
9da110f to
ecc2074
Compare
done |
… during resources acquiring
Due to a lack of resources, the AMSH_POLL_UNTIL() and PSMI_BLOCKUNTIL() may never complete. If resources polling was not finished within PSMI_MIN_EP_CONNECT_TIMEOUT, an interrupt will occur and error will be returned.
Fixes #11893