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

Communication problems (GSO/IO) between lite-rpc and quic-forward-proxy on IPv6 private network #199

Closed
riordanp opened this issue Sep 15, 2023 · 3 comments

Comments

@riordanp
Copy link
Contributor

When deploying lite-rpc and quic-forward-proxy to Fly on separate VMs, we noticed submitted TXs timing out.
After some debugging, it seems this call to write_all on the SendStream can produce this error:

sendmsg error: Os { code: 22, kind: InvalidInput, message: "Invalid argument" }, Transmit: { destination: [fdaa:0:a53d:a7b:17b:3cd9:fe0f:2]:11111, src_ip: None, enc: Some(Ect0), len: 1291, segment_size: Some(1200) }

After which the future never returns, blocking any further messages from the broadcast_receiver being processed. After restarting lite-rpc maybe one or two batches are successfully forwarded before this error occurs and no more batches are forwarded.

Adding a timeout to this future allows sending to continue, but produces the following error logs in quic-forward-proxy:

ERROR handle_client_connection: solana_lite_rpc_quic_forward_proxy::inbound::proxy_listener: failed to accept stream: timed out
thread 'tokio-runtime-worker' panicked at 'called `Result::unwrap()` on an `Err` value: Read(ConnectionLost(TimedOut))', quic-forward-proxy/src/inbound/proxy_listener.rs:106:85
ERROR solana_lite_rpc_quic_forward_proxy::inbound::proxy_listener: failed handling connection from client: error accepting stream - skip

Tests on IPv4 and local IPv6 outside of the Fly network have been successful, pointing to an incompatibility with the Fly IPv6 private network, or kernel network parameters on the VMs.

@grooviegermanikus
Copy link
Collaborator

grooviegermanikus commented Sep 18, 2023

sendmsg is implemented in quinn-udp to allow for large package sizes

we suspect that the issue is related to Generic Segmentation Offload (GSO) available in recent OS's

riordanp pushed a commit that referenced this issue Sep 18, 2023
…ects (#200)

should fix #199

Co-authored-by: GroovieGermanikus <groovie@mango.markets>
@grooviegermanikus grooviegermanikus changed the title Communication problems between lite-rpc and quic-forward-proxy on IPv6 private network Communication problems (GSO/IO) between lite-rpc and quic-forward-proxy on IPv6 private network Sep 22, 2023
@grooviegermanikus
Copy link
Collaborator

grooviegermanikus commented Sep 22, 2023

Quinn added opt-out to to 0.9 quinn-rs/quinn#1671

will be part of quinn-proto 0.9.6:
cargo update -p quinn-proto@0.9.5
or
cargo update -p quinn-proto

@grooviegermanikus
Copy link
Collaborator

opened PR to allow to completely disable GSO on Quinn-Level

riordanp added a commit that referenced this issue Dec 1, 2023
* Deploy QUIC Proxy (#210)

* Load listen addr from env

* Add deployment config for quic-forward-proxy

* ipv6 support

* Fix rpc_tester

* Read QUIC_PROXY_ADDR from env

* Add traces for debugging

* Add timeout for writing to SendStream

* disable GSO (Generic Segmentation Offload) for all outgoing QUIC-connects

should fix #199

* disable GSO (Generic Segmentation Offload) for all outgoing QUIC-connects (#200)

should fix #199

Co-authored-by: GroovieGermanikus <groovie@mango.markets>

* Add staging config, remove traces

* cargo fmt

* delete fly.toml - was split+renamed - see cd/

* remove misleading line

* comment on quic proxy

* revert some files

* Deploy dev from main, prod from production

---------

Co-authored-by: GroovieGermanikus <groovie@mango.markets>
Co-authored-by: Steve <95291500+grooviegermanikus@users.noreply.github.com>

* Update job names

* Fix launch params

---------

Co-authored-by: GroovieGermanikus <groovie@mango.markets>
Co-authored-by: Steve <95291500+grooviegermanikus@users.noreply.github.com>
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