janestreet / janestreet/magic-trace

magic-trace does not stop running on process SIGKILL

Open
#312 0 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
OCaml
Stars
6.3k
Forks
209
PR merge metrics
No merged PRs in 30d

Description

When running magic-trace to trace a process, when SIGKILL is sent to the traced process, the magic-tracer does not stop running, while `perf record` does stop. I expected the magic tracer to stop running or to take a snapshot immediately upon the process finishing. To reproduce the issue:
1. Run `sleep 5000` and get its PID.
2. Run `magic-trace attach -p -o magic-trace.fxt`
3. Run `kill -9 ` to see that `perf record` stops running while `magic-trace` does not.

Running version 6.7.0 of perf userspace tools.

Contributor guide

Open the contributing guide

Research direction

Start at the `magic-trace attach -p -o magic-trace.fxt` entry point and reproduce the issue with `sleep 5000`, then `kill -9` the traced process. Compare the tracer's behavior with `perf record`; done means magic-trace stops or takes a snapshot when the traced process is killed.

Written by the indexing model from the issue text.

Assessment

Tech stack
ocaml
Domain
observability, performance
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.