quinn-rs / quinn

Async-friendly QUIC implementation in Rust
Apache License 2.0
3.76k stars 380 forks source link

backport to 0.9: Allow GSO to be manually disabled #1671

Closed grooviegermanikus closed 1 year ago

grooviegermanikus commented 1 year ago

Hi, we love quinn but we recently had a hard time with GSO and fly.io hosting and quinn 0.9.4!

This errors are piling up in the logs:

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

After some research we concluded that quinn's GSO detection returns a false-positive - at least on fly.io machines! Our reasoning:

  1. The problem went away by disabling GSO with patch a06838.
  2. fly.io support confirmed GSO is not supported on their platform!

Proposed Solution

short term: backport a06838 to allow manual disabling GSO long term: backport a fix for the feature detection

maybe the solution should be ported to 0.10 too

djc commented 1 year ago

Why are you not on 0.10 yet?

Ralith commented 1 year ago

As an alternative workaround, did you try ethtool -K $INTERFACE tx-udp-segmentation off?

grooviegermanikus commented 1 year ago

As an alternative workaround, did you try ethtool -K $INTERFACE tx-udp-segmentation off?

Hi, let me check with ops!

yet I guess on PaaS-environments like fly.io that's tedious workaround. the deployment model on fly.io is to provide a docker image. access to OS level is possible but limited AFAIK.

djc commented 1 year ago

maybe the solution should be ported to 0.10 too

This was done already, in #1638 (published in 0.10.3).

grooviegermanikus commented 1 year ago

Why are you not on 0.10 yet?

we depend on a component we don't control

djc commented 1 year ago

we depend on a component we don't control

Is that something public? Would like to have more information.

grooviegermanikus commented 1 year ago

we depend on a component we don't control

Is that something public? Would like to have more information.

solana 1.16.x: here https://github.com/solana-labs/solana/blob/c932953e7bd8f7db10a1c74c6ad29dd809307c70/Cargo.toml#L258 (master is on 0.10)

djc commented 1 year ago

Ahh, okay, so released versions of Solana require 0.9 (master is on 0.10) and you depend on Solana. Thanks for the clarification!

djc commented 1 year ago

If you submit a PR to bump the version on the 0.9.x branch I can publish a release right after that.

Ralith commented 1 year ago

yet I guess on PaaS-environments like fly.io that's tedious workaround. the deployment model on fly.io is to provide a docker image. access to OS level is possible but limited AFAIK.

I'm not much good at docker, but I think you can arrange for it to run a script on startup, which could include an ethtool invocation before invoking your actual service. This might be especially helpful if the quinn use is hidden in a dependency.

grooviegermanikus commented 12 months ago

@djc here's the PR for version bump Thanks a lot !