humility formats `anyhow` errors with backtraces, which is confusing when also displaying a Hubris stack trace
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 48/100
Hướng nghiên cứu
Tái hiện hành vi với humility ... tasks <TASK> --stack và với --stack --guess, sau đó theo dõi cách lệnh tasks xử lý lỗi anyhow. So sánh hai trace được hiển thị; hoàn tất khi lỗi dump vẫn dễ hiểu mà không đồng thời tạo ra một Humility backtrace thứ hai gây khó hiểu bên cạnh Hubris stack trace.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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.
- Ngôn ngữ chính
- Rust
- Star
- 587
- Fork
- 64
- Merge trung bình
- 2 ngày 1 giờ
- Pull request đã merge (30 ngày)
- 7
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của oxidecomputer/humility
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
oxidecomputer/humility#737 · 1 bình luận ·
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 30/100
oxidecomputer/humility#742 ·
-
rendmp phase check should be usable on Sidecars (the sequel)Có thể đã có người làm @jamesmunns đã nhận hôm nay. Đang mở
oxidecomputer/humility#741 · 1 người được giao ·
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 65/100
oxidecomputer/humility#730 · 1 bình luận ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 42/100
oxidecomputer/humility#723 · 1 bình luận ·
Tất cả issue của oxidecomputer/humility
Issue tương tự
-
Stack overflow in `check bans` with `include-dependencies = true` and a dev-dependency cycleĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
EmbarkStudios/cargo-deny#910 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
tursodatabase/turso#10054 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
build: Update rust versionCó thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mởdependencies
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 67/100
ibm-granite-community/granite-cli#229 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
Maintainer thường phản hồi trong vòng 2 ngày
-
setTargetAtTime booked ahead of time starts its curve early (values blow up before start_time)Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
orottier/web-audio-api-rs#658 ·