go icon indicating copy to clipboard operation
go copied to clipboard

cmd/trace: split traces include all stack traces, which can consume all space

Open prattmic opened this issue 3 years ago • 2 comments

cmd/trace splits events into ~100MB chunks of JSON. When creating chunks, each chunk includes the full stackFrames map for the entire trace, rather than limiting to just the stack frames relevant to the events in the chunk.

In the most extreme case, the stackFrames map is >100MB of JSON, leaving no space for events. In this case, cmd/trace will include only 1 event in each split, resulting in thousands of ~useless splits.

It should be possible to mitigate this by including only relevant stack frames.

prattmic avatar Oct 26 '22 21:10 prattmic

Many thanks for tracking this down so quickly.

adonovan avatar Oct 27 '22 00:10 adonovan

Change https://go.dev/cl/445895 mentions this issue: WIP: only include required frames in splits

gopherbot avatar Oct 27 '22 15:10 gopherbot