I am not sure I understand. I have the issue reproducing only in production on a running instance...
On Sunday, 23 February 2025 at 15:22:27 UTC+2 Jan Mercl wrote: > On Sun, Feb 23, 2025 at 1:12 PM Gavra <gav...@gmail.com> wrote: > > > I have a heap profile that shows that many allocations are generated in > a function that runs in a go routine. Unfortunately, I can't see the > caller(s) to this function, implying I cannot detect the one holding the > reference (and causing the mem leak). > > 1. Can I extract this information from the heap profile? > > 2. If not, can I take a heap profile that will gather this info? > > 3. Why isn't this info available by default? When the go routine is > created, the runtime has all necessary context to indicate the trace call > and forward it, shouldn't it always be the behavior? > > You can try something like (adjust the args as needed) > > $ go test -run nothing -bench . -memprofile mem.out -memprofilerate 1 > -benchtime 4s > $ go tool pprof -lines -web -alloc_space *.test mem.out > > HTH > > -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. To view this discussion visit https://groups.google.com/d/msgid/golang-nuts/9d247660-bf87-4b14-bdb0-541aefe503d2n%40googlegroups.com.