humility formats `anyhow` errors with backtraces, which is confusing when also displaying a Hubris stack trace
まだ誰も着手していません。
評価
調査の方向性
humility ... tasks <TASK> --stack と --stack --guess で動作を再現し、続いて tasks コマンドによる anyhow エラーの処理を追跡します。表示された 2 つのトレースを比較します。dump エラーが理解可能なままで、Hubris の stack trace と並んで混乱を招く 2 つ目の Humility backtrace まで生成されなければ完了です。
索引モデルが issue の本文から書いたものです。
説明
When running humility tasks <TASK> --stack on a dump of a task that overflowed its stack, Humility prints an error indicating that the stack pointer points at an invalid memory address (which makes sense, as it points outside of the dumped region), and suggests the use of the --guess flag to try and reconstruct the stack trace from the frame pointer. This error is represented by an anyhow error, which includes a backtrace:
eliza@theseus ~/Code/oxide/hubris $ humility -d hubris.core.packrat.0 tasks packrat --stack
humility: attached to dump
system time = 321850
ID TASK GEN PRI STATE
11 packrat 0 1 FAULT: stack overflow; sp=0x24001f98 (was: ready)
could not read registers: read of 32 bytes from invalid address: 0x24001f98
Stack backtrace:
0: <humility_core::dump::DumpCore as humility_core::core::Core>::read_8
1: humility_core::hubris::HubrisArchive::registers
2: humility_cmd_tasks::print_tasks
3: humility_cmd_tasks::tasks
4: humility_cmd::attach
5: humility::cmd::subcommand
6: humility::main
7: std::sys::backtrace::__rust_begin_short_backtrace
8: std::rt::lang_start::{{closure}}
9: std::rt::lang_start_internal
10: main
11: __libc_start_call_main
12: __libc_start_main_impl
13: _start
use `--guess` to guess at stack trace
When the command is run again with --stack --guess, Humility still points the error, along with the Hubris backtrace that it guessed at:
eliza@theseus ~/Code/oxide/hubris $ humility -d hubris.core.packrat.0 tasks packrat --stack --guess
humility: attached to dump
system time = 321850
ID TASK GEN PRI STATE
11 packrat 0 1 FAULT: stack overflow; sp=0x24001f98 (was: ready)
could not read registers: read of 32 bytes from invalid address: 0x24001f98
Stack backtrace:
0: <humility_core::dump::DumpCore as humility_core::core::Core>::read_8
1: humility_core::hubris::HubrisArchive::registers
2: humility_cmd_tasks::print_tasks
3: humility_cmd_tasks::tasks
4: humility_cmd::attach
5: humility::cmd::subcommand
6: humility::main
7: std::sys::backtrace::__rust_begin_short_backtrace
8: std::rt::lang_start::{{closure}}
9: std::rt::lang_start_internal
10: main
11: __libc_start_call_main
12: __libc_start_main_impl
13: _start
guessing at stack trace using saved frame pointer
|
+---> 0x24002048 0x080564de core::fmt::write
0x240020a0 0x080564de core::fmt::write
0x240020d8 0x08056b24 rust_begin_unwind
0x240020d8 0x08055d12 core::fmt::Formatter::pad_integral::write_prefix
This output is kinda goofy, since there are two stack traces printed out, with different formatting.
While an astute reader can pretty easily determine that one of these looks like a stack trace in Humility rather than Hubris, it's still pretty weird that there are two stacks displayed, which is potentially confusing. We should probably not format the anyhow::Error with the format specifier that includes a backtrace in this case, since it's not really an internal error we'd need the backtrace to debug, and is instead an error regarding the dump we tried to read.
- 主要言語
- Rust
- スター
- 587
- フォーク
- 64
- 平均マージ
- 2日 1時間
- マージ済み PR(30日)
- 7
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
oxidecomputer/humility のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
oxidecomputer/humility#737 · コメント 1 件 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 30/100
oxidecomputer/humility#742 ·
-
rendmp phase check should be usable on Sidecars (the sequel)対応中かも @jamesmunns が今日担当しました。 オープン
oxidecomputer/humility#741 · 担当者 1 名 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 65/100
oxidecomputer/humility#730 · コメント 1 件 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 42/100
oxidecomputer/humility#723 · コメント 1 件 ·
oxidecomputer/humility の issue をすべて見る
似ている issue
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
shep-pm/shep-kelpie#980 ·
メンテナーはふだん 1 日以内に返信
-
bug frontend rt sev-3
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
-
C-bug
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
-
[1.x Bug] run-operation --sql reports success but rolls back writes on transaction-capable adaptersオープンtriage
難易度 2/5 1〜3時間 初心者へのやさしさ 64/100
dbt-labs/dbt#16784 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
area:cli bug good first issue priority:medium
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
メンテナーはふだん 1 日以内に返信