`kiri-nfs` exposes container `/sys` and `/proc` symlinks as directories, causing infinite directory loops and 100% CPU spikes

Open
#648 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

@talaatmagdyx is already working on this.

Since Nov 21, 2026.

  • #655 by @talaatmagdyx — open

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

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

bug
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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from libracoder/kiri

All issues in libracoder/kiri

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.