-
Notifications
You must be signed in to change notification settings - Fork 460
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
Error: Multiplexer is destroyed` on the server when libp2p circuit is doing something while the client crashes just after connecting #171
Comments
Edit: Turns out circuit and not floodsub is causing this: |
@dryajov ^^ |
@mkg20001 It seems to happen when circuit is trying to send the One thing that comes to mind is, are you running on the same machine or are your nodes on different machines, if so, it might be a connection drop. Could you run this with |
@dryajov This was already run with |
Edit: Also note that in the log the error below "this is the actual crash" is server side and not on the client (the client was supposed to crash after receiving the servers response) |
Got you, thanks for clarifying. Does something similar happen when circuit is disabled? I think |
Yes. This time it took 2 runs to crash the server. |
Ah, this is it -
We're mixing callbacks and throws.... |
Here is the line - https://github.com/libp2p/js-libp2p-mplex/blob/bfc6b113e0026618cb72899b39d162eddeb42b3f/src/muxer.js#L54 We're never handling the |
I think this should help - https://github.com/libp2p/js-libp2p-mplex/pull/75/files Note that there are other throws, but they don't seem to be used anywhere. Specifically in -https://github.com/libp2p/js-libp2p-mplex/blob/bfc6b113e0026618cb72899b39d162eddeb42b3f/src/internals/index.js#L106 which gets called by https://github.com/libp2p/js-libp2p-mplex/blob/bfc6b113e0026618cb72899b39d162eddeb42b3f/src/internals/index.js#L136, which doesn't get used anywhere. |
Here is the required change in libp2p-switch libp2p/js-libp2p-switch#245 |
@jacobheun was this handled by your other PRs? |
@diasdavid this was ultimately resolved by libp2p/js-libp2p-mplex#79, which catches the error and returns it via the callback. This should be closable. This fix is available in libp2p-mplex 0.8.0. |
RAD! :D Thanks for double checking :) |
) Bumps [@libp2p/interface-peer-store](https://github.com/libp2p/js-libp2p-interfaces) from 1.2.9 to 2.0.0. - [Release notes](https://github.com/libp2p/js-libp2p-interfaces/releases) - [Commits](https://github.com/libp2p/js-libp2p-interfaces/compare/@libp2p/interface-peer-store-v1.2.9...@libp2p/interface-peer-store-v2.0.0) --- updated-dependencies: - dependency-name: "@libp2p/interface-peer-store" dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: achingbrain <alex@achingbrain.net>
## [7.0.0](libp2p/js-libp2p-bootstrap@v6.0.3...v7.0.0) (2023-04-24) ### ⚠ BREAKING CHANGES * bump @libp2p/interface-peer-store from 1.2.9 to 2.0.0 (libp2p#171) ### Dependencies * bump @libp2p/interface-peer-store from 1.2.9 to 2.0.0 ([libp2p#171](libp2p/js-libp2p-bootstrap#171)) ([9f36bb2](libp2p/js-libp2p-bootstrap@9f36bb2))
Linux - 4.4.0-116-generic #140-Ubuntu SMP Mon Feb 12 21:23:04 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
,node -v: v8.9.4
Type: bug
Severity: high
Description:
Error: Multiplexer is destroyed
on the server when libp2p floodsub is doing something while the client crashes just after connectingSteps to reproduce the error:
Run a server
Run a client
Connect the client to the server and dial a protocol
The server should send some data and the client should throw when it receives it.
The server will now crash with
Error: Multiplexer is destroyed
(Once again discovered this while writing libp2p-nodetrust - btw, here is the server-log.txt)
Note that this error does not occur 100% of the time.
The text was updated successfully, but these errors were encountered: