flake: `stale NFS file handle`
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
- 35/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- github-actions, linux, rust
- Lĩnh vực
- infrastructure, testing
Hướng nghiên cứu
Start with qemu.rs:932 to understand how bcvk configures virtiofsd, then inspect the listed virtiofsd inode-store and file-open paths and the kernel FUSE staleness check. Reproduce or instrument the intermittent CI failures in the named integration tests; done means identifying a supported cause and validating a reliable fix or mitigation. The issue has had no recent discussion, so confirm the investigation is still active before starting.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
I don't understand why we're getting ESTALE sometimes in CI; haven't seen it locally. My understanding of the situations where this can happen require mutation of the source, but that shouldn't be happening here.
Investigation Summary (2026-01-23)
Assisted-by: OpenCode (Opus 4.5)
Scope of Impact
- Affected repos: Only
bootc-dev/bcvk(checked bootc, infra, ocidir-rs, containers-image-proxy-rs) - Frequency: ~5% of recent failed runs (5 out of ~100 runs checked)
- Tests affected: Various libvirt/to-disk integration tests:
test_to_disk_for_image_quay_io_fedora_fedora_bootc_42test_libvirt_run_bind_storage_rotest_libvirt_comprehensive_workflowtest_libvirt_port_forward_connectivity
Error Pattern
All failures occur in paths like:
/run/virtiofs-mnt-hoststorage/overlay/<layer-hash>/diff/sysroot/ostree/repo/objects/<xx>/<hash>.file
These are ostree content-addressed objects with many hardlinks (up to 970+ links for .file-xattrs-link files).
Architecture
Guest VM
└── virtiofs mount at /run/virtiofs-mnt-hoststorage
└── virtiofsd (v1.13.0, running unprivileged in container)
└── Host container storage (~/.local/share/containers/storage/overlay/...)
└── ostree repo objects (read-only, hardlinked)
Root Cause Analysis
-
bcvk passes
--inode-file-handles=fallbackto virtiofsd (seeqemu.rs:932), which should enable file handles when possible. -
However, virtiofsd runs unprivileged (inside a podman container with
--cap-add=all, but in a user namespace whereCAP_DAC_READ_SEARCHdoesn't grant real host filesystem capabilities). -
Without
CAP_DAC_READ_SEARCH, file handles don't work. From virtiofsd README:"virtiofsd can't use file handles (
--inode-file-handlesrequiresCAP_DAC_READ_SEARCH)" -
Fallback to O_PATH FDs: virtiofsd falls back to using O_PATH file descriptors to track inodes. When the guest wants to open a file, virtiofsd reopens via
/proc/self/fd/N. -
O_PATH FDs are vulnerable to ESTALE: According to virtiofsd docs, using O_PATH FDs instead of file handles "may also be important in cases where virtiofsd should only have file descriptors open for files that are open in the guest, e.g. to get around bad interactions with NFS's silly renaming."
The Puzzle
The container image layers are read-only - no files should be deleted or modified during the test. Yet we're seeing ESTALE. Possible explanations:
-
Inode generation mismatch: The kernel FUSE code checks
inode->i_generation != handle->generationand returns ESTALE on mismatch. virtiofsd always setsgeneration: 0, so this shouldn't trigger unless something is evicting/recreating inodes. -
Hardlink edge case: ostree objects have extremely high hardlink counts. There might be some edge case with how virtiofsd or the kernel handles lookups on highly-hardlinked files.
-
Race in inode cache: Something in the kernel's inode cache management could be evicting and revalidating inodes during concurrent access, causing transient failures.
-
Host filesystem peculiarity: Something specific to GitHub Actions runner filesystem configuration.
Relevant Code Paths
- virtiofsd inode store: When
--inode-file-handles=prefer/fallbackbut capabilities unavailable, falls back to O_PATH FDs (src/passthrough/inode_store.rs:405-417) - virtiofsd file open: Reopens via
/proc/self/fd/N(src/passthrough/util.rs:41-53) - Kernel FUSE staleness check:
fuse_stale_inode()infs/fuse/fuse_i.h:1080-1085
Example Failing Runs
- https://github.com/bootc-dev/bcvk/actions/runs/21287584864 (2026-01-23)
- https://github.com/bootc-dev/bcvk/actions/runs/21234542108 (2026-01-22)
- https://github.com/bootc-dev/bcvk/actions/runs/21210929456 (2026-01-21)
- https://github.com/bootc-dev/bcvk/actions/runs/21073791027 (2026-01-16)
- https://github.com/bootc-dev/bcvk/actions/runs/21002159880 (2026-01-14)
Potential Mitigations to Explore
- Run virtiofsd privileged: Grant
CAP_DAC_READ_SEARCHto enable actual file handles - Add debug logging: Capture virtiofsd debug output during failures
- Retry on ESTALE: Application-level workaround (not ideal)
- File upstream bug: With virtiofsd or kernel FUSE maintainers
- Ngôn ngữ chính
- Rust
- Star
- 142
- Fork
- 40
- Merge trung bình
- 2 ngày 22 giờ
- Pull request đã merge (30 ngày)
- 10
Chuẩn bị môi trường
Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Không 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 bootc-dev/bcvk
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
Maintainer thường phản hồi trong vòng 2 ngày
-
Image cache ignores --disk-sizeĐang mở
Độ khó 3/5 Nửa ngày Mức phù hợp với người mới 45/100
bootc-dev/bcvk#416 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Độ khó 3/5 Nửa ngày Mức phù hợp với người mới 50/100
Maintainer thường phản hồi trong vòng 2 ngày
-
extend host testingĐang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 43/100
Maintainer thường phản hồi trong vòng 2 ngày
-
Add `to-containerdisk`Đang mở
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
bootc-dev/bcvk#386 · 1 reaction ·
Maintainer thường phản hồi trong vòng 2 ngày
Tất cả issue của bootc-dev/bcvk
Issue tương tự
-
llm translation
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 Dưới một 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
-
documentation good first issue trivial
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 84/100
Maintainer thường phản hồi trong vòng 1 ngày
-
[Bug]: layer.move to the place a layer already has fails and stops a script; with several layers it leaves an empty undo stepCó thể đã có người làm @jgregoriorincon đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
opengeos/RustGIS#2621 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
good first issue web
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 92/100
Maintainer thường phản hồi trong vòng 1 ngày