mirror of
https://github.com/kvcache-ai/Mooncake.git
synced 2026-11-05 01:17:55 +00:00
[GH-ISSUE #1071] [Bug]: Receiver side race condition #357
Labels
No labels
ascend
auto-closed
bug
bug
CI/Build
Common
documentation
enhancement
feature request
good first issue
help wanted
high priority
MetaX
nightly-failure
pull-request
PyTorch Backend
question
RFC
Roadmap
stale
Store
Tests
Transfer Engine
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
kvcache-ai/Mooncake#357
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @ShangmingCai on GitHub (Nov 18, 2025).
Original GitHub issue: https://github.com/kvcache-ai/Mooncake/issues/1071
Originally assigned to: @alogfans on GitHub.
Bug Report
context: https://github.com/sgl-project/sglang/pull/13231
cc: @alogfans
Before submitting...
@ShangmingCai commented on GitHub (Nov 18, 2025):
@flying-x Thank you so much for the digging. I think we can discuss and arrange a fix here.
@alogfans commented on GitHub (Nov 18, 2025):
@flying-x So the fix scope should be inside tcp_transport, especially the ASIO callback logic. Try to check that if there are multiple slices for a single request.
@flying-x commented on GitHub (Nov 18, 2025):
Thank you @ShangmingCai and @alogfans.
I am thinking that the sender side can queue a readBody call after sending all slices and when the callback of the readBody is done, it then calls markSuccess(). On the receiving side, once all readBody calls are done (including cudaMemcpy calls), it will send an ACK msg (1 byte, with writeBody and then finish the request) so that readBody call from the sender side will be unblocked.
The sender side needs to have a timeout on the readBody, but other than that, there should be no new error handling.
Does the above sound OK?
@ShangmingCai commented on GitHub (Nov 19, 2025):
This will definitely increase the TTFT, but I assume TCP fallback doesn't require strict SLO for TTFT.
As long as we can keep most changes in the mooncake part, this method seems reasonable to me.
@ykwd commented on GitHub (Nov 21, 2025):
In fact, I previously encountered a similar issue when testing with TCP. After the TE reports that the transfer has completed successfully, if you immediately check the data on the receiving side, there is a chance that the data has not been fully written yet.
@github-actions[bot] commented on GitHub (Jun 19, 2026):
This issue has had no activity for 90 days and will be closed in 7 days if there is no further activity. Please comment or react if it should stay open.
@github-actions[bot] commented on GitHub (Jun 26, 2026):
Closing due to 3 months of inactivity. If this is still relevant, please comment and we can reopen.