`kiri-nfs` exposes container `/sys` and `/proc` symlinks as directories, causing infinite directory loops and 100% CPU spikes
Maintainers usually reply within 1 day
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 28/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- macos, rust
- Domain
- operating-systems
Research direction
The NFS side lives in the kiri-nfs crate, which answers lookup/getattr requests through Engine::fs_stat over vsock; start where attributes are assembled for a path and check whether symlinks are resolved instead of reported with lstat semantics. The second half is the Finder export setup in kiri daemon (gated by KIRI_NO_FINDER), where /proc, /sys and /dev need filtering out of the exported rootfs. Done means a fresh macOS mount walked with find or lsof +D terminates and symlinks appear as symlinks. An open pull request (#655) already targets this, so coordinate before starting.
Written by the indexing model from the issue text.
Description
Environment
- Kiri:
0.2.2 - macOS:
27.0.1(26A434), Apple Silicon (Mac16,5)
Problem
The Finder NFS mount at ~/Kiri exposes container rootfs including /sys and /proc, and resolves symlinks as directories (stat instead of lstat):
$ ls -ld ~/Kiri/mongo-mongot-1/sys/bus/virtio/devices/virtio5/subsystem
dr-xr-xr-x 2 ali staff 0 ... /Users/ali/Kiri/mongo-mongot-1/sys/bus/virtio/devices/virtio5/subsystem
Any macOS process walking ~/Kiri (Spotlight, Finder, backup/indexing tools, lsof +D) falls into an infinite loop (e.g. .../virtio5/subsystem/drivers/vmw_vsock_virtio_transport/virtio5/subsystem/... until ENAMETOOLONG), hammering kiri-nfs-conn -> Engine::fs_stat over vsock at ~24,000 interrupts/s (~80% VM CPU + ~20% kiri daemon CPU).
Expected
- Serve symlinks as NFS symlinks (
lstat), not directories. - Exclude virtual filesystems (
/proc,/sys,/dev) from the Finder NFS export.
Workaround
Setting KIRI_NO_FINDER=1 on kiri daemon disables the Finder NFS mount.
- Dominant language
- Rust
- Stars
- 7.5k
- Forks
- 329
- Avg merge
- 14h 18m
- Merged PRs (30d)
- 204
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from libracoder/kiri
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
libracoder/kiri#669 ·
Maintainers usually reply within 1 day
-
VM never idles to sleep while the Windows GUI is open (GUI /info polling resets the idle timer)Openbug
Difficulty 3/5 Half a day Newbie friendliness 68/100
libracoder/kiri#668 ·
Maintainers usually reply within 1 day
-
Difficulty 3/5 Half a day Newbie friendliness 70/100
libracoder/kiri#654 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
libracoder/kiri#649 ·
Maintainers usually reply within 1 day
-
Difficulty 4/5 3-5 days Newbie friendliness 25/100
libracoder/kiri#647 ·
Maintainers usually reply within 1 day
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
antithesishq/bombadil#473 ·
Maintainers usually reply within 2 days
-
Difficulty 1/5 Under an hour Newbie friendliness 88/100
Maintainers usually reply within 5 days
-
autofixer: follow-up
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
tursodatabase/turso#12217 ·
Maintainers usually reply within 1 day
-
Declare the CMS schema library in the optional recipients extraPossibly taken A pull request linked to this issue is open or already merged. Openarea:python in-progress
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
yhay81/pyropdf#1005 · 2 comments ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day