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

Panic in the Ping function #3

Open
pdyraga opened this issue Jun 20, 2023 · 0 comments
Open

Panic in the Ping function #3

pdyraga opened this issue Jun 20, 2023 · 0 comments

Comments

@pdyraga
Copy link
Member

pdyraga commented Jun 20, 2023

It looks like there is a concurrency issue in the Ping function or somewhere on the lower level.

This has happened only one time for me so far, when I was listing deposits for a sweep.

panic: concurrent write to websocket connection

goroutine 31 [running]:
github.com/gorilla/websocket.(*messageWriter).flushFrame(0x14000e01620, 0x1, {0x0?, 0x0?, 0x0?})
	/Users/piotr/go/pkg/mod/github.com/gorilla/[email protected]/conn.go:617 +0x470
github.com/gorilla/websocket.(*messageWriter).Close(0x14000e01620?)
	/Users/piotr/go/pkg/mod/github.com/gorilla/[email protected]/conn.go:731 +0x4c
github.com/gorilla/websocket.(*Conn).WriteMessage(0x1072302c0?, 0x0?, {0x14000dc52f0, 0x2e, 0x30})
	/Users/piotr/go/pkg/mod/github.com/gorilla/[email protected]/conn.go:780 +0x160
github.com/checksum0/go-electrum/electrum.(*WebSocketTransport).SendMessage(0x1063f3880?, {0x14000dc52f0?, 0x1400020fb00?, 0x14000054778?})
	/Users/piotr/go/pkg/mod/github.com/keep-network/[email protected]/electrum/transport_ws.go:91 +0x124
github.com/checksum0/go-electrum/electrum.(*Client).request(0x14000339ab0, {0x10656f8d0, 0x14012a631a0}, {0x105bec784, 0xb}, {0x107263e78, 0x0, 0x0}, {0x0, 0x0})
	/Users/piotr/go/pkg/mod/github.com/keep-network/[email protected]/electrum/network.go:296 +0x180
github.com/checksum0/go-electrum/electrum.(*Client).Ping(...)
	/Users/piotr/go/pkg/mod/github.com/keep-network/[email protected]/electrum/server.go:9
github.com/keep-network/keep-core/pkg/bitcoin/electrum.(*Connection).keepAlive.func1({0x10656f8d0?, 0x14012a631a0?}, 0x1400006d5c8?)
	/Users/piotr/git/keep-network/keep-core/pkg/bitcoin/electrum/electrum.go:709 +0x60
github.com/keep-network/keep-core/pkg/bitcoin/electrum.requestWithRetry[...].func1()
	/Users/piotr/git/keep-network/keep-core/pkg/bitcoin/electrum/electrum.go:775 +0xf4
github.com/keep-network/keep-common/pkg/wrappers.DoWithRetry({0x10656f898?, 0x140000460d8?}, 0x3b9aca00, 0x14012ee0780?, 0x14001867a40?, 0x14000200ed0)
	/Users/piotr/go/pkg/mod/github.com/keep-network/[email protected]/pkg/wrappers/wrappers.go:34 +0xc8
github.com/keep-network/keep-common/pkg/wrappers.DoWithDefaultRetry(...)
	/Users/piotr/go/pkg/mod/github.com/keep-network/[email protected]/pkg/wrappers/wrappers.go:76
github.com/keep-network/keep-core/pkg/bitcoin/electrum.requestWithRetry[...](0x1400006d760?, 0x1?)
	/Users/piotr/git/keep-network/keep-core/pkg/bitcoin/electrum/electrum.go:763 +0x80
github.com/keep-network/keep-core/pkg/bitcoin/electrum.(*Connection).keepAlive(0x1400181e360)
	/Users/piotr/git/keep-network/keep-core/pkg/bitcoin/electrum/electrum.go:706 +0xa4
created by github.com/keep-network/keep-core/pkg/bitcoin/electrum.Connect
	/Users/piotr/git/keep-network/keep-core/pkg/bitcoin/electrum/electrum.go:74 +0x264
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