janestreet / janestreet/magic-trace
Fix broken stacks traces on Go code
- Dominant language
- OCaml
- Stars
- 6.3k
- Forks
- 209
- PR merge metrics
- No merged PRs in 30d
Description
In [this simple Go example](https://github.com/janestreet/magic-trace/pull/98), it's clear that Go's stack switch causes stacktraces to wander off the right hand side of the screen. I think this is easy to fix: when trace_writer.ml, sees the symbol runtime.newstack, it should mark all currently-open stack frames as closed.
I'm not sure if there is any more custom control flow in Go code. e.g. do Go stacks shrink? Please file more bugs if you notice any.
Contributor guide
Research direction
Start with trace_writer.ml and reproduce the simple Go example linked in the issue. Inspect how runtime.newstack is handled and how currently-open stack frames are tracked, then verify that the trace no longer wanders off the screen. Check whether the example exposes other Go stack-control cases, such as stack shrinking, before considering the issue complete.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go, ocaml
- Domain
- observability-sre
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100