[go-nuts] Re: Random Number Genaration - Golang -- Error/Bug

2017-04-05 Thread Mukund 8kmiles
Thanks a lot Uli, , @Uli The go routine safe rand.Int63 resolved the problem. Regards Mukund On Wed, Apr 5, 2017 at 12:51 AM, Uli Kunitz wrote: > Hi Mukund, > > Please recognize that the Source object returned by rand.NewSource is not > safe for concurrent use by

[go-nuts] Re: Random Number Genaration - Golang -- Error/Bug

2017-04-04 Thread Uli Kunitz
Hi Mukund, Please recognize that the Source object returned by rand.NewSource is not safe for concurrent use by multiple goroutines. Look at the documentation of NewSource in package math/rand. You are defining r as a global variable and probably call pickENI() from multiple goroutines, which

[go-nuts] Re: Random Number Genaration - Golang -- Error/Bug

2017-04-04 Thread Dave Cheney
I think the sample program you provided is not the one which is causing the panic. For example there is no mention of Kenisis provider in the sample code you provided, but it is part of the stack trace you showed. 1. Can you reproduce the crash with the sample code you provided? 2. Can you

[go-nuts] Re: Random Number Genaration - Golang -- Error/Bug

2017-04-04 Thread peterGo
Mukund, If you suspect a bug in the compiler or the standard library, compile annd run the program using the latest version or, even better, tip so that you include all known bug fixes. I couldn't reproduce your error at Go tip: $ go version go version devel +bebfd4b Tue Apr 4 06:26:11 2017