[PR #421] fix(python): avoid userdata reference cycle in FUSE demo #427

Open
opened 2026-10-26 09:50:09 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/deepseek-ai/3FS/pull/421
Author: @030611
Created: 8/11/2026
Status: 🔄 Open

Base: main ← Head: fix/fuse-userdata-cycle-386


📝 Commits (1)

  • 8ab2efc fix(python): avoid userdata reference cycle in FUSE demo

📊 Changes

2 files changed (+5 additions, -4 deletions)

View changed files

📝 hf3fs_fuse/fuse_demo.py (+4 -3)
📝 src/lib/py/usrbio_binding.cc (+1 -1)

📄 Description

Fixes #386.

The FUSE demo passes the full io tuple as userdata. That tuple contains the same iovec wrapper being prepared, while the C++ iov retains userdata through completion. This creates a wrapper -> C++ iov -> tuple -> wrapper cycle across the Python/C++ boundary.

Pass the expected byte count as scalar userdata instead, preserving the existing completion check without retaining the wrapper. Also clarify the userdata lifetime contract in the binding documentation.

Validation:

  • Python source compilation
  • static red/green check for the iovec-containing userdata path
  • git diff --check

I could not run the FUSE/RDMA path locally. This does not change usrbio runtime ownership and does not address the separate prepare() error path.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/deepseek-ai/3FS/pull/421 **Author:** [@030611](https://github.com/030611) **Created:** 8/11/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `fix/fuse-userdata-cycle-386` --- ### 📝 Commits (1) - [`8ab2efc`](https://github.com/deepseek-ai/3FS/commit/8ab2efca2161a0966c1f47e0b4e4d6e75bfbde6a) fix(python): avoid userdata reference cycle in FUSE demo ### 📊 Changes **2 files changed** (+5 additions, -4 deletions) <details> <summary>View changed files</summary> 📝 `hf3fs_fuse/fuse_demo.py` (+4 -3) 📝 `src/lib/py/usrbio_binding.cc` (+1 -1) </details> ### 📄 Description Fixes #386. The FUSE demo passes the full io tuple as userdata. That tuple contains the same iovec wrapper being prepared, while the C++ iov retains userdata through completion. This creates a wrapper -> C++ iov -> tuple -> wrapper cycle across the Python/C++ boundary. Pass the expected byte count as scalar userdata instead, preserving the existing completion check without retaining the wrapper. Also clarify the userdata lifetime contract in the binding documentation. Validation: - Python source compilation - static red/green check for the iovec-containing userdata path - git diff --check I could not run the FUSE/RDMA path locally. This does not change usrbio runtime ownership and does not address the separate prepare() error path. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
deepseek-ai/3FS#427
No description provided.