Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Explain Linux inotify quota exhaustion when creating the network status watcher

オープン
#814 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
48/100
issue の種類
機能追加
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
linux, rust
領域
backend, cli

調査の方向性

Start with crates/icp-app/src/network/managed/launcher.rs, especially wait_for_single_line_file and spawn_network_launcher, and trace native watcher construction before cmd.spawn(). Reproduce allocation failures by simulating native EMFILE and ENOSPC at watcher construction; verify diagnostics distinguish inotify instance quota, process FD limit, and watch quota, report useful limits, and spawn no child. Confirm normal startup and WSL watcher behavior remain intact.

索引モデルが issue の本文から書いたものです。

説明

On 2026-10-11, Toko Miner's local network startup with published ICP CLI 1.6.0 failed with:

Error: failed to watch status directory
Caused by:
    0: failed to watch file changes at path /tmp/.tmp6fJ6SO
    1: Too many open files (os error 24)

The machine's fs.inotify.max_user_instances was 128, fs.inotify.max_user_watches was 1048576, and the invoking shell's soft/hard RLIMIT_NOFILE was 1048576. A separate small Python process reproduced inotify_init1(O_CLOEXEC) == -1 with errno EMFILE (24). This isolates exhausted per-user inotify instances rather than the shell's process descriptor limit. Editor/desktop processes held many watchers; there is no evidence that ICP leaks them. The watch-reference count is not a unique-instance count and is not used to establish the diagnosis.

Inspected released source: v1.6.0, commit 18435e1747162447fca231548b74d97e4cf48888, crates/icp-app/src/network/managed/launcher.rs, especially wait_for_single_line_file and spawn_network_launcher. The native notify::recommended_watcher is required alongside PollWatcher. Status watcher construction precedes cmd.spawn(), so this specific refusal occurs before spawning the launcher. The user-supplied log selected icp-cli-network-launcher v16.0.0-2026-09-18-03-28; launcher stdout/stderr were empty. No sibling source was used or modified.

Application impact: the build completed, then the explicit destructive local-reset flow deleted disposable local state before ICP startup hit this quota. We are adding an ephemeral allocation/watch probe before compilation and immediately before deletion, and documenting host remediation. The probe cannot reserve capacity across subsequent work. No host limit was changed or destructive reset retried during diagnosis. Application checkout: dragginzgame/toko-miner commit 3e53fb5b8963c126edf9d236f86c71c0a2f335cc, dirty local launcher fixes and concurrent lockfile edits, not a clean released-source qualification.

Reproduction on an already affected Linux host (does not allocate many watchers or alter limits):

cat /proc/sys/fs/inotify/max_user_instances
cat /proc/sys/fs/inotify/max_user_watches
ulimit -Sn
python3 - <<'PY'
import ctypes, os
libc = ctypes.CDLL(None, use_errno=True)
fd = libc.inotify_init1(os.O_CLOEXEC)
print('fd:', fd, 'errno:', ctypes.get_errno() if fd < 0 else 0)
if fd >= 0:
    os.close(fd)
PY

Requested outcome: a Linux-specific resource diagnostic for native watcher allocation failures which names both possible EMFILE causes (per-user inotify instance quota and process FD limit), reports useful limits, and documents administrator remedies without changing host configuration or killing unrelated processes. ENOSPC should identify the watch quota separately. A lightweight upstream capacity-check surface would also help consumers admit destructive local workflows before deleting state. This is a diagnostics/documentation request, not a confirmed launcher defect or a request to introduce a silent polling fallback.

Acceptance: simulate native EMFILE and ENOSPC at watcher construction, assert accurate actionable diagnostics and no spawned child; keep normal startup and WSL watcher behaviour intact. Distinguish failed allocation before spawn from launcher crashes. Search of all open/closed issues for inotify, failed to watch, and Too many open files found no matching report.

Linux errno semantics: https://www.man7.org/linux/man-pages/man2/inotify_init.2.html

主要言語
Rust
スター
115
フォーク
14
平均マージ
21時間 31分
マージ済み PR(30日)
28

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

dfinity/icp-cli のほかの issue

dfinity/icp-cli の issue をすべて見る

似ている issue

Rust の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。