Skip to content

proposal: runtime: expose a function to enable GODEBUG="tracebackancestors=N" on runtime  #52093

Open
@ysmood

Description

@ysmood

I'm making a lib to detect goroutine leaks, if we don't enable tracebackancestors it will be impossible to detect goroutine leaks in testing when testing.T.isParallel is enabled.

If we can add a function in runtime, such as runtime.TracebackAncestors(n int) then we don't have to add protection code like this:

https://github.com/ysmood/gotrace/blob/03c1fdd54f28e0778ae12534167858777a00ddcd/utils.go#L31-L38

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status

    Incoming

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions