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

Websocket panic #21403

Closed
holiman opened this issue Aug 3, 2020 · 2 comments
Closed

Websocket panic #21403

holiman opened this issue Aug 3, 2020 · 2 comments
Assignees

Comments

@holiman
Copy link
Contributor

holiman commented Aug 3, 2020

geth version Geth/v1.9.18-stable-f5382591/linux-amd64/go1.14.6

Sometimes seen on the remix node:

 Aug 01 15:58:49 remix-ropsten-001 geth INFO [08-01|13:58:49.098] Imported new chain segment blocks=1 txs=7 mgas=0.148 elapsed=7.008ms mgasps=21.142 number=8411849 hash="b9d108…ac6afc" dirty=0.00B
Aug 01 15:58:54 remix-ropsten-001 geth WARN [08-01|13:58:54.890] Full stats report failed err="tls: use of closed connection"
Aug 01 15:58:54 remix-ropsten-001 geth panic: concurrent write to websocket connection
Aug 01 15:58:54 remix-ropsten-001 geth goroutine 188 [running]:
Aug 01 15:58:54 remix-ropsten-001 geth github.com/gorilla/websocket.(*messageWriter).flushFrame(0xc035940e10, 0x1, 0x0, 0x0, 0x0, 0xc022891000, 0x7fc9457d7400)
Aug 01 15:58:54 remix-ropsten-001 geth /go/pkg/mod/github.com/gorilla/websocket@v1.4.1-0.20190629185528-ae1634f6a989/conn.go:597 +0x5e9
Aug 01 15:58:54 remix-ropsten-001 geth github.com/gorilla/websocket.(*messageWriter).Close(0xc035940e10, 0x1045c60, 0xc041656720)
Aug 01 15:58:54 remix-ropsten-001 geth /go/pkg/mod/github.com/gorilla/websocket@v1.4.1-0.20190629185528-ae1634f6a989/conn.go:711 +0x62
Aug 01 15:58:54 remix-ropsten-001 geth github.com/gorilla/websocket.(*Conn).WriteJSON(0xc004618840, 0x1045c60, 0xc041656720, 0x4, 0x1225107)
Aug 01 15:58:54 remix-ropsten-001 geth /go/pkg/mod/github.com/gorilla/websocket@v1.4.1-0.20190629185528-ae1634f6a989/json.go:29 +0x12e
Aug 01 15:58:55 remix-ropsten-001 geth github.com/ethereum/go-ethereum/ethstats.(*Service).readLoop(0xc0002d84d0, 0xc004618840)
Aug 01 15:58:55 remix-ropsten-001 geth /go-ethereum/ethstats/ethstats.go:309 +0x1a1
Aug 01 15:58:55 remix-ropsten-001 geth created by github.com/ethereum/go-ethereum/ethstats.(*Service).loop
Aug 01 15:58:55 remix-ropsten-001 geth /go-ethereum/ethstats/ethstats.go:241 +0x865

I'm looking into it

@holiman holiman self-assigned this Aug 3, 2020
@holiman
Copy link
Contributor Author

holiman commented Aug 3, 2020

Gorilla does not support multiple writers: gorilla/websocket#596

I think the readLoop uses the same conn, and it conflicts with loop which also writes.

@holiman
Copy link
Contributor Author

holiman commented Aug 3, 2020

Seems introduced here: 0fef66c

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