mirror of
https://github.com/deepseek-ai/3FS.git
synced 2026-11-05 00:47:47 +00:00
[PR #367] fix(io): Add robust symlink cleanup to prevent resource leakage #391
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#391
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?
📋 Pull Request Information
Original PR: https://github.com/deepseek-ai/3FS/pull/367
Author: @yurekami
Created: 12/25/2025
Status: 🔄 Open
Base:
main← Head:fix/iovec-symlink-cleanup📝 Commits (1)
b250b38fix(io): Add robust symlink cleanup to prevent resource leakage📊 Changes
1 file changed (+106 additions, -1 deletions)
View changed files
📝
hf3fs_fuse/io.py(+106 -1)📄 Description
Summary
__enter__/__exit__) toiovecandioringclasses for Pythonic resource managementatexithandler to clean up orphaned symlinks on normal process exitclose()methods with idempotent behavior for manual cleanupRelated Issue
Fixes #334 - Shared memory leakage due to symlinks not being properly deleted
Changes
The
iovecclass creates symlinks in/3fs-virt/iovs/that point to shared memory. Previously, cleanup only happened in__del__, which is unreliable in Python (not guaranteed to run, timing issues, exception handling problems).This PR improves cleanup reliability by:
with make_iovec(...) as iov:for automatic cleanupExample usage:
Test plan
__del__🤖 Generated with Claude Code
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.