akiomik / akiomik/bela-rs

probe-init-failure.sh: the busy probe's holder is the one remote process nothing bounds

オープン
#164 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る
bug hardware
主要言語
Rust
スター
1
フォーク
0
平均マージ
5時間 19分
マージ済み PR(30日)
26

説明

`scripts/probe-init-failure.sh:319` starts the `busy` probe's holder
detached:

```sh
remote "cd $REMOTE_DIR && nohup ./init_failure render-check $HOLD_SECONDS \
> holder.log 2>&1 & echo started" > /dev/null
```

Every other remote launch in `scripts/` goes through
`timeout -s INT -k 5`, and the script's own remote half says why:
"Bounded, because a probe that hangs holds the audio device and every
later run would fail for that reason instead of the one being
measured." The holder is the exception. In the ordinary case it ends
itself after `HOLD_SECONDS`, which is what the argument asks for; what
is unbounded is a holder that hangs inside libbela — in a script whose
subject is audio systems that do not come up.

What it costs, as far as anyone knows: interrupting during the `busy`
probe, or losing the ssh just after the holder starts, leaves a process
on the audio device for up to `HOLD_SECONDS` while `restore()` runs its
`systemctl start bela_daemon` beside it. Whether that does any harm is
not known — this board does not refuse a second process ("Audio
thread", `docs/board-facts.md`), so the daemon may simply start.

Not a regression from #163. That change removed a
`pkill -9 -x init_failure` which could not have reached the holder
either: the holder brings an audio system up, so libbela renames it a
moment into its life. It was raised three times while reviewing #163
and kept out of it deliberately — that change removes a guard, and
adding one is a separate decision.

What to do about it, in order:

1. Measure whether a `bela_daemon` started beside a held device does
anything at all. If it does not, the answer may be a line in the
script saying so rather than a `timeout`.
2. If it does, bound the holder the way everything else here is
bounded: `timeout -s INT -k 5 $((HOLD_SECONDS + N))`, with `N` the
margin the other runs use.

コントリビューションガイド

コントリビューションガイドを開く

調査の方向性

Start at scripts/probe-init-failure.sh:319 and read docs/board-facts.md, then run the busy probe on the target board while observing whether starting bela_daemon beside the held device changes its behavior. Done means recording that result and either documenting why the holder needs no bound or selecting the timeout margin used by the other remote launches.

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

評価

技術スタック
shell
領域
embedded-iot
issue の種類
バグ
難易度
4/5
見積もり時間
3〜5日
活発さ
活発
明瞭さ
おおむね明確
初心者へのやさしさ
48/100

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

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