Re: [go-nuts] Mutex profiling question

2024-07-19 Thread Robert Engels
Thank you for the very detailed explanation. What I am struggling with is that even if the routines do a little work and go back to sleep (which is probably the case here) - as I increase the number of external clients I would expect there is always a routine ready to run. What I am observing is th

Re: [go-nuts] this code sometimes hangs

2024-07-19 Thread Laurence Guild
Is there an article that says not to use sync.Cond ? This page seems to have some fans of sync.Cond. I have xtensive software experience but I am new to golang so I am just trying to learn https://github.com/golang/go/issues/21165 On Thursday, July 18, 2024 at 9:33:57 PM UTC-4 王旭东 wrote: > H

[go-nuts] Surprising behaviour in x/time/rate

2024-07-19 Thread 'James Lees' via golang-nuts
Hi there, I've never posted here, so apologies if I'm breaching any etiquette, but the contribution guide suggests posting here before creating an issue so I thought I'd try. I was debugging an issue r

Re: [go-nuts] this code sometimes hangs

2024-07-19 Thread Ian Lance Taylor
On Fri, Jul 19, 2024 at 1:52 PM Laurence Guild wrote: > > > Is there an article that says not to use sync.Cond ? This page seems to have > some fans of sync.Cond. I have xtensive software experience but I am new to > golang so I am just trying to learn > > https://github.com/golang/go/issues/21

Re: [go-nuts] this code sometimes hangs

2024-07-19 Thread Laurence Guild
well, if I am trying to learn golang then I may need examples of how to use sync.Cond, but it's good to know that it may have problems. If you have an interview then people may ask you questions and if you haven't tried to use some feature or haven't played with it then you may feel like you don

Re: [go-nuts] this code sometimes hangs

2024-07-19 Thread Kurtis Rader
On Fri, Jul 19, 2024 at 2:05 PM Laurence Guild wrote: > well, if I am trying to learn golang then I may need examples of how to > use sync.Cond, but it's good to know that it may have problems. If you have > an interview then people may ask you questions and if you haven't tried to > use some fea

Re: [go-nuts] Surprising behaviour in x/time/rate

2024-07-19 Thread Ian Lance Taylor
On Fri, Jul 19, 2024 at 1:52 PM 'James Lees' via golang-nuts wrote: > > Hi there, > I've never posted here, so apologies if I'm breaching any etiquette, but the > contribution guide suggests posting here before creating an issue so I > thought I'd try. > > I was debugging an issue recently and s

[go-nuts] Re: runtime: found bad pointer in Go heap when not using CGO and -race reveals nothing

2024-07-19 Thread Jason E. Aten
> Is there an easy way to see if any of my dependencies are using CGO? You could turn off CGO , with export CGO_ENABLED=0 and then a build should fail if a dependency uses CGO. Or even faster: you could examine the library dependencies of the final executable and see if the C standard library is

[go-nuts] Re: runtime: found bad pointer in Go heap when not using CGO and -race reveals nothing

2024-07-19 Thread Jason E. Aten
There are a number of open bugs that mention the same error that you are seeing https://github.com/golang/go/issues?q=is%3Aissue+is%3Aopen+fatal+error%3A+found+bad+pointer+in+Go+heap+%28incorrect+use+of+unsafe+or+cgo%3F%29 So you could try seeing if the issue reproduces with a different go vers