Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
OpenDAS
vllm_cscc
Commits
5f970120
Unverified
Commit
5f970120
authored
Feb 10, 2026
by
Zetong Li
Committed by
GitHub
Feb 10, 2026
Browse files
[Bugfix] Fix memory inconsistency in cross-process shared memory (#32022)
Signed-off-by:
Zetong Li
<
slippersss@126.com
>
parent
998e2d91
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
0 deletions
+6
-0
vllm/distributed/device_communicators/shm_broadcast.py
vllm/distributed/device_communicators/shm_broadcast.py
+6
-0
No files found.
vllm/distributed/device_communicators/shm_broadcast.py
View file @
5f970120
...
...
@@ -488,6 +488,12 @@ class MessageQueue:
for
i
in
range
(
1
,
self
.
buffer
.
n_reader
+
1
):
# set read flag to 0, meaning it is not read yet
metadata_buffer
[
i
]
=
0
# Memory fence here ensures the order of the buffer and flag
# writes. This guarantees that when `metadata_buffer[0] = 1` is
# visible to readers, `buf` can be completely ready. Without
# this, some CPU architectures with weak ordering may incur
# memory inconsistency.
memory_fence
()
# mark the block as written
metadata_buffer
[
0
]
=
1
# Memory fence ensures the write is visible to readers on other cores
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment