Re: [go-nuts] Goroutine error when running on load test.

2017-06-27 Thread Nupur Bansal
Thanks..resolved this issue. On Tuesday, June 27, 2017 at 4:13:28 PM UTC+5:30, Dave Cheney wrote: > > That's what globals do. > > On Tuesday, 27 June 2017 20:32:12 UTC+10, Nupur Bansal wrote: >> >> It seems my global variables are being accessed concurrently by >> goroutines and it is causing rac

Re: [go-nuts] Goroutine error when running on load test.

2017-06-27 Thread Dave Cheney
That's what globals do. On Tuesday, 27 June 2017 20:32:12 UTC+10, Nupur Bansal wrote: > > It seems my global variables are being accessed concurrently by goroutines > and it is causing race condition. > > On Tuesday, June 27, 2017 at 3:05:03 PM UTC+5:30, Dave Cheney wrote: >> >> You have at least

Re: [go-nuts] Goroutine error when running on load test.

2017-06-27 Thread Nupur Bansal
It seems my global variables are being accessed concurrently by goroutines and it is causing race condition. On Tuesday, June 27, 2017 at 3:05:03 PM UTC+5:30, Dave Cheney wrote: > > You have at least one data race in your program. > > https://golang.org/doc/go1.6#runtime > https://blog.golang.org

Re: [go-nuts] Goroutine error when running on load test.

2017-06-27 Thread Dave Cheney
You have at least one data race in your program. https://golang.org/doc/go1.6#runtime https://blog.golang.org/race-detector https://golang.org/doc/articles/race_detector.html Looking at the panic message it looks like your findSupplierOrBuyer method is updating a map that is part of a User's Das

Re: [go-nuts] Goroutine error when running on load test.

2017-06-27 Thread Nupur Bansal
Top part says: fatal error: concurrent map writes goroutine 23673 [running]: runtime.throw(0x95fc7f, 0x15) /usr/lib/go/src/runtime/panic.go:566 +0x95 fp=0xc420482708 sp=0xc4204826e8 runtime.mapassign1(0x8cb4c0, 0xc4200e8e10, 0xc420482a88, 0xc420482a68) /usr/lib/go/src/runtime/hashmap.go:

Re: [go-nuts] Goroutine error when running on load test.

2017-06-26 Thread Dave Cheney
Your stacktrace is truncated; the crucial part appears at the top of the output starting with panic: or runtime error: On Tuesday, 27 June 2017 14:31:57 UTC+10, Nupur Bansal wrote: > > When a load test is run on my service, after about 1000-1500 requests, I > get this stack trace. I am unab

Re: [go-nuts] Goroutine error when running on load test.

2017-06-26 Thread Nupur Bansal
When a load test is run on my service, after about 1000-1500 requests, I get this stack trace. I am unable to resolve why it was generated. Yes, the output from the service is passed to an output channel and is read through that channel. I am doing something like this: package main import (

Re: [go-nuts] Goroutine error when running on load test.

2017-06-22 Thread Ian Lance Taylor
On Wed, Jun 21, 2017 at 10:49 PM, wrote: > > I am getting the following error when my services are being load tested. > I am new to goroutines and may be missing something in my implementation. > My service on being hit is running 2 goroutines that call an http request. > After both return , the