mirror of
https://github.com/deepseek-ai/3FS.git
synced 2026-11-05 00:47:47 +00:00
[GH-ISSUE #315] Potential Race Condition in Memory Allocator Initialization #195
Labels
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
deepseek-ai/3FS#195
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 @han-ian on GitHub (Jul 22, 2025).
Original GitHub issue: https://github.com/deepseek-ai/3FS/issues/315
Code:
https://github.com/deepseek-ai/3FS/blob/main/src/memory/common/GlobalMemoryAllocator.cc#L76C2-L76C4
Issue Details:
Instruction reordering: gAllocatorInited = true may execute before std::call_once
Memory visibility: gAllocatorInited is not atomic, causing visibility issues across cores
Race condition: Other threads may see gAllocatorInited = true while the allocator is still uninitialized
May be this is an issue.