mirror of
https://github.com/kvcache-ai/Mooncake.git
synced 2026-11-05 01:17:55 +00:00
[GH-ISSUE #4386] store: UdsAcceptor::listen_fd_ is accessed without synchronization across threads #1101
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#1101
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 @quantz8a on GitHub (Sep 29, 2026).
Original GitHub issue: https://github.com/kvcache-ai/Mooncake/issues/4386
Background
UdsAcceptor::acceptLoop()runs on a dedicatedstd::jthread. It readslisten_fd_for everyaccept()call and, when the loop exits, closes the descriptor and setslisten_fd_ = -1.UdsAcceptor::stop()runs on another thread: it callswakeAccept(), joins the accept thread, readslisten_fd_, closes it, and resets it to-1.Concurrent unsynchronized access to the non-atomic
int listen_fd_from those two threads is a data race and undefined behavior.Scope
mooncake-store/src/uds_transport.cppProposed fix
acceptLoop()so the accept thread only readslisten_fd_, whilestop()closes the descriptor afterjoin().@github-actions[bot] commented on GitHub (Sep 29, 2026):
Thanks for opening this issue, @quantz8a!
3152505A maintainer will triage this when possible. To help us respond faster, please include:
Useful links: Documentation · Contributing guide