Skip to content
This repository has been archived by the owner on Aug 17, 2020. It is now read-only.

Concurrent map updates can cause data races at high concurrency levels #181

Open
jonmarkprice opened this issue Apr 3, 2018 · 1 comment

Comments

@jonmarkprice
Copy link

Hi,

First off thank you for making such an amazing tool! Goad is very easy to use and does an amazing job :).

I did notice a potential problem at high concurrency (-c of 200-500). There appear to be a few places where maps are updated/read concurrently.

Both RegionsData and AddResult update AggData.Statuses and it appears these can both be active at the same time since goad.Start is returning a channel that is being populated by a goroutine. See:

Which also calls infrastructure.Receive via infrastructure.Aggregate (again in a goroutine).

This should be reproducible by building goad with -race. Here are the race conditions I observed at -c 500.

[Expand] Race conditions observed
```
> ==================
> WARNING: DATA RACE
> Read at 0x00c4207b4000 by main goroutine:
>   github.com/goadapp/goad/result.(*LambdaResults).Regions()
>       /home/ec2-user/go/src/github.com/goadapp/goad/result/result.go:39 +0x11a
>   github.com/goadapp/goad/result.(*LambdaResults).RegionsData()
>       /home/ec2-user/go/src/github.com/goadapp/goad/result/result.go:52 +0x8b
>   github.com/goadapp/goad/cli.start()
>       /home/ec2-user/go/src/github.com/goadapp/goad/cli/cli.go:337 +0x3aa
>   github.com/goadapp/goad/cli.Run()
>       /home/ec2-user/go/src/github.com/goadapp/goad/cli/cli.go:89 +0x349
>   main.main()
>       /home/ec2-user/go/src/github.com/goadapp/goad/main.go:6 +0x2f
> 
> Previous write at 0x00c4207b4000 by goroutine 97:
>   github.com/goadapp/goad/result.AddResult()
>       /home/ec2-user/go/src/github.com/goadapp/goad/result/result.go:134 +0x15d
>   github.com/goadapp/goad/infrastructure/aws.(*AwsInfrastructure).Receive()
>       /home/ec2-user/go/src/github.com/goadapp/goad/infrastructure/aws/aws.go:69 +0x163
> 
> Goroutine 97 (running) created at:
>   github.com/goadapp/goad/infrastructure.Aggregate()
>       /home/ec2-user/go/src/github.com/goadapp/goad/infrastructure/infrastructure.go:71 +0x7c
>   github.com/goadapp/goad/goad.Start.func1()
>       /home/ec2-user/go/src/github.com/goadapp/goad/goad/goad.go:28 +0x46
> ==================
> ==================
> WARNING: DATA RACE
> Read at 0x00c4207b4008 by main goroutine:
>   github.com/goadapp/goad/result.(*LambdaResults).Regions()
>       /home/ec2-user/go/src/github.com/goadapp/goad/result/result.go:39 +0x11a
>   github.com/goadapp/goad/result.(*LambdaResults).RegionsData()
>       /home/ec2-user/go/src/github.com/goadapp/goad/result/result.go:52 +0x8b
>   github.com/goadapp/goad/cli.start()
>       /home/ec2-user/go/src/github.com/goadapp/goad/cli/cli.go:337 +0x3aa
>   github.com/goadapp/goad/cli.Run()
>       /home/ec2-user/go/src/github.com/goadapp/goad/cli/cli.go:89 +0x349
>   main.main()
>       /home/ec2-user/go/src/github.com/goadapp/goad/main.go:6 +0x2f
> 
> Previous write at 0x00c4207b4008 by goroutine 97:
>   github.com/goadapp/goad/result.AddResult()
>       /home/ec2-user/go/src/github.com/goadapp/goad/result/result.go:135 +0x1c0
>   github.com/goadapp/goad/infrastructure/aws.(*AwsInfrastructure).Receive()
>       /home/ec2-user/go/src/github.com/goadapp/goad/infrastructure/aws/aws.go:69 +0x163
> 
> Goroutine 97 (running) created at:
>   github.com/goadapp/goad/infrastructure.Aggregate()
>       /home/ec2-user/go/src/github.com/goadapp/goad/infrastructure/infrastructure.go:71 +0x7c
>   github.com/goadapp/goad/goad.Start.func1()
>       /home/ec2-user/go/src/github.com/goadapp/goad/goad/goad.go:28 +0x46
> ==================
> ==================
> WARNING: DATA RACE
> Read at 0x00c4207b4010 by main goroutine:
>   github.com/goadapp/goad/result.(*LambdaResults).Regions()
>       /home/ec2-user/go/src/github.com/goadapp/goad/result/result.go:39 +0x11a
>   github.com/goadapp/goad/result.(*LambdaResults).RegionsData()
>       /home/ec2-user/go/src/github.com/goadapp/goad/result/result.go:52 +0x8b
>   github.com/goadapp/goad/cli.start()
>       /home/ec2-user/go/src/github.com/goadapp/goad/cli/cli.go:337 +0x3aa
>   github.com/goadapp/goad/cli.Run()
>       /home/ec2-user/go/src/github.com/goadapp/goad/cli/cli.go:89 +0x349
>   main.main()
>       /home/ec2-user/go/src/github.com/goadapp/goad/main.go:6 +0x2f
> 
> Previous write at 0x00c4207b4010 by goroutine 97:
>   github.com/goadapp/goad/result.AddResult()
>       /home/ec2-user/go/src/github.com/goadapp/goad/result/result.go:136 +0x224
>   github.com/goadapp/goad/infrastructure/aws.(*AwsInfrastructure).Receive()
>       /home/ec2-user/go/src/github.com/goadapp/goad/infrastructure/aws/aws.go:69 +0x163
> 
> Goroutine 97 (running) created at:
>   github.com/goadapp/goad/infrastructure.Aggregate()
>       /home/ec2-user/go/src/github.com/goadapp/goad/infrastructure/infrastructure.go:71 +0x7c
>   github.com/goadapp/goad/goad.Start.func1()
>       /home/ec2-user/go/src/github.com/goadapp/goad/goad/goad.go:28 +0x46
> ==================
> ==================
> WARNING: DATA RACE
> Read at 0x00c4207b4018 by main goroutine:
>   github.com/goadapp/goad/result.(*LambdaResults).Regions()
>       /home/ec2-user/go/src/github.com/goadapp/goad/result/result.go:39 +0x11a
>   github.com/goadapp/goad/result.(*LambdaResults).RegionsData()
>       /home/ec2-user/go/src/github.com/goadapp/goad/result/result.go:52 +0x8b
>   github.com/goadapp/goad/cli.start()
>       /home/ec2-user/go/src/github.com/goadapp/goad/cli/cli.go:337 +0x3aa
>   github.com/goadapp/goad/cli.Run()
>       /home/ec2-user/go/src/github.com/goadapp/goad/cli/cli.go:89 +0x349
>   main.main()
>       /home/ec2-user/go/src/github.com/goadapp/goad/main.go:6 +0x2f
> 
> Previous write at 0x00c4207b4018 by goroutine 97:
>   github.com/goadapp/goad/result.AddResult()
>       /home/ec2-user/go/src/github.com/goadapp/goad/result/result.go:141 +0x814
>   github.com/goadapp/goad/infrastructure/aws.(*AwsInfrastructure).Receive()
>       /home/ec2-user/go/src/github.com/goadapp/goad/infrastructure/aws/aws.go:69 +0x163
> 
> Goroutine 97 (running) created at:
>   github.com/goadapp/goad/infrastructure.Aggregate()
>       /home/ec2-user/go/src/github.com/goadapp/goad/infrastructure/infrastructure.go:71 +0x7c
>   github.com/goadapp/goad/goad.Start.func1()
>       /home/ec2-user/go/src/github.com/goadapp/goad/goad/goad.go:28 +0x46
> ==================
> ==================
> WARNING: DATA RACE
> Read at 0x00c4207b4020 by main goroutine:
>   github.com/goadapp/goad/result.(*LambdaResults).Regions()
>       /home/ec2-user/go/src/github.com/goadapp/goad/result/result.go:39 +0x11a
>   github.com/goadapp/goad/result.(*LambdaResults).RegionsData()
>       /home/ec2-user/go/src/github.com/goadapp/goad/result/result.go:52 +0x8b
>   github.com/goadapp/goad/cli.start()
>       /home/ec2-user/go/src/github.com/goadapp/goad/cli/cli.go:337 +0x3aa
>   github.com/goadapp/goad/cli.Run()
>       /home/ec2-user/go/src/github.com/goadapp/goad/cli/cli.go:89 +0x349
>   main.main()
>       /home/ec2-user/go/src/github.com/goadapp/goad/main.go:6 +0x2f
> 
> Previous write at 0x00c4207b4020 by goroutine 97:
>   github.com/goadapp/goad/result.AddResult()
>       /home/ec2-user/go/src/github.com/goadapp/goad/result/result.go:137 +0x28f
>   github.com/goadapp/goad/infrastructure/aws.(*AwsInfrastructure).Receive()
>       /home/ec2-user/go/src/github.com/goadapp/goad/infrastructure/aws/aws.go:69 +0x163
> 
> Goroutine 97 (running) created at:
>   github.com/goadapp/goad/infrastructure.Aggregate()
>       /home/ec2-user/go/src/github.com/goadapp/goad/infrastructure/infrastructure.go:71 +0x7c
>   github.com/goadapp/goad/goad.Start.func1()
>       /home/ec2-user/go/src/github.com/goadapp/goad/goad/goad.go:28 +0x46
> ==================
> ==================
> WARNING: DATA RACE
> Read at 0x00c4207b4030 by main goroutine:
>   github.com/goadapp/goad/result.(*LambdaResults).Regions()
>       /home/ec2-user/go/src/github.com/goadapp/goad/result/result.go:39 +0x11a
>   github.com/goadapp/goad/result.(*LambdaResults).RegionsData()
>       /home/ec2-user/go/src/github.com/goadapp/goad/result/result.go:52 +0x8b
>   github.com/goadapp/goad/cli.start()
>       /home/ec2-user/go/src/github.com/goadapp/goad/cli/cli.go:337 +0x3aa
>   github.com/goadapp/goad/cli.Run()
>       /home/ec2-user/go/src/github.com/goadapp/goad/cli/cli.go:89 +0x349
>   main.main()
>       /home/ec2-user/go/src/github.com/goadapp/goad/main.go:6 +0x2f
> 
> Previous write at 0x00c4207b4030 by goroutine 97:
>   github.com/goadapp/goad/result.AddResult()
>       /home/ec2-user/go/src/github.com/goadapp/goad/result/result.go:142 +0x8c5
>   github.com/goadapp/goad/infrastructure/aws.(*AwsInfrastructure).Receive()
>       /home/ec2-user/go/src/github.com/goadapp/goad/infrastructure/aws/aws.go:69 +0x163
> 
> Goroutine 97 (running) created at:
>   github.com/goadapp/goad/infrastructure.Aggregate()
>       /home/ec2-user/go/src/github.com/goadapp/goad/infrastructure/infrastructure.go:71 +0x7c
>   github.com/goadapp/goad/goad.Start.func1()
>       /home/ec2-user/go/src/github.com/goadapp/goad/goad/goad.go:28 +0x46
> ==================
> ==================
> WARNING: DATA RACE
> Read at 0x00c4207b4038 by main goroutine:
>   github.com/goadapp/goad/result.(*LambdaResults).Regions()
>       /home/ec2-user/go/src/github.com/goadapp/goad/result/result.go:39 +0x11a
>   github.com/goadapp/goad/result.(*LambdaResults).RegionsData()
>       /home/ec2-user/go/src/github.com/goadapp/goad/result/result.go:52 +0x8b
>   github.com/goadapp/goad/cli.start()
>       /home/ec2-user/go/src/github.com/goadapp/goad/cli/cli.go:337 +0x3aa
>   github.com/goadapp/goad/cli.Run()
>       /home/ec2-user/go/src/github.com/goadapp/goad/cli/cli.go:89 +0x349
>   main.main()
>       /home/ec2-user/go/src/github.com/goadapp/goad/main.go:6 +0x2f
> 
> Previous write at 0x00c4207b4038 by goroutine 97:
>   github.com/goadapp/goad/result.AddResult()
>       /home/ec2-user/go/src/github.com/goadapp/goad/result/result.go:144 +0x9b8
>   github.com/goadapp/goad/infrastructure/aws.(*AwsInfrastructure).Receive()
>       /home/ec2-user/go/src/github.com/goadapp/goad/infrastructure/aws/aws.go:69 +0x163
> 
> Goroutine 97 (running) created at:
>   github.com/goadapp/goad/infrastructure.Aggregate()
>       /home/ec2-user/go/src/github.com/goadapp/goad/infrastructure/infrastructure.go:71 +0x7c
>   github.com/goadapp/goad/goad.Start.func1()
>       /home/ec2-user/go/src/github.com/goadapp/goad/goad/goad.go:28 +0x46
> ==================
> ==================
> WARNING: DATA RACE
> Read at 0x00c4207b4040 by main goroutine:
>   github.com/goadapp/goad/result.(*LambdaResults).Regions()
>       /home/ec2-user/go/src/github.com/goadapp/goad/result/result.go:39 +0x11a
>   github.com/goadapp/goad/result.(*LambdaResults).RegionsData()
>       /home/ec2-user/go/src/github.com/goadapp/goad/result/result.go:52 +0x8b
>   github.com/goadapp/goad/cli.start()
>       /home/ec2-user/go/src/github.com/goadapp/goad/cli/cli.go:337 +0x3aa
>   github.com/goadapp/goad/cli.Run()
>       /home/ec2-user/go/src/github.com/goadapp/goad/cli/cli.go:89 +0x349
>   main.main()
>       /home/ec2-user/go/src/github.com/goadapp/goad/main.go:6 +0x2f
> 
> Previous write at 0x00c4207b4040 by goroutine 97:
>   github.com/goadapp/goad/result.AddResult()
>       /home/ec2-user/go/src/github.com/goadapp/goad/result/result.go:138 +0x2fe
>   github.com/goadapp/goad/infrastructure/aws.(*AwsInfrastructure).Receive()
>       /home/ec2-user/go/src/github.com/goadapp/goad/infrastructure/aws/aws.go:69 +0x163
> 
> Goroutine 97 (running) created at:
>   github.com/goadapp/goad/infrastructure.Aggregate()
>       /home/ec2-user/go/src/github.com/goadapp/goad/infrastructure/infrastructure.go:71 +0x7c
>   github.com/goadapp/goad/goad.Start.func1()
>       /home/ec2-user/go/src/github.com/goadapp/goad/goad/goad.go:28 +0x46
> ==================
> ==================
> WARNING: DATA RACE
> Read at 0x00c4207b4048 by main goroutine:
>   github.com/goadapp/goad/result.(*LambdaResults).Regions()
>       /home/ec2-user/go/src/github.com/goadapp/goad/result/result.go:39 +0x11a
>   github.com/goadapp/goad/result.(*LambdaResults).RegionsData()
>       /home/ec2-user/go/src/github.com/goadapp/goad/result/result.go:52 +0x8b
>   github.com/goadapp/goad/cli.start()
>       /home/ec2-user/go/src/github.com/goadapp/goad/cli/cli.go:337 +0x3aa
>   github.com/goadapp/goad/cli.Run()
>       /home/ec2-user/go/src/github.com/goadapp/goad/cli/cli.go:89 +0x349
>   main.main()
>       /home/ec2-user/go/src/github.com/goadapp/goad/main.go:6 +0x2f
> 
> Previous write at 0x00c4207b4048 by goroutine 97:
>   github.com/goadapp/goad/result.AddResult()
>       /home/ec2-user/go/src/github.com/goadapp/goad/result/result.go:143 +0x908
>   github.com/goadapp/goad/infrastructure/aws.(*AwsInfrastructure).Receive()
>       /home/ec2-user/go/src/github.com/goadapp/goad/infrastructure/aws/aws.go:69 +0x163
> 
> Goroutine 97 (running) created at:
>   github.com/goadapp/goad/infrastructure.Aggregate()
>       /home/ec2-user/go/src/github.com/goadapp/goad/infrastructure/infrastructure.go:71 +0x7c
>   github.com/goadapp/goad/goad.Start.func1()
>       /home/ec2-user/go/src/github.com/goadapp/goad/goad/goad.go:28 +0x46
> ==================
> ==================
> WARNING: DATA RACE
> Read at 0x00c4207b4050 by main goroutine:
>   github.com/goadapp/goad/result.(*LambdaResults).Regions()
>       /home/ec2-user/go/src/github.com/goadapp/goad/result/result.go:39 +0x11a
>   github.com/goadapp/goad/result.(*LambdaResults).RegionsData()
>       /home/ec2-user/go/src/github.com/goadapp/goad/result/result.go:52 +0x8b
>   github.com/goadapp/goad/cli.start()
>       /home/ec2-user/go/src/github.com/goadapp/goad/cli/cli.go:337 +0x3aa
>   github.com/goadapp/goad/cli.Run()
>       /home/ec2-user/go/src/github.com/goadapp/goad/cli/cli.go:89 +0x349
>   main.main()
>       /home/ec2-user/go/src/github.com/goadapp/goad/main.go:6 +0x2f
> 
> Previous write at 0x00c4207b4050 by goroutine 97:
>   github.com/goadapp/goad/result.AddResult()
>       /home/ec2-user/go/src/github.com/goadapp/goad/result/result.go:152 +0x73f
>   github.com/goadapp/goad/infrastructure/aws.(*AwsInfrastructure).Receive()
>       /home/ec2-user/go/src/github.com/goadapp/goad/infrastructure/aws/aws.go:69 +0x163
> 
> Goroutine 97 (running) created at:
>   github.com/goadapp/goad/infrastructure.Aggregate()
>       /home/ec2-user/go/src/github.com/goadapp/goad/infrastructure/infrastructure.go:71 +0x7c
>   github.com/goadapp/goad/goad.Start.func1()
>       /home/ec2-user/go/src/github.com/goadapp/goad/goad/goad.go:28 +0x46
> ==================
> ==================
> WARNING: DATA RACE
> Read at 0x00c4207b4058 by main goroutine:
>   github.com/goadapp/goad/result.(*LambdaResults).Regions()
>       /home/ec2-user/go/src/github.com/goadapp/goad/result/result.go:39 +0x11a
>   github.com/goadapp/goad/result.(*LambdaResults).RegionsData()
>       /home/ec2-user/go/src/github.com/goadapp/goad/result/result.go:52 +0x8b
>   github.com/goadapp/goad/cli.start()
>       /home/ec2-user/go/src/github.com/goadapp/goad/cli/cli.go:337 +0x3aa
>   github.com/goadapp/goad/cli.Run()
>       /home/ec2-user/go/src/github.com/goadapp/goad/cli/cli.go:89 +0x349
>   main.main()
>       /home/ec2-user/go/src/github.com/goadapp/goad/main.go:6 +0x2f
> 
> Previous write at 0x00c4207b4058 by goroutine 97:
>   github.com/goadapp/goad/result.AddResult()
>       /home/ec2-user/go/src/github.com/goadapp/goad/result/result.go:155 +0x6b2
>   github.com/goadapp/goad/infrastructure/aws.(*AwsInfrastructure).Receive()
>       /home/ec2-user/go/src/github.com/goadapp/goad/infrastructure/aws/aws.go:69 +0x163
> 
> Goroutine 97 (running) created at:
>   github.com/goadapp/goad/infrastructure.Aggregate()
>       /home/ec2-user/go/src/github.com/goadapp/goad/infrastructure/infrastructure.go:71 +0x7c
>   github.com/goadapp/goad/goad.Start.func1()
>       /home/ec2-user/go/src/github.com/goadapp/goad/goad/goad.go:28 +0x46
> ==================
> ==================
> WARNING: DATA RACE
> Read at 0x00c4207b4060 by main goroutine:
>   github.com/goadapp/goad/result.(*LambdaResults).Regions()
>       /home/ec2-user/go/src/github.com/goadapp/goad/result/result.go:39 +0x11a
>   github.com/goadapp/goad/result.(*LambdaResults).RegionsData()
>       /home/ec2-user/go/src/github.com/goadapp/goad/result/result.go:52 +0x8b
>   github.com/goadapp/goad/cli.start()
>       /home/ec2-user/go/src/github.com/goadapp/goad/cli/cli.go:337 +0x3aa
>   github.com/goadapp/goad/cli.Run()
>       /home/ec2-user/go/src/github.com/goadapp/goad/cli/cli.go:89 +0x349
>   main.main()
>       /home/ec2-user/go/src/github.com/goadapp/goad/main.go:6 +0x2f
> 
> Previous write at 0x00c4207b4060 by goroutine 97:
>   github.com/goadapp/goad/result.AddResult()
>       /home/ec2-user/go/src/github.com/goadapp/goad/result/result.go:158 +0x604
>   github.com/goadapp/goad/infrastructure/aws.(*AwsInfrastructure).Receive()
>       /home/ec2-user/go/src/github.com/goadapp/goad/infrastructure/aws/aws.go:69 +0x163
> 
> Goroutine 97 (running) created at:
>   github.com/goadapp/goad/infrastructure.Aggregate()
>       /home/ec2-user/go/src/github.com/goadapp/goad/infrastructure/infrastructure.go:71 +0x7c
>   github.com/goadapp/goad/goad.Start.func1()
>       /home/ec2-user/go/src/github.com/goadapp/goad/goad/goad.go:28 +0x46
> ==================
> ==================
> WARNING: DATA RACE
> Read at 0x00c4207b4080 by main goroutine:
>   github.com/goadapp/goad/result.(*LambdaResults).Regions()
>       /home/ec2-user/go/src/github.com/goadapp/goad/result/result.go:39 +0x11a
>   github.com/goadapp/goad/result.(*LambdaResults).RegionsData()
>       /home/ec2-user/go/src/github.com/goadapp/goad/result/result.go:52 +0x8b
>   github.com/goadapp/goad/cli.start()
>       /home/ec2-user/go/src/github.com/goadapp/goad/cli/cli.go:337 +0x3aa
>   github.com/goadapp/goad/cli.Run()
>       /home/ec2-user/go/src/github.com/goadapp/goad/cli/cli.go:89 +0x349
>   main.main()
>       /home/ec2-user/go/src/github.com/goadapp/goad/main.go:6 +0x2f
> 
> Previous write at 0x00c4207b4080 by goroutine 97:
>   github.com/goadapp/goad/result.AddResult()
>       /home/ec2-user/go/src/github.com/goadapp/goad/result/result.go:157 +0x5bd
>   github.com/goadapp/goad/infrastructure/aws.(*AwsInfrastructure).Receive()
>       /home/ec2-user/go/src/github.com/goadapp/goad/infrastructure/aws/aws.go:69 +0x163
> 
> Goroutine 97 (running) created at:
>   github.com/goadapp/goad/infrastructure.Aggregate()
>       /home/ec2-user/go/src/github.com/goadapp/goad/infrastructure/infrastructure.go:71 +0x7c
>   github.com/goadapp/goad/goad.Start.func1()
>       /home/ec2-user/go/src/github.com/goadapp/goad/goad/goad.go:28 +0x46
> ==================
> ==================
> WARNING: DATA RACE
> Read at 0x00c420300b10 by main goroutine:
>   runtime.mapiterinit()
>       /usr/lib/golang/src/runtime/hashmap.go:709 +0x0
>   github.com/goadapp/goad/result.sumAggData()
>       /home/ec2-user/go/src/github.com/goadapp/goad/result/result.go:106 +0x4c1
>   github.com/goadapp/goad/result.(*LambdaResults).RegionsData()
>       /home/ec2-user/go/src/github.com/goadapp/goad/result/result.go:53 +0x142
>   github.com/goadapp/goad/cli.start()
>       /home/ec2-user/go/src/github.com/goadapp/goad/cli/cli.go:337 +0x3aa
>   github.com/goadapp/goad/cli.Run()
>       /home/ec2-user/go/src/github.com/goadapp/goad/cli/cli.go:89 +0x349
>   main.main()
>       /home/ec2-user/go/src/github.com/goadapp/goad/main.go:6 +0x2f
> 
> Previous write at 0x00c420300b10 by goroutine 97:
>   runtime.mapassign_faststr()
>       /usr/lib/golang/src/runtime/hashmap_fast.go:598 +0x0
>   github.com/goadapp/goad/result.AddResult()
>       /home/ec2-user/go/src/github.com/goadapp/goad/result/result.go:148 +0x4c9
>   github.com/goadapp/goad/infrastructure/aws.(*AwsInfrastructure).Receive()
>       /home/ec2-user/go/src/github.com/goadapp/goad/infrastructure/aws/aws.go:69 +0x163
> 
> Goroutine 97 (running) created at:
>   github.com/goadapp/goad/infrastructure.Aggregate()
>       /home/ec2-user/go/src/github.com/goadapp/goad/infrastructure/infrastructure.go:71 +0x7c
>   github.com/goadapp/goad/goad.Start.func1()
>       /home/ec2-user/go/src/github.com/goadapp/goad/goad/goad.go:28 +0x46
> ==================
> ==================
> WARNING: DATA RACE
> Read at 0x00c420872ff8 by main goroutine:
>   github.com/goadapp/goad/result.sumAggData()
>       /home/ec2-user/go/src/github.com/goadapp/goad/result/result.go:107 +0x1af
>   github.com/goadapp/goad/result.(*LambdaResults).RegionsData()
>       /home/ec2-user/go/src/github.com/goadapp/goad/result/result.go:53 +0x142
>   github.com/goadapp/goad/cli.start()
>       /home/ec2-user/go/src/github.com/goadapp/goad/cli/cli.go:337 +0x3aa
>   github.com/goadapp/goad/cli.Run()
>       /home/ec2-user/go/src/github.com/goadapp/goad/cli/cli.go:89 +0x349
>   main.main()
>       /home/ec2-user/go/src/github.com/goadapp/goad/main.go:6 +0x2f
> 
> Previous write at 0x00c420872ff8 by goroutine 97:
>   github.com/goadapp/goad/result.AddResult()
>       /home/ec2-user/go/src/github.com/goadapp/goad/result/result.go:148 +0x4e2
>   github.com/goadapp/goad/infrastructure/aws.(*AwsInfrastructure).Receive()
>       /home/ec2-user/go/src/github.com/goadapp/goad/infrastructure/aws/aws.go:69 +0x163
> 
> Goroutine 97 (running) created at:
>   github.com/goadapp/goad/infrastructure.Aggregate()
>       /home/ec2-user/go/src/github.com/goadapp/goad/infrastructure/infrastructure.go:71 +0x7c
>   github.com/goadapp/goad/goad.Start.func1()
>       /home/ec2-user/go/src/github.com/goadapp/goad/goad/goad.go:28 +0x46
> ==================
> ==================
> WARNING: DATA RACE
> Write at 0x00c4207b4770 by goroutine 97:
>   github.com/goadapp/goad/result.AddResult()
>       /home/ec2-user/go/src/github.com/goadapp/goad/result/result.go:134 +0x15d
>   github.com/goadapp/goad/infrastructure/aws.(*AwsInfrastructure).Receive()
>       /home/ec2-user/go/src/github.com/goadapp/goad/infrastructure/aws/aws.go:69 +0x163
> 
> Previous read at 0x00c4207b4770 by main goroutine:
>   [failed to restore the stack]
> 
> Goroutine 97 (running) created at:
>   github.com/goadapp/goad/infrastructure.Aggregate()
>       /home/ec2-user/go/src/github.com/goadapp/goad/infrastructure/infrastructure.go:71 +0x7c
>   github.com/goadapp/goad/goad.Start.func1()
>       /home/ec2-user/go/src/github.com/goadapp/goad/goad/goad.go:28 +0x46
> ==================
> ==================
> WARNING: DATA RACE
> Write at 0x00c4207b4778 by goroutine 97:
>   github.com/goadapp/goad/result.AddResult()
>       /home/ec2-user/go/src/github.com/goadapp/goad/result/result.go:135 +0x1c0
>   github.com/goadapp/goad/infrastructure/aws.(*AwsInfrastructure).Receive()
>       /home/ec2-user/go/src/github.com/goadapp/goad/infrastructure/aws/aws.go:69 +0x163
> 
> Previous read at 0x00c4207b4778 by main goroutine:
>   [failed to restore the stack]
> 
> Goroutine 97 (running) created at:
>   github.com/goadapp/goad/infrastructure.Aggregate()
>       /home/ec2-user/go/src/github.com/goadapp/goad/infrastructure/infrastructure.go:71 +0x7c
>   github.com/goadapp/goad/goad.Start.func1()
>       /home/ec2-user/go/src/github.com/goadapp/goad/goad/goad.go:28 +0x46
> ==================
> ==================
> WARNING: DATA RACE
> Write at 0x00c4207b4780 by goroutine 97:
>   github.com/goadapp/goad/result.AddResult()
>       /home/ec2-user/go/src/github.com/goadapp/goad/result/result.go:136 +0x224
>   github.com/goadapp/goad/infrastructure/aws.(*AwsInfrastructure).Receive()
>       /home/ec2-user/go/src/github.com/goadapp/goad/infrastructure/aws/aws.go:69 +0x163
> 
> Previous read at 0x00c4207b4780 by main goroutine:
>   [failed to restore the stack]
> 
> Goroutine 97 (running) created at:
>   github.com/goadapp/goad/infrastructure.Aggregate()
>       /home/ec2-user/go/src/github.com/goadapp/goad/infrastructure/infrastructure.go:71 +0x7c
>   github.com/goadapp/goad/goad.Start.func1()
>       /home/ec2-user/go/src/github.com/goadapp/goad/goad/goad.go:28 +0x46
> ==================
> ==================
> WARNING: DATA RACE
> Write at 0x00c4207b4790 by goroutine 97:
>   github.com/goadapp/goad/result.AddResult()
>       /home/ec2-user/go/src/github.com/goadapp/goad/result/result.go:137 +0x28f
>   github.com/goadapp/goad/infrastructure/aws.(*AwsInfrastructure).Receive()
>       /home/ec2-user/go/src/github.com/goadapp/goad/infrastructure/aws/aws.go:69 +0x163
> 
> Previous read at 0x00c4207b4790 by main goroutine:
>   [failed to restore the stack]
> 
> Goroutine 97 (running) created at:
>   github.com/goadapp/goad/infrastructure.Aggregate()
>       /home/ec2-user/go/src/github.com/goadapp/goad/infrastructure/infrastructure.go:71 +0x7c
>   github.com/goadapp/goad/goad.Start.func1()
>       /home/ec2-user/go/src/github.com/goadapp/goad/goad/goad.go:28 +0x46
> ==================
> ==================
> WARNING: DATA RACE
> Write at 0x00c4207b47b0 by goroutine 97:
>   github.com/goadapp/goad/result.AddResult()
>       /home/ec2-user/go/src/github.com/goadapp/goad/result/result.go:138 +0x2fe
>   github.com/goadapp/goad/infrastructure/aws.(*AwsInfrastructure).Receive()
>       /home/ec2-user/go/src/github.com/goadapp/goad/infrastructure/aws/aws.go:69 +0x163
> 
> Previous read at 0x00c4207b47b0 by main goroutine:
>   [failed to restore the stack]
> 
> Goroutine 97 (running) created at:
>   github.com/goadapp/goad/infrastructure.Aggregate()
>       /home/ec2-user/go/src/github.com/goadapp/goad/infrastructure/infrastructure.go:71 +0x7c
>   github.com/goadapp/goad/goad.Start.func1()
>       /home/ec2-user/go/src/github.com/goadapp/goad/goad/goad.go:28 +0x46
> ==================
> ==================
> WARNING: DATA RACE
> Write at 0x00c4207b4788 by goroutine 97:
>   github.com/goadapp/goad/result.AddResult()
>       /home/ec2-user/go/src/github.com/goadapp/goad/result/result.go:141 +0x814
>   github.com/goadapp/goad/infrastructure/aws.(*AwsInfrastructure).Receive()
>       /home/ec2-user/go/src/github.com/goadapp/goad/infrastructure/aws/aws.go:69 +0x163
> 
> Previous read at 0x00c4207b4788 by main goroutine:
>   [failed to restore the stack]
> 
> Goroutine 97 (running) created at:
>   github.com/goadapp/goad/infrastructure.Aggregate()
>       /home/ec2-user/go/src/github.com/goadapp/goad/infrastructure/infrastructure.go:71 +0x7c
>   github.com/goadapp/goad/goad.Start.func1()
>       /home/ec2-user/go/src/github.com/goadapp/goad/goad/goad.go:28 +0x46
> ==================
> ==================
> WARNING: DATA RACE
> Write at 0x00c4207b47a0 by goroutine 97:
>   github.com/goadapp/goad/result.AddResult()
>       /home/ec2-user/go/src/github.com/goadapp/goad/result/result.go:142 +0x8c5
>   github.com/goadapp/goad/infrastructure/aws.(*AwsInfrastructure).Receive()
>       /home/ec2-user/go/src/github.com/goadapp/goad/infrastructure/aws/aws.go:69 +0x163
> 
> Previous read at 0x00c4207b47a0 by main goroutine:
>   [failed to restore the stack]
> 
> Goroutine 97 (running) created at:
>   github.com/goadapp/goad/infrastructure.Aggregate()
>       /home/ec2-user/go/src/github.com/goadapp/goad/infrastructure/infrastructure.go:71 +0x7c
>   github.com/goadapp/goad/goad.Start.func1()
>       /home/ec2-user/go/src/github.com/goadapp/goad/goad/goad.go:28 +0x46
> ==================
> ==================
> WARNING: DATA RACE
> Write at 0x00c4207b47b8 by goroutine 97:
>   github.com/goadapp/goad/result.AddResult()
>       /home/ec2-user/go/src/github.com/goadapp/goad/result/result.go:143 +0x908
>   github.com/goadapp/goad/infrastructure/aws.(*AwsInfrastructure).Receive()
>       /home/ec2-user/go/src/github.com/goadapp/goad/infrastructure/aws/aws.go:69 +0x163
> 
> Previous read at 0x00c4207b47b8 by main goroutine:
>   [failed to restore the stack]
> 
> Goroutine 97 (running) created at:
>   github.com/goadapp/goad/infrastructure.Aggregate()
>       /home/ec2-user/go/src/github.com/goadapp/goad/infrastructure/infrastructure.go:71 +0x7c
>   github.com/goadapp/goad/goad.Start.func1()
>       /home/ec2-user/go/src/github.com/goadapp/goad/goad/goad.go:28 +0x46
> ==================
> ==================
> WARNING: DATA RACE
> Write at 0x00c4207b47a8 by goroutine 97:
>   github.com/goadapp/goad/result.AddResult()
>       /home/ec2-user/go/src/github.com/goadapp/goad/result/result.go:144 +0x9b8
>   github.com/goadapp/goad/infrastructure/aws.(*AwsInfrastructure).Receive()
>       /home/ec2-user/go/src/github.com/goadapp/goad/infrastructure/aws/aws.go:69 +0x163
> 
> Previous read at 0x00c4207b47a8 by main goroutine:
>   [failed to restore the stack]
> 
> Goroutine 97 (running) created at:
>   github.com/goadapp/goad/infrastructure.Aggregate()
>       /home/ec2-user/go/src/github.com/goadapp/goad/infrastructure/infrastructure.go:71 +0x7c
>   github.com/goadapp/goad/goad.Start.func1()
>       /home/ec2-user/go/src/github.com/goadapp/goad/goad/goad.go:28 +0x46
> ==================
> ==================
> WARNING: DATA RACE
> Write at 0x00c4207b47c0 by goroutine 97:
>   github.com/goadapp/goad/result.AddResult()
>       /home/ec2-user/go/src/github.com/goadapp/goad/result/result.go:152 +0x73f
>   github.com/goadapp/goad/infrastructure/aws.(*AwsInfrastructure).Receive()
>       /home/ec2-user/go/src/github.com/goadapp/goad/infrastructure/aws/aws.go:69 +0x163
> 
> Previous read at 0x00c4207b47c0 by main goroutine:
>   [failed to restore the stack]
> 
> Goroutine 97 (running) created at:
>   github.com/goadapp/goad/infrastructure.Aggregate()
>       /home/ec2-user/go/src/github.com/goadapp/goad/infrastructure/infrastructure.go:71 +0x7c
>   github.com/goadapp/goad/goad.Start.func1()
>       /home/ec2-user/go/src/github.com/goadapp/goad/goad/goad.go:28 +0x46
> ==================
> ==================
> WARNING: DATA RACE
> Write at 0x00c4207b47c8 by goroutine 97:
>   github.com/goadapp/goad/result.AddResult()
>       /home/ec2-user/go/src/github.com/goadapp/goad/result/result.go:155 +0x6b2
>   github.com/goadapp/goad/infrastructure/aws.(*AwsInfrastructure).Receive()
>       /home/ec2-user/go/src/github.com/goadapp/goad/infrastructure/aws/aws.go:69 +0x163
> 
> Previous read at 0x00c4207b47c8 by main goroutine:
>   [failed to restore the stack]
> 
> Goroutine 97 (running) created at:
>   github.com/goadapp/goad/infrastructure.Aggregate()
>       /home/ec2-user/go/src/github.com/goadapp/goad/infrastructure/infrastructure.go:71 +0x7c
>   github.com/goadapp/goad/goad.Start.func1()
>       /home/ec2-user/go/src/github.com/goadapp/goad/goad/goad.go:28 +0x46
> ==================
> ==================
> WARNING: DATA RACE
> Write at 0x00c4207b47f0 by goroutine 97:
>   github.com/goadapp/goad/result.AddResult()
>       /home/ec2-user/go/src/github.com/goadapp/goad/result/result.go:157 +0x5bd
>   github.com/goadapp/goad/infrastructure/aws.(*AwsInfrastructure).Receive()
>       /home/ec2-user/go/src/github.com/goadapp/goad/infrastructure/aws/aws.go:69 +0x163
> 
> Previous read at 0x00c4207b47f0 by main goroutine:
>   [failed to restore the stack]
> 
> Goroutine 97 (running) created at:
>   github.com/goadapp/goad/infrastructure.Aggregate()
>       /home/ec2-user/go/src/github.com/goadapp/goad/infrastructure/infrastructure.go:71 +0x7c
>   github.com/goadapp/goad/goad.Start.func1()
>       /home/ec2-user/go/src/github.com/goadapp/goad/goad/goad.go:28 +0x46
> ==================
> ==================
> WARNING: DATA RACE
> Write at 0x00c4207b47d0 by goroutine 97:
>   github.com/goadapp/goad/result.AddResult()
>       /home/ec2-user/go/src/github.com/goadapp/goad/result/result.go:158 +0x604
>   github.com/goadapp/goad/infrastructure/aws.(*AwsInfrastructure).Receive()
>       /home/ec2-user/go/src/github.com/goadapp/goad/infrastructure/aws/aws.go:69 +0x163
> 
> Previous read at 0x00c4207b47d0 by main goroutine:
>   [failed to restore the stack]
> 
> Goroutine 97 (running) created at:
>   github.com/goadapp/goad/infrastructure.Aggregate()
>       /home/ec2-user/go/src/github.com/goadapp/goad/infrastructure/infrastructure.go:71 +0x7c
>   github.com/goadapp/goad/goad.Start.func1()
>       /home/ec2-user/go/src/github.com/goadapp/goad/goad/goad.go:28 +0x46
> ==================
> Found 28 data race(s)
```
@wazoo
Copy link

wazoo commented May 24, 2018

I have run into this as well, it seems to be related to the total number of requests as well. I was running 10k requests with -c 1000 and it was okay but 100k requests with -c 1000 it crashes at about 50% of the way through.

This is an example of what I was executing:
goad -c 1000 -s 10 -n 100000 --region=us-east-1 --region=us-west-2 <url>

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants