janestreet / janestreet/magic-trace

Fix broken stacks traces on Go code

Open
#100 3 comments 0 reactions 0 assignees View on GitHub
bug good first issue
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

Open the contributing 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.