fixing concurrent map read and map write #318
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
fatal error: concurrent map read and map write
goroutine 3213923077 [running]:
runtime.throw({0x81bc1c?, 0xc0011180f0?})
/usr/local/go1.18.2/go/src/runtime/panic.go:992 +0x71 fp=0xc0009d3798 sp=0xc0009d3768 pc=0x437191
runtime.mapaccess2_fast32(0xc0009d3830?, 0x0?, 0x8480f088)
/usr/local/go1.18.2/go/src/runtime/map_fast32.go:62 +0x176 fp=0xc0009d37b8 sp=0xc0009d3798 pc=0x412356
github.com/paypal/hera/lib.(*Coordinator).dispatchRequest(0xc003d57600, 0xc002920e00)
/go1.18.2/src/github.com/paypal/hera/lib/coordinator.go:646 +0x196 fp=0xc0009d3ae8 sp=0xc0009d37b8 pc=0x733ff6
github.com/paypal/hera/lib.(*Coordinator).dispatch(0xc003d57600, 0xc0009d3bc0?)
/go1.18.2/src/github.com/paypal/hera/lib/coordinator.go:324 +0x6b fp=0xc0009d3b20 sp=0xc0009d3ae8 pc=0x7321cb
github.com/paypal/hera/lib.(*Coordinator).Run(0xc003d57600)
/go1.18.2/src/github.com/paypal/hera/lib/coordinator.go:165 +0xb8a fp=0xc0009d3fc8 sp=0xc0009d3b20 pc=0x7304ea
github.com/paypal/hera/lib.HandleConnection.func2()
/go1.18.2/src/github.com/paypal/hera/lib/connectionhandler.go:83 +0x26 fp=0xc0009d3fe0 sp=0xc0009d3fc8 pc=0x72e826
runtime.goexit()
/usr/local/go1.18.2/go/src/runtime/asm_amd64.s:1571 +0x1 fp=0xc0009d3fe8 sp=0xc0009d3fe0 pc=0x469b61
created by github.com/paypal/hera/lib.HandleConnection
/go1.18.2/src/github.com/paypal/hera/lib/connectionhandler.go:83 +0x16a