Closed FUSE sessions stay pinned by open files, exhausting the 8 session slots
Maintainer thường phản hồi trong vòng 2 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 43/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- c
- Lĩnh vực
- backend, operating-systems
Hướng nghiên cứu
Start with session refcounting and cleanup in src/syscall/fuse.c, then follow the /dev/fuse open path at src/syscall/fs.c:887 and inspect fuse_proc_open. Reproduce by repeating the issue’s mount, open-file, and daemon-close steps until the ninth open fails. Done means dead sessions no longer block new opens and the guest receives an appropriate errno; the issue lists several possible approaches without choosing one.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
A session's refcount in src/syscall/fuse.c is held by the /dev/fuse fd, by each live mount, and by each open FUSE file fd. When the daemon closes /dev/fuse, fuse_fd_cleanup marks the session dead and tombstones its mounts. The slot is freed only when the last file fd on it closes.
With FUSE_MAX_SESSIONS at 8, a daemon that restarts while consumers keep old files open runs out of slots.
Reproduction (one guest process, daemon on a thread):
- Open
/dev/fuse, mount it, open a file under the mount and keep it open. - Close
/dev/fuseto simulate the daemon exiting. - Repeat.
| Round | Result |
|---|---|
| 1-8 | succeed |
| 9 | open("/dev/fuse") fails |
| after closing the 8 held files | open("/dev/fuse") succeeds again |
In the 9th round the guest sees EPERM, not the EMFILE that fuse_proc_open sets. src/syscall/fs.c:887 returns fuse_proc_open(linux_flags) directly, so its -1 reaches the guest as -EPERM. pipe() and fd_alloc failures inside fuse_proc_open are mapped the same way.
Linux has no fixed cap here. fuse_dev_open (fs/fuse/dev.c) only allocates a struct fuse_dev. The connection is created at mount time and released with the superblock (fuse_kill_sb_anon → fuse_mount_destroy → fuse_conn_put), so a dead connection still referenced by open files does not block a new daemon.
Possible directions:
- Map the
fuse_proc_openfailure throughlinux_errno(), and pick an errno that does not claim the fd table is full. - Do not count a dead session (
daemon_dead) againstFUSE_MAX_SESSIONS. For example, keep its remaining state in a smaller structure for the open files, and free the 158 KiB slot. - Or allocate sessions on demand, which the fixed-table issue also suggests.
- Ngôn ngữ chính
- C
- Star
- 287
- Fork
- 33
- Merge trung bình
- 2 ngày 17 giờ
- Pull request đã merge (30 ngày)
- 18
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của sysprog21/elfuse
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 64/100
Maintainer thường phản hồi trong vòng 2 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 80/100
Maintainer thường phản hồi trong vòng 2 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 86/100
Maintainer thường phản hồi trong vòng 2 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 2 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
Maintainer thường phản hồi trong vòng 2 ngày
Tất cả issue của sysprog21/elfuse
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
libreswan/libreswan#3185 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
-
[SDL3pp] update to 0.12.0Đang mởcategory:port-update
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 2 ngày
-
[InstCombine] 23.x folds 0.0 * (0.0 / x) to 0.0 when x may be zero (fixed on main by #202482)Đang mởllvm:instcombine
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 64/100
llvm/llvm-project#246503 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
Maintainer thường phản hồi trong vòng 1 ngày