BFD hot loop when required_rx is 0
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 35/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 静か
- 技術スタック
- rust
- 領域
- networking
調査の方向性
async BFD session driver とその receive-timeout calculation から始め、次に timer negotiation に関する関連 issue #798 を読んでください。required_rx = 0 と独立した heartbeat を持つ current-thread Tokio テストを追加し、ゼロ以外の remote Desired Min TX interval に対するカバレッジも追加してください。unbounded expiration loop が発生せず、heartbeat が実行され続ければ完了です。
索引モデルが issue の本文から書いたものです。
説明
The following is an issue identified by AI when I asked it to do an adversarial code review of #795. This was pre-existing in the sync/pthread impl, which is why it was not addressed as part of the async swap-out.
Problem
BFD configuration permits required_rx = 0.
The state machine currently computes its receive timeout approximately
as:
local.required_min_rx * local.detection_multiplier
When required_rx is zero, every receive deadline equals the current
instant. The session driver repeatedly:
- observes an immediately expired timeout;
- re-arms another immediate timeout;
- increments the timeout counter;
- loops again.
The synchronous implementation had the same basic timer defect, but it
consumed a dedicated BFD thread. The async implementation runs this loop
on mgd's shared Tokio runtime, increasing the impact on unrelated BFD
sessions and API work.
Impact
One configuration can cause persistent CPU consumption and scheduler
pressure. Multiple such sessions may affect unrelated work running on
the Tokio runtime.
Protocol consideration
RFC 5880 gives Required Min RX Interval zero a meaning: the system does
not want to receive periodic BFD Control packets. It does not mean that
the receive deadline should continually expire.
Correct detection-time calculation also depends on the remote Desired
Min TX interval, so fixing timer negotiation may naturally eliminate
the zero deadline.
Proposed direction
This should be coordinated with #798.
Possible approaches:
- represent a disabled periodic receive expectation explicitly; or
- calculate the detection deadline from the negotiated interval rather
than local Required Min RX alone; or - reject zero at the management boundary if Maghemite intentionally
chooses not to support its RFC meaning.
The driver should also avoid repeatedly expiring a receive timer while
the session is already Down.
Testing
Add a current-thread Tokio test containing:
- a session configured with
required_rx = 0; and - an independent heartbeat task.
Verify that the heartbeat continues to run and the BFD driver does not
produce an unbounded stream of expiration events.
Also test zero in combination with a nonzero remote Desired Min TX
interval after timer negotiation is implemented.
Related issues
- #798: BFD timer negotiation is non-existent
- oxidecomputer/omicron#10657: BFD configuration validation
- 主要言語
- Rust
- スター
- 100
- フォーク
- 8
- 平均マージ
- 2日 1時間
- マージ済み PR(30日)
- 18
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
oxidecomputer/maghemite のほかの issue
-
ICMPv6 Router Solicitations are generated with invalid checksums対応中かも @taspelund が 154 日前に担当しました。 オープンBug mgd ndp rust
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
oxidecomputer/maghemite#802 ·
メンテナーはふだん 1 日以内に返信
-
ddm
難易度 5/5 1週間以上 初心者へのやさしさ 12/100
oxidecomputer/maghemite#1039 ·
メンテナーはふだん 1 日以内に返信
-
ddm want
難易度 3/5 1〜2日 初心者へのやさしさ 35/100
oxidecomputer/maghemite#1033 ·
メンテナーはふだん 1 日以内に返信
-
Bug ddm rust
難易度 3/5 1〜2日 初心者へのやさしさ 78/100
oxidecomputer/maghemite#997 ·
メンテナーはふだん 1 日以内に返信
-
🤖 ddm: a withdraw removes a route that a second source still gives対応中かも @taspelund が 19 日前に担当しました。 オープンBug ddm rust
難易度 4/5 3〜5日 初心者へのやさしさ 25/100
oxidecomputer/maghemite#996 ·
メンテナーはふだん 1 日以内に返信
oxidecomputer/maghemite の issue をすべて見る
似ている issue
-
[Bug]: Add Data's question says "Link to the file" for a GeoPackage where small tables are copiedオープンunconfirmed possible issue
難易度 2/5 1〜3時間 初心者へのやさしさ 64/100
メンテナーはふだん 1 日以内に返信
-
documentation
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
jerney-nexus/epikrise#364 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
Yeachan-Heo/gajae-code#8058 ·
メンテナーはふだん 1 日以内に返信
-
bug daemon
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
メンテナーはふだん 1 日以内に返信
-
good first issue
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
メンテナーはふだん 1 日以内に返信