Not all rust stdlib file paths are mapped correctly
Categories
(Toolkit :: Crash Reporting, defect, P3)
Tracking
()
People
(Reporter: mstange, Unassigned)
References
(Blocks 1 open bug)
Details
In the .sym files, some rust stdlib functions still have absolute /builds/worker/[...]
paths, rather than git:...
paths.
Example crash reports: Linux, macOS
If you click "Show other threads" in these reports, you can see the following functions at the bottom of the rust threads:
rayon_core::registry::ThreadBuilder::run
at third_party/rust/rayon-core/src/registry.rs:56
std::sys_common::backtrace::__rust_begin_short_backtrace
at /builds/worker/fetches/rustc/lib/rustlib/src/rust/library/std/src/sys_common/backtrace.rs:125
core::ops::function::FnOnce::call_once{{vtable.shim}}
at /builds/worker/fetches/rustc/lib/rustlib/src/rust/library/core/src/ops/function.rs:227
std::sys::unix::thread::Thread::new::thread_start
at library/std/src/sys/unix/thread.rs:71
Only the last one is properly mapped to a git:...
path by this code in symbol-store.py.
The two other stdlib functions show the raw locations in /builds/worker/fetches/rustc/lib/rustlib/
.
I think our existing mapping only works for the pre-compiled parts of the stdlib - for those, the file paths are guaranteed to start with /rustc/<sha>/
. But for any generic functions that are compiled as part of the Firefox build, we need to add another mapping for the /builds/worker/fetches/rustc/lib/rustlib/
path.
Reporter | ||
Comment 1•3 years ago
|
||
Steps to reproduce:
% curl -d '{"stacks":[[[0,48436800]]],"memoryMap":[["XUL","2D5D03F6C8CB35898666057BBCAD2E5E0"]]}' https://symbolication.stage.mozaws.net/symbolicate/v5 | jq
Expected results:
The file path should be git:github.com/rust-lang/rust:library/core/src/iter/adapters/filter.rs:53cb7b09b00cbea8754ffb78e7e3cb521cb8af4b
Actual results:
The file path is /builds/worker/fetches/rustc/lib/rustlib/src/rust/library/core/src/iter/adapters/filter.rs
{
"results": [
{
"stacks": [
[
{
"frame": 0,
"module": "XUL",
"module_offset": "0x2e31640",
"function": "core::iter::adapters::filter::filter_try_fold::{{closure}}",
"function_offset": "0x0",
"file": "/builds/worker/fetches/rustc/lib/rustlib/src/rust/library/core/src/iter/adapters/filter.rs",
"line": 44
}
]
],
"found_modules": {
"XUL/2D5D03F6C8CB35898666057BBCAD2E5E0": true
}
}
]
}
Updated•3 years ago
|
Reporter | ||
Comment 2•3 years ago
|
||
Similarly, we sometimes get unmapped paths for Rust dependencies.
Example profile: https://share.firefox.dev/3IQBCeW
This is showing the path /Users/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/hashbrown-0.11.0/src/raw/mod.rs
.
We could map this to a path like cargo:github.com-1ecc6299db9ec823:hashbrown-0.11.0:src/raw/mod.rs
Comment 3•2 years ago
|
||
Clearly nobody's working on this, and this doesn't seem to have huge impact.
Description
•