Skip to content

fix(python): avoid userdata reference cycle in FUSE demo - #421

Open
030611 wants to merge 1 commit into
deepseek-ai:mainfrom
030611:fix/fuse-userdata-cycle-386
Open

fix(python): avoid userdata reference cycle in FUSE demo#421
030611 wants to merge 1 commit into
deepseek-ai:mainfrom
030611:fix/fuse-userdata-cycle-386

Conversation

@030611

@030611 030611 commented Aug 11, 2026

Copy link
Copy Markdown

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

userdata lead to memory leak in fuse demo

1 participant