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

Investigate RPi hardware watchdog for autonomous reboot

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

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

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

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
35/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
静か
技術スタック
ansible, linux, python, raspberry-pi

調査の方向性

Raspberry Pi の /dev/watchdog にある watchdog インターフェースと /boot/config.txt の dtparam 設定から始め、続いてメインの Python スクリプトと Ansible のデプロイ/更新タスクを調べます。システムレベルまたはアプリケーションレベルの監視で十分かどうかを文書化し、ヘルスチェックとタイムアウトを選定し、正常なシャットダウンと更新処理を定義できれば完了です。

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

説明

This issue is part of the epic pyronear/roadmap#16 (Engine robustness).

Context

Pyronear stations run in the field, in quite remote areas. When a station freezes/bug (kernel panic, deadlock, full crash), the current recovery relies on a physical power cut, which risks filesystem corruption and requires human intervention or usually hardware timer relay.

The RPi has a built-in hardware watchdog (/dev/watchdog) that can trigger a clean software reboot automatically if the system stops responding ! no relay, no power cut.

How it works

The watchdog runs a hardware timer. Any process must periodically write to /dev/watchdog to reset it ("petting the dog"). If nothing writes for N seconds → the chip triggers a reboot.

It's deliberately dumb: it doesn't know why nothing wrote — freeze, crash, deadlock — it just reboots.

Two approaches to explore

1. System-level only (watchdog daemon)

  • Activate via dtparam=watchdog=on in /boot/config.txt
  • Let the watchdog Linux daemon handle the petting
  • ✅ Simple, no code change
  • ⚠️ Only covers full OS/kernel freeze — won't catch a live-but-broken capture pipeline

2. Application-level (from the main Python script)

  • Pet the watchdog only when the system is actually healthy (camera alive, recent frame, model responding)
  • If a check fails → stop petting → reboot triggered after timeout
  • ✅ Covers applicative failures too
  • ⚠️ Slightly more complexity, watchdog thread must be robust itself

Questions to answer

  • Does approach 1 alone cover enough failure modes for our use case? Might be relevant to start from that
  • What health checks are meaningful to gate the pet on (approach 2)?
  • What's the right timeout value (balance between false reboot vs slow recovery)? -> 10 ? 30 min ?
  • Impact on clean shutdown or an long update need to write magic char V to /dev/watchdog before closing -> Since deployments/updates are managed via Ansible, a natural solution is to add explicit steps around the update tasks (Disable watchdog before update and Re-enable watchdog after update)
主要言語
Python
スター
20
フォーク
9
平均マージ
8日 19時間
マージ済み PR(30日)
8

環境構築

はじめの一歩

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

pyronear/pyro-engine のほかの issue

pyronear/pyro-engine の issue をすべて見る

似ている issue

Python の issue をもっと見る

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

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