Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Golang API: Concurrent read and map write #892

Closed
kaladinlight opened this issue Nov 29, 2023 · 0 comments
Closed

Golang API: Concurrent read and map write #892

kaladinlight opened this issue Nov 29, 2023 · 0 comments

Comments

@kaladinlight
Copy link
Collaborator

Overview

Fatal error occurring in our golang api containers

References and additional details

fatal error: concurrent map read and map write

goroutine 1573284 [running]:
github.com/shapeshift/unchained/pkg/websocket.(*Registry).Subscribe(0xc0006fc0e0, {0xc001413140?, 0xeaada2d638841198?}, {0xc001a0e690, 0xd}, {0xc00012fbe0, 0x1, 0xc001216778?}, 0xc002594840)
	/app/pkg/websocket/registry.go:52 +0x277
github.com/shapeshift/unchained/pkg/websocket.(*Connection).read(0xc0011a1bc0)
	/app/pkg/websocket/websocket.go:177 +0x2ab
created by github.com/shapeshift/unchained/pkg/websocket.(*Connection).Start in goroutine 1573281
	/app/pkg/websocket/websocket.go:123 +0x2c5

goroutine 1 [select, 1528 minutes]:
main.main()
	/app/cmd/thorchain/main.go:84 +0x825

goroutine 38 [syscall, 1528 minutes]:
os/signal.signal_recv()
	/usr/local/go/src/runtime/sigqueue.go:152 +0x29
os/signal.loop()
	/usr/local/go/src/os/signal/signal_unix.go:23 +0x13
created by os/signal.Notify.func1.1 in goroutine 1
	/usr/local/go/src/os/signal/signal.go:151 +0x1f

goroutine 67 [chan receive]:
github.com/rcrowley/go-metrics.(*meterArbiter).tick(0x25f8d00)
	/go/pkg/mod/github.com/rcrowley/[email protected]/meter.go:239 +0x25
created by github.com/rcrowley/go-metrics.NewMeter in goroutine 1
	/go/pkg/mod/github.com/rcrowley/[email protected]/meter.go:46 +0xc5

goroutine 705 [IO wait]:
internal/poll.runtime_pollWait(0x7f884c8ea8e0, 0x72)
	/usr/local/go/src/runtime/netpoll.go:343 +0x85
internal/poll.(*pollDesc).wait(0xc000f96080?, 0xc001a87000?, 0x0)
	/usr/local/go/src/internal/poll/fd_poll_runtime.go:84 +0x27
internal/poll.(*pollDesc).waitRead(...)
	/usr/local/go/src/internal/poll/fd_poll_runtime.go:89
internal/poll.(*FD).Read(0xc000f96080, {0xc001a87000, 0x1000, 0x1000})
	/usr/local/go/src/internal/poll/fd_unix.go:164 +0x27a
net.(*netFD).Read(0xc000f96080, {0xc001a87000?, 0x4dfd85?, 0x7f884c8ea9d0?})
	/usr/local/go/src/net/fd_posix.go:55 +0x25
net.(*conn).Read(0xc00007e128, {0xc001a87000?, 0x0?, 0xc00147c248?})
	/usr/local/go/src/net/net.go:179 +0x45
net/http.(*connReader).Read(0xc00147c240, {0xc001a87000, 0x1000, 0x1000})
	/usr/local/go/src/net/http/server.go:791 +0x14b
bufio.(*Reader).fill(0xc0010321e0)
	/usr/local/go/src/bufio/bufio.go:113 +0x103
bufio.(*Reader).Peek(0xc0010321e0, 0x4)
	/usr/local/go/src/bufio/bufio.go:151 +0x53
net/http.(*conn).serve(0xc00129e870, {0x1a80870, 0xc000544ba0})
	/usr/local/go/src/net/http/server.go:2044 +0x75c
created by net/http.(*Server).Serve in goroutine 69
	/usr/local/go/src/net/http/server.go:3086 +0x5cb

goroutine 54 [select]:
github.com/shapeshift/unchained/pkg/websocket.(*Manager).Start(0xc0002fbb00)
	/app/pkg/websocket/manager.go:24 +0x86
created by github.com/shapeshift/unchained/pkg/cosmos.(*API).Serve in goroutine 69
	/app/pkg/cosmos/api.go:58 +0xef

goroutine 53 [chan receive]:
github.com/shapeshift/unchained/pkg/cosmos.(*WSClient).listen(0xc000445e00)
	/app/pkg/cosmos/websocket.go:109 +0x73
created by github.com/shapeshift/unchained/pkg/cosmos.(*WSClient).Start in goroutine 69
	/app/pkg/cosmos/websocket.go:85 +0x2bd

Acceptance Criteria

  • Fatal error is resolved

Need By Date

No response

Screenshots/Mockups

No response

Estimated effort

No response

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

No branches or pull requests

1 participant