Skip to content
This repository has been archived by the owner on Feb 12, 2024. It is now read-only.

The libp2p node is not started yet #1761

Closed
Elexy opened this issue Dec 7, 2018 · 7 comments
Closed

The libp2p node is not started yet #1761

Elexy opened this issue Dec 7, 2018 · 7 comments
Labels
kind/bug A bug in existing code (including security flaws)

Comments

@Elexy
Copy link

Elexy commented Dec 7, 2018

Version: commit 593334b
Platform: Linux js-ipfs-benchmarking 4.15.0-20-generic #21-Ubuntu SMP Tue Apr 24 06:16:15 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
Subsystem: ibp2p

running any of the tests from https://github.com/ipfs/benchmarks results in the error below, whereas earlier this week the tests ran without this error.

Dec 07 20:13:05 ip-172-31-44-15 node[6955]: AssertionError [ERR_ASSERTION]: The libp2p node is not started yet
Dec 07 20:13:05 ip-172-31-44-15 node[6955]:     at Node.dialProtocol (/home/ubuntu/ipfs/tests/node_modules/libp2p/src/index.js:303:5)
Dec 07 20:13:05 ip-172-31-44-15 node[6955]:     at libp2p.dialProtocol (/home/ubuntu/ipfs/tests/node_modules/ipfs-bitswap/src/network.js:169:21)
Dec 07 20:13:05 ip-172-31-44-15 node[6955]:     at Dialer._switch.dial [as callback] (/home/ubuntu/ipfs/tests/node_modules/libp2p/src/index.js:314:27)
Dec 07 20:13:05 ip-172-31-44-15 node[6955]:     at waterfall (/home/ubuntu/ipfs/tests/node_modules/libp2p-switch/src/dial.js:110:12)
Dec 07 20:13:05 ip-172-31-44-15 node[6955]:     at /home/ubuntu/ipfs/tests/node_modules/async/internal/once.js:12:16
Dec 07 20:13:05 ip-172-31-44-15 node[6955]:     at next (/home/ubuntu/ipfs/tests/node_modules/async/waterfall.js:21:29)
Dec 07 20:13:05 ip-172-31-44-15 node[6955]:     at /home/ubuntu/ipfs/tests/node_modules/async/internal/onlyOnce.js:12:16
Dec 07 20:13:05 ip-172-31-44-15 node[6955]:     at waterfall (/home/ubuntu/ipfs/tests/node_modules/libp2p-switch/src/dial.js:160:7)
Dec 07 20:13:05 ip-172-31-44-15 node[6955]:     at /home/ubuntu/ipfs/tests/node_modules/async/internal/once.js:12:16
Dec 07 20:13:05 ip-172-31-44-15 node[6955]:     at next (/home/ubuntu/ipfs/tests/node_modules/async/waterfall.js:21:29)

Type: bug

Critical - System crash, application panic.

@daviddias
Copy link
Member

@Elexy mind doing a npm ls libp2p so that we know which libp2p version is being used? //cc @vasco-santos @jacobheun

@daviddias daviddias added kind/bug A bug in existing code (including security flaws) status/ready Ready to be worked labels Dec 9, 2018
@jacobheun
Copy link
Contributor

I pulled down benchmark and wasn't able to reproduce the issue. I ran the local-node tests. I did have to change peer.files.add to peer.add due to the latest js-ipfs API changes. I ran the tests against js-ipfs#master and js-ipfs#593334b.

@alanshaw
Copy link
Member

FWIW I have seen this a few times in CI recently. I think there is a bug here somewhere.

@jacobheun
Copy link
Contributor

@alanshaw if you could point me to a CI build with it when you have one I can take a look at that; seeing what's going on around the failure would be helpful. We should probably look at changing that behavior in libp2p regardless. More immediately we could just return an error if the node isn't started, rather than throwing an assertion.

Longer term, it might be worth looking at having a queue for dials that are attempted offline that can then be initiated once startup has been completed.

@jacobheun
Copy link
Contributor

Okay, that looks like there are some dials trying to happen from bitswap after libp2p is or has shut down. I'll look into switching the assert over to a returned error instead and make sure we don't hit any side effects from that change.

@alanshaw
Copy link
Member

@Elexy this should now be fixed in master (thanks to libp2p/js-libp2p#297) - please open a new issue if you notice this error happening again.

@ghost ghost removed the status/ready Ready to be worked label Dec 17, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
kind/bug A bug in existing code (including security flaws)
Projects
None yet
Development

No branches or pull requests

4 participants