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

buffer of stream grows beyond limit #188

Open
nazar-pc opened this issue May 14, 2024 · 7 comments
Open

buffer of stream grows beyond limit #188

nazar-pc opened this issue May 14, 2024 · 7 comments

Comments

@nazar-pc
Copy link

After upgrading to newer release of yamux with #176 I get frequent reports from users that they see errors like this in logs:

ERROR yamux::connection: 5dadd7e9/87: buffer of stream grows beyond limit

Yamux in libp2p is configured with 256 max streams and receiving window of 1310816 bytes.

Everything else is set to defaults.

Is this a known issue or maybe configuration is wrong on my end?

@mxinden
Copy link
Member

mxinden commented May 16, 2024

Thanks for reporting @nazar-pc.

Can you reference the concrete rust-yamux version and link to your code using rust-yamux?

@nazar-pc
Copy link
Author

We're using yamux 0.13.2 through libp2p-yamux 0.45.1, both of them are releases on crates.io, here is the configuration of it: https://github.com/subspace/subspace/blob/d159452bf4cd480837770d83c4f0cab3a28da048/crates/subspace-networking/src/constructor.rs#L306-L310

@mxinden
Copy link
Member

mxinden commented May 21, 2024

Do you see the same error without:

        yamux_config.set_receive_window_size(YAMUX_RECEIVING_WINDOW as u32);

@nazar-pc
Copy link
Author

Will give it a try, but since I don't see it myself will have to ask users to test a custom build without it. The default seems unnecessarily large though.

@nazar-pc
Copy link
Author

According to a single user's feedback issue disappeared once I removed it

@mxinden
Copy link
Member

mxinden commented May 27, 2024

Note that without setting the configuration option, you are using the newer yamux version, i.e. v0.13:

https://github.com/libp2p/rust-libp2p/blob/a8888a7978f08ec9b8762207bf166193bf312b94/muxers/yamux/src/lib.rs#L339-L351

With v0.13 the buffer limit is managed at the connection level, no longer at the stream level.

In other words, the fact that users no longer see the log line when removing the configuration set_receive_window_size, hints at the bug being in v0.12 and not in v0.13.

@nazar-pc
Copy link
Author

Hm... but we are not setting options to fall back to 0.12 🤔 Can 0.12 on the other end of the connection cause this?

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

2 participants