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

[BUG]: Incorrect seed causes panic #280

Open
1 task done
mvandeberg opened this issue Feb 10, 2023 · 1 comment
Open
1 task done

[BUG]: Incorrect seed causes panic #280

mvandeberg opened this issue Feb 10, 2023 · 1 comment
Labels
bug Something isn't working task

Comments

@mvandeberg
Copy link
Member

mvandeberg commented Feb 10, 2023

Is there an existing issue for this?

  • I have searched the existing issues

Current behavior

When a seed peer address is malformed, instead of logging to error and continuing or exiting, p2p currently panics.

koinos-p2p-1  | 2023-02-10 18:28:24.927421 (p2p.Koinos) [p2p/connection_manager.go:109] <warn>: Error parsing peer address: failed to parse multiaddr "/dns4/seed-west.burnkoin.com/tcp/8888/p2p/QmcwsnczsFRxgkyYtTWK4dq6tbE5tpE48jtHp7nKAvy22V\\": invalid value "QmcwsnczsFRxgkyYtTWK4dq6tbE5tpE48jtHp7nKAvy22V\\" for protocol p2p: failed to parse p2p addr: QmcwsnczsFRxgkyYtTWK4dq6tbE5tpE48jtHp7nKAvy22V\ input isn't valid multihash
koinos-p2p-1  | 2023-02-10 18:28:24.927453 (p2p.Koinos) [p2p/connection_manager.go:114] <warn>: Error parsing peer address: invalid p2p multiaddr
koinos-p2p-1  | panic: runtime error: invalid memory address or nil pointer dereference
koinos-p2p-1  | [signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0xa9e72a]
koinos-p2p-1  | 
koinos-p2p-1  | goroutine 1 [running]:
koinos-p2p-1  | github.com/koinos/koinos-p2p/internal/p2p.NewConnectionManager({0x15572e0?, 0xc000305cc8}, {0x1555520, 0xc0000103f0}, 0xc0001e81b8, {0x1541f60, 0xc00029fce0}, {0xc000a9e100, 0x4, 0x4}, ...)
koinos-p2p-1  |         /koinos-p2p/internal/p2p/connection_manager.go:117 +0x4aa
koinos-p2p-1  | github.com/koinos/koinos-p2p/internal/node.NewKoinosP2PNode({0x154d070?, 0xc00017c140}, {0xc000a90030, 0x15}, {0x1555520?, 0xc0000103f0}, 0xc00013c0a0, {0x0, 0x0}, 0xc0001e8180)
koinos-p2p-1  |         /koinos-p2p/internal/node/node.go:186 +0xf4a
koinos-p2p-1  | main.main()
koinos-p2p-1  |         /koinos-p2p/cmd/koinos-p2p/main.go:201 +0x1c2d

Expected behavior

The microservice should log the error and continue, if possible.

Steps to reproduce

  • Add an incorrect character to the end of a seed peer ID, such as ''.
  • Run p2p microservice

Environment

- OS: Ubuntu 22.04 Docker

Anything else?

No response

@mvandeberg mvandeberg added the bug Something isn't working label Feb 10, 2023
@koinos-ci
Copy link

This issue is stale because it has been open for 30 days with no activity.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working task
Projects
None yet
Development

No branches or pull requests

2 participants