Re: [go-nuts] heap pprof profile showing only 10Gi out of 50Gi of actually used memory

2024-02-21 Thread Amnon
Worth studying https://tip.golang.org/doc/gc-guide The heap profile will show you the heap memory in use, but the OS process info will tell you the total process size, including memory in use, and memory GC which has been marked as free and reclaimed by the GC, but not relinquished to the OS. Wh

Re: [go-nuts] Probable bug in database/sql

2024-02-21 Thread Ian Lance Taylor
On Wed, Feb 21, 2024 at 4:27 PM Marco De Zio wrote: > > It seems to me that the second flag returned by Rows.nextLocked is wrongly > interpreted by Rows.Next as it sets rs.hitEOF = true when ok is false; also > Rows.nextLocked should set ok to true in some of the cases where right now > returns

[go-nuts] Probable bug in database/sql

2024-02-21 Thread Marco De Zio
It seems to me that the second flag returned by Rows.nextLocked is wrongly interpreted by Rows.Next as it sets rs.hitEOF = true when ok is false; also Rows.nextLocked should set ok to true in some of the cases where right now returns false. Reference in code: https://github.com/golang/go/blob

Re: [go-nuts] heap pprof profile showing only 10Gi out of 50Gi of actually used memory

2024-02-21 Thread Frank Flipper
it's a purely golang app On Tuesday, February 20, 2024 at 9:38:35 PM UTC+3 Kurtis Rader wrote: > Is your app built with CGO? That is, do you link it against any C/C++ code > that might be calling malloc? > > On Tue, Feb 20, 2024 at 5:22 AM Frank Flipper wrote: > >> I have an app that's put insid

Re: [go-nuts] Could we trade all the `ctx context.Context` arguments for one pointer in `g`?

2024-02-21 Thread 'Axel Wagner' via golang-nuts
On Wed, Feb 21, 2024 at 1:36 AM Sam Vilain wrote: > I had a brief look on the Golang issues in Github and could not find any > prior proposals along this line using "context" and "dynamic scope" as > search terms, so I'll submit this as a "new" proposal for now > FWIW some prior discussion on th

Re: [go-nuts] Could we trade all the `ctx context.Context` arguments for one pointer in `g`?

2024-02-21 Thread Robert Engels
That is a good reason as to why putting timeouts and cancellation in the “context” always felt wrong to me. These are per request notions - and creating a new context to specify them seems off. But as I mentioned in the other post, without a concept of security context it doesn’t matter much - just

Re: [go-nuts] Could we trade all the `ctx context.Context` arguments for one pointer in `g`?

2024-02-21 Thread 'Sean Liao' via golang-nuts
https://go.dev/issue/21335 - sean On Wed, Feb 21, 2024, 00:36 Sam Vilain wrote: > Alright, well thanks for your input. > > I do think these questions can be answered; exploring the use cases in a > proposal format should hopefully show that the impact of closures would not > normally be an issu