rust-lang / rust-lang/backtrace-rs

Why do we mmap data that is already mmapped?

Open
#668 5 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

docs gimli OS-linux
Dominant language
Rust
Stars
628
Forks
291
PR merge metrics
No merged PRs in 30d

Description

The basic strategy for backtrace symbolication on Linux:

  • We use a combination of dl_iterate_phdr and opening /proc/self/maps to learn about what memory objects are loaded
  • We obtain a bunch of filenames for these memory objects, their dynamic libraries
  • We then later mmap these filenames into memory.
  • ...WAIT A TICK?!?

...why do we map things into memory that we almost certainly know are already in-memory objects?

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing the Linux symbolication path from dl_iterate_phdr and /proc/self/maps to the later mmap calls. Compare the mapped ranges with the filenames collected there, then establish whether the extra mappings are necessary and document what change, if any, is warranted.

Written by the indexing model from the issue text.

Assessment

Tech stack
linux, rust
Domain
operating-systems, performance
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
32/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.