Hooks for loading external debug symbols (especially during panics)
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 35/100
Research direction
Start with src/symbolize/gimli.rs around the linked open and mmap logic, then read the linked internals forum discussion for context. Define the hook's scope and API for controlling external debug-symbol retrieval, including sandboxed or remote-symbol deployments; done means the design is agreed and covered by appropriate tests.
Written by the indexing model from the issue text.
Description
I've posted this question in the internals forum, but I'm opening an issue here to help you track it directly.
backtrace-rs may try to load debug symbols from an external file, which is usually very nice, but it causes problems in more complex deployments:
-
It tries to open and mmap the files, which doesn't work when the program is sandboxed. I can make the sandboxed program ask for the right file, but I can't just make
openwork. For example, seccomp can't deny/allow access based on paths, but can allow pre-opening a file descriptor before denying all other filesystem access. It also means that I need to configure seccomp to be softer and gracefully deny access withEPERMrather than kill the process immediately when it tries to callopen, as otherwise panics would get the process killed before it had a chance to print the backtrace. -
The debug symbols can be large. I have servers that intentionally don't have any local disks, and only run off a RAM-based filesystem, but this means that disk space is precious. Keeping debug symbol files on disk just in case a server panics is wasteful. I have a debug symbol server which allows fetching symbols on demand over HTTP, so I'd prefer to fetch them lazily.
Would it be possible to add some sort of hook to give control over obtaining of the debug symbols?
- Dominant language
- Rust
- Stars
- 628
- Forks
- 291
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from rust-lang/backtrace-rs
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
rust-lang/backtrace-rs#770 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 48/100
rust-lang/backtrace-rs#764 · 2 comments ·
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
rust-lang/backtrace-rs#758 · 8 comments ·
-
Difficulty 3/5 1-2 days Newbie friendliness 64/100
rust-lang/backtrace-rs#754 · 2 comments ·
-
bug
Difficulty 4/5 3-5 days Newbie friendliness 52/100
rust-lang/backtrace-rs#753 · 1 comment ·
All issues in rust-lang/backtrace-rs
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
kwakseongjae/auto-hwp#319 ·
-
area:cli bug filter-quality good first issue priority:medium
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
Difficulty 1/5 Under an hour Newbie friendliness 72/100
bevyengine/bevy#25861 ·
-
comp-datalake
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
ClickHouse/ClickHouse#121222 ·
-
enhancement remote
Difficulty 2/5 1-3 hours Newbie friendliness 68/100