koinos / koinos-p2p

The p2p microservice orchestrates the distribution of blocks and transactions between peers.
MIT License
6 stars 4 forks source link

[BUG]: panic: send on closed channel #178

Closed mvandeberg closed 3 years ago

mvandeberg commented 3 years ago

Is there an existing issue for this?

Current behavior

My p2p node died with the following error:

28 16:54:02.141762 (p2p.Koinos) [p2p/error_handler.go:68] <info>: Encountered peer error: QmRycTDNDiWSLtBCGYuLeZhKMuhJfCZVDwzasic3dticnb, block application failed: local RPC request timed out ApplyBlock, context deadline exceeded

2021-10-28 16:54:02.717574 (p2p.Koinos) [koinos-mq-golang@v0.0.0-20210424202816-d2bd4d1894d1/client.go:265] <warn>: RPC error: context deadline exceeded

2021-10-28 16:54:09.982130 (p2p.Koinos) [koinos-mq-golang@v0.0.0-20210424202816-d2bd4d1894d1/client.go:266] <warn>: Trying again in 1 seconds

panic: send on closed channel

goroutine 86 [running]:

github.com/koinos/koinos-p2p/internal/p2p.(*ConnectionManager).handleGetLastIrreversible(0xc0002569a0, 0x1099dd0, 0xc0000a2000, 0xc0002e4240)

/koinos-p2p/internal/p2p/connection_manager.go:236 +0x5e

github.com/koinos/koinos-p2p/internal/p2p.(*ConnectionManager).managerLoop(0xc0002569a0, 0x1099dd0, 0xc0000a2000)

/koinos-p2p/internal/p2p/connection_manager.go:288 +0x35a

created by github.com/koinos/koinos-p2p/internal/p2p.(*ConnectionManager).Start.func1

/koinos-p2p/internal/p2p/connection_manager.go:316 +0x16e

Expected behavior

The node should never die due to panic.

Steps to reproduce

Was running the docker image

Environment

- OS: OS X

Anything else?

No response

mvandeberg commented 3 years ago

179 refactored how LIB was managed. This bug may exist on other channels, but the stack trace is no longer useful. Closing as it is now unreproducible.