loom participant retire cannot retire an orphaned participant after container replacement or host reboot
メンテナーはふだん 1 日以内に返信
@l0K1ngg がすでに取り組んでいます。
2026年12月2日 から。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 48/100
調査の方向性
Start with server/cli/participant.py and trace retire_participant() through _retire_dead_row() to proves_stopped() in server/core/provider_process.py; read the authority and running-query checks in server/insights/app/provider_barrier.py too. Reproduce the orphaned participant case described in the issue, then determine how retirement can safely support verified dead processes after container replacement or reboot. Done means the documented CLI recovery succeeds while settled-query checks remain enforced.
索引モデルが issue の本文から書いたものです。
説明
Company
Independent
Component
CLI
Describe what's wrong
When a Loom process exits without recording state = 'retired' in loom._provider_participants and its container/Pod is replaced (or the host reboots), /v1/health surfaces provider_participants_stale with the recovery instruction:
Fix: On its trusted host, verify exact physical death and settled queries with `loom participant retire --participant <id>`. Expiry or a deleted pod object does not prove death.
However, loom participant retire --participant <id> (server/cli/participant.py -> retire_participant() -> _retire_dead_row() -> proves_stopped() in server/core/provider_process.py) requires all three of:
if host != socket.gethostname() or boot != my_boot:
return False
if pidns != my_pidns:
return False
This creates an unrecoverable dead-end in standard deployments whenever the original runtime context no longer exists:
- Docker Compose (
compose.yaml, includingCOMPOSE_PROFILES=bundled) & Kubernetes:hostis the ephemeral container/Pod hostname (socket.gethostname()) andpidnsis the container's private/proc/self/ns/pidinode. Once the old container/Pod is removed and replaced (e.g.,docker compose up -drecreatingloomafter.envchanges whenretire_at_shutdowncould not reach ClickHouse,docker kill+ container recreation, or a Kubernetes Pod OOMKill/eviction), neither the new container nor the underlying Linux host can ever matchhost == socket.gethostname()andpidns == my_pidns. - Host crash / reboot (even on bare metal with a stable hostname): A reboot changes
/proc/sys/kernel/random/boot_id, soboot != my_bootcausesproves_stopped()to returnFalsepermanently on the same host.
Because server/cli/participant.py provides no operator break-glass flag and prune_retired only prunes rows already in state = 'retired', the warning persists forever and distributed_drain blocks every future provider reconfiguration unless an operator manually runs DELETE FROM loom._provider_participants against an internal _-prefixed table.
Does it reproduce on the latest release or main?
Yes
How to reproduce
- Start Loom using the shipped
compose.yaml(COMPOSE_PROFILES=bundled, defaultLOOM_WEB_WORKERS=2) and wait for/v1/health/readyto return200. - Confirm active rows in
loom._provider_participants(SELECT participant_id, state, host_proof FROM loom._provider_participants FINAL WHERE state != 'retired'). - Trigger an unretired container replacement — for example:
- recreate
loomafter killing it (docker kill <loom-container> && docker compose up -d --force-recreate loom), or - recreate
clickhouseandloomtogether (docker compose up -d --force-recreate clickhouse loom) whenloom'sretire_at_shutdownloses connectivity toclickhousebefore recording retirement.
- recreate
- Wait ~60–90 seconds (
STALE_AFTER_S+SWEEP_S) and inspectGET http://127.0.0.1:7777/v1/health:problemsreportscode: "provider_participants_stale"(heartbeat_expired) for the old container's participant UUIDs.
- Attempt the documented fix inside the running
loomcontainer (or from the host):
It exits with codedocker compose exec loom loom participant retire --participant <stale-participant-uuid>1even though the old container is completely gone (docker ps -a) andsystem.processeshas0queries withloom-participant/<hex>.
Expected behavior
Operators who have verified on the host that the old container/Pod (or pre-reboot OS instance) is physically gone and that all ClickHouse queries for that participant have settled should have a supported way to retire the orphaned participant via loom participant retire without manually mutating loom._provider_participants.
Possible approaches (potentially complementary):
- Explicit break-glass CLI flag (e.g.,
loom participant retire --participant <id> --force-dead/--confirm-host-gone) that still enforces_authority_settled(...)andrunning_queries(participant, ch=ch) == 0, while allowing an administrator with direct DB credentials to retire an orphaned row whose originalpidnsorboot_idno longer exists. - Host-level proof for destroyed containers / prior kernel boots: on the same
boot_id, a host agent/CLI in the root PID namespace could verify that the recorded Docker/K8s container mount/cgroup (parts[2]) no longer exists; across a reboot on the same stable host identity, a newboot_idproves prior processes of that host have terminated once cross-replica queries settle.
Error message and logs
✗ participant <uuid> has no verifiable exact physical-death proof or its cross-replica queries have not settled; run on its trusted host after the exact process stops. Expiry and Kubernetes object deletion are not proof
Environment
- Loom version:
v1.3.0(also verified unchanged inmainatserver/core/provider_process.pyandserver/cli/participant.py) - ClickHouse:
26.x(bundled viacompose.yaml,COMPOSE_PROFILES=bundled) - OS / Arch: Ubuntu 24.04 LTS (
linux/arm64), Docker Compose v2 - LLM / Embeddings:
LOOM_LLM_PROVIDER=fake, local embeddings
Related issues and pull requests
No response
How this was found
An AI tool helped find it, and I reproduced it myself
Additional context
Relevant code paths on main:
server/core/provider_process.py:host_proof()andproves_stopped()server/insights/app/provider_barrier.py:retire_at_shutdown(),_retire_dead_row(),retire_participant(),sweep_stopped()server/cli/participant.py:_cmd_retire()
Redaction
- I removed tokens, keys, passwords and personal or customer data from everything above.
- 主要言語
- Python
- スター
- 263
- フォーク
- 47
- 平均マージ
- 14時間 21分
- マージ済み PR(30日)
- 873
環境構築
このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。
- Dockerfile または Docker Compose ファイルあり
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
ClickHouse/loom のほかの issue
-
難易度 1/5 1〜3時間 初心者へのやさしさ 76/100
ClickHouse/loom#2014 ·
メンテナーはふだん 1 日以内に返信
-
Options of loom period-digest, reextract, reconcile-status and demote-activity-narration print no help text対応中かも @VanshajPoonia が今日担当しました。 オープンbug good first issue help wanted up-for-grabs
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
ClickHouse/loom#1988 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
A compiler-tier checkout fetch from a shallow mirror never records its head対応中かも @KaloyanNaumov が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 35/100
ClickHouse/loom#2016 ·
メンテナーはふだん 1 日以内に返信
-
Delta workers fetch the compiler-tier checkout under a hard-coded 600 s limit対応中かも @KaloyanNaumov が今日担当しました。 オープン
難易度 1/5 1時間未満 初心者へのやさしさ 35/100
ClickHouse/loom#2012 ·
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 40/100
ClickHouse/loom#2001 ·
メンテナーはふだん 1 日以内に返信
ClickHouse/loom の issue をすべて見る
似ている issue
-
DMB documentation good first issue help wanted
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
ubuntu/ubuntu-project-docs#921 ·
メンテナーはふだん 1 日以内に返信
-
⏳ Pending feedback 🐛 Bug
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
jumpserver/jumpserver#18282 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
accepted
難易度 2/5 1〜3時間 初心者へのやさしさ 67/100
future-agi/future-agi#5274 ·
メンテナーはふだん 1 日以内に返信
-
needs-triage
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
メンテナーはふだん 2 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
GenericMappingTools/pygmt#5014 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信