So, I've configured pprof over http and downloaded the goroutines stack
trace, apparently I did have an unintended endless recursion (1 additional
function call every 5s) and I've fixed the issue.
stackInUse is now normal.
If I understand correctly, now it also makes sense why stackInUse didn't
inc
Because they are tracked separately. See allocSpan() in mheap.go.
> On Mar 27, 2022, at 11:50 AM, Shlomi Amit wrote:
>
> Thank Robert.
> My C code does call back Go code, but no recursion there.
> If stack allocations are part of the heap, why it is not reflected in
> heapAlloc and pprof?
>
>
Thank Robert.
My C code does call back Go code, but no recursion there.
If stack allocations are part of the heap, why it is not reflected in
heapAlloc and pprof?
On Sun, Mar 27, 2022, 18:52 robert engels wrote:
> Neither of those track C allocations - unless the C is calling back into
> Go.
>
>
Neither of those track C allocations - unless the C is calling back into Go.
You can review the low level usage in stack.go
Note that Go stack allocations are for the most part done in the heap, and are
dynamically managed across Go routines.
Are you possibly doing some very deep recursions are
I've already checked process threads using ps command, and threads are not
leaking.
Still, it is more than possible that there are memory leaks within my Cgo
code, or gstreamer as well (Which I'm running with Cgo as well)
But before I'm starting to chase this path, I would like to be sure heapSys
Are you certain your CGo code isn’t creating threads?
> On Mar 26, 2022, at 1:10 PM, Shlomi Amit wrote:
>
> Yes. I already monitoring the runtime stat of number of go routines (Can be
> seen in the screenshot as well) and it's not increasing.
>
> On Sat, Mar 26, 2022, 20:40 robert engels
Yes. I already monitoring the runtime stat of number of go routines (Can be
seen in the screenshot as well) and it's not increasing.
On Sat, Mar 26, 2022, 20:40 robert engels wrote:
> Are you certain the number of Go routines is not increasing - each Go
> routine requires stack. See https://tpas
Are you certain the number of Go routines is not increasing - each Go routine
requires stack. See https://tpaschalis.github.io/goroutines-size/
> On Mar 24, 2022, at 3:18 PM, Shlomi Amit wrote:
>
> Hi.
>
> I’m trying to find a memory leak in my application.
> I’ve added some runtime memory sta