Re: [go-nuts] memory leak, heap size doesn't match process res size

2020-04-04 Thread azhao155
Have you figure the root cause? We experience the same issue On Thursday, February 15, 2018 at 7:21:12 AM UTC-8, Kane Kim wrote: > > I was surprised to see that overhead is so significant, is there any way > to peek into that and see what is taking up space in race detector? I've > tried --inus

Re: [go-nuts] memory leak, heap size doesn't match process res size

2018-02-15 Thread Ian Lance Taylor
On Thu, Feb 15, 2018 at 7:21 AM, Kane Kim wrote: > > I was surprised to see that overhead is so significant, is there any way to > peek into that and see what is taking up space in race detector? I've tried > --inuse_objects in a heap dump, but didn't see anything suspicious there. The race detec

Re: [go-nuts] memory leak, heap size doesn't match process res size

2018-02-15 Thread Kane Kim
I was surprised to see that overhead is so significant, is there any way to peek into that and see what is taking up space in race detector? I've tried --inuse_objects in a heap dump, but didn't see anything suspicious there. On Thursday, February 15, 2018 at 7:16:42 AM UTC-8, Kane Kim wrote: >

Re: [go-nuts] memory leak, heap size doesn't match process res size

2018-02-15 Thread Kane Kim
I think I've got a clue. I've discovered that the process under question was built with -race flag. Apparently race detector structures (tsan) are not visible to runtime and are not reported. On Thursday, February 15, 2018 at 2:14:55 AM UTC-8, Peter Waller wrote: > > On 14 February 2018 at 16:15

Re: [go-nuts] memory leak, heap size doesn't match process res size

2018-02-15 Thread Peter Waller
On 14 February 2018 at 16:15, Kane Kim wrote: > If we don't use CGO all memory should be reported somewhere? > Well, assuming no part of your software calls mmap, or there isn't something else funny going on. Can you capture when this large region is mapped with strace? At what point in the pro

Re: [go-nuts] memory leak, heap size doesn't match process res size

2018-02-14 Thread Kane Kim
I've measured resident size multiple times, with top, /proc/pid/smem, pmap. There is a huge allocated region towards the end of virtual memory: 7fba77bb-7fbc3bf37000 rw-p 00:00 0 Size:7409180 kB Rss: 7408840 kB Pss: 7408840 kB Shared_Clean:

Re: [go-nuts] memory leak, heap size doesn't match process res size

2018-02-14 Thread Peter Waller
First, a sanity check: How are you measuring the resident set? Are you certain the memstats data you presented are from the same run (and after) you hit 10G resident? What you have described doesn't immediately fit in my mental model. Could you be measuring the VM size rather than the resident siz

[go-nuts] memory leak, heap size doesn't match process res size

2018-02-13 Thread Tamás Gulácsi
TotalAlloc - TotalReleased = Inuse TotalAlloc is the total allocated bytes in the lifetime of the process. Every allocation is counted. -- 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

[go-nuts] memory leak, heap size doesn't match process res size

2018-02-13 Thread Kane Kim
Process show up using 11GB of resident memory, it doesn't use cgo, built with go 1.9. Heap debug shows: # runtime.MemStats # Alloc = 535278016 # TotalAlloc = 113090364120 # Sys = 583994616 # Lookups = 221159 # Mallocs = 499797278 # Frees = 492733492 # HeapAlloc = 535278016 # HeapSys = 543293440 #