Explain Linux inotify quota exhaustion when creating the network status watcher
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 48/100
調査の方向性
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
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
dfinity/icp-cli のほかの issue
-
Feature: `icp cycles buy` — buy cycles with a card for the current identity via an on-chain gateway対応中かも @raymondk が 7 日前に担当しました。 オープンenhancement
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
メンテナーはふだん 1 日以内に返信
-
難易度 3/5 1〜2日 初心者へのやさしさ 68/100
メンテナーはふだん 1 日以内に返信
-
sync plugin OOMs ("memory allocation of N bytes failed") when the target canister already has assetsオープン
難易度 4/5 3〜5日 初心者へのやさしさ 45/100
dfinity/icp-cli#703 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 3/5 1〜2日 初心者へのやさしさ 74/100
メンテナーはふだん 1 日以内に返信
-
question
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
メンテナーはふだん 1 日以内に返信
dfinity/icp-cli の issue をすべて見る
似ている issue
-
RUSTSEC-2026-0348: Brotli certificate decompression can allocate up to 1 GiB before authenticationオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 60/100
-
難易度 1/5 1〜3時間 初心者へのやさしさ 62/100
-
core: Amount::from_str panics on values above 21M BTC instead of returning an error対応中かも @bhuvan-somisetty が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
メンテナーはふだん 1 日以内に返信
-
crate: spate-s3
難易度 2/5 半日 初心者へのやさしさ 62/100
メンテナーはふだん 1 日以内に返信
-
write_iceberg ignores the table's write.parquet.compression-codec property対応中かも @YuangGao が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
Eventual-Inc/Daft#7606 ·
メンテナーはふだん 1 日以内に返信