rust-lang / rust-lang/rustc-demangle
Demangling symbols from bcc/bpf does not work
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 319
- Forks
- 69
- PR merge metrics
- No merged PRs in 30d
Description
The ustack function from bpftrace/bcc produces symbols that for some reason cannot be parsed by rustc-demangle, such as:
_ZN100_$LT$tokio_tower..multiplex..server..Server$LT$T$C$S$GT$$u20$as$u20$core..future..future..Future$GT$4poll17hedb49c127bbef1efE+89
To test this yourself, run a Rust program and then bpftrace with something like:
sudo env BPFTRACE_NO_CPP_DEMANGLE=1 bpftrace -e 'profile:hz:1 /pid == '$(pgrep target/debug)'/ { printf("%ld %d %s\n", elapsed, tid, ustack) }'
And look at the resulting symbols. I suspect this is related to the .. characters, but as far as I can tell bcc just reads symbol names from /proc/kallsyms.
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.
Research direction
Reproduce the issue with the provided Rust program and bpftrace command, using the example symbol containing .. characters. Start by tracing how rustc-demangle parses that symbol, then confirm that the reported bpftrace/bcc output can be demangled successfully. Done means the supplied symbol format is accepted without breaking existing demangling behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- devtools
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100