janestreet / janestreet/magic-trace
Allow tracing kernel threads
Open
Nobody has claimed this yet.
enhancement
good first issue
- Dominant language
- OCaml
- Stars
- 6.3k
- Forks
- 209
- PR merge metrics
- No merged PRs in 30d
Description
Currently, tracing them fails because we can't open `/proc/$pid/exe`, but we can figure out if we're looking at a kernel thread (its parent's PID should be 2), and use vmlinux instead.
Contributor guide
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
Start by locating the tracing code that opens /proc/$pid/exe and determines the executable for a traced process. Check how a parent PID of 2 identifies a kernel thread, then use vmlinux for that case. Done means kernel threads can be traced without the /proc/$pid/exe failure while normal process tracing continues to work.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ocaml
- Domain
- observability, operating-systems
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 58/100