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

net: MPTCP support is not enabled when apps use ListenTCP() or DialTCP() #70500

Closed
matttbe opened this issue Nov 21, 2024 · 2 comments
Closed
Labels
FixPending Issues that have a fix which has not yet been reviewed or submitted. NeedsFix The path to resolution is known, but the work has not been done.
Milestone

Comments

@matttbe
Copy link
Contributor

matttbe commented Nov 21, 2024

Go version

go version devel go1.24-02df9bbdbd Thu Nov 21 15:52:29 2024 +0000 linux/amd64

Output of go env in your module/workspace:

AR='ar'
CC='gcc'
CGO_CFLAGS='-O2 -g'
CGO_CPPFLAGS=''
CGO_CXXFLAGS='-O2 -g'
CGO_ENABLED='1'
CGO_FFLAGS='-O2 -g'
CGO_LDFLAGS='-O2 -g'
CXX='g++'
GCCGO='gccgo'
GO111MODULE=''
GOAMD64='v1'
GOARCH='amd64'
GOAUTH='netrc'
GOBIN=''
GOCACHE='/home/devel/.cache/go-build'
GODEBUG=''
GOENV='/home/devel/.config/go/env'
GOEXE=''
GOEXPERIMENT=''
GOFIPS140='off'
GOFLAGS=''
GOGCCFLAGS='-fPIC -m64 -pthread -Wl,--no-gc-sections -fmessage-length=0 -ffile-prefix-map=/tmp/go-build3720308608=/tmp/go-build -gno-record-gcc-switches'
GOHOSTARCH='amd64'
GOHOSTOS='linux'
GOINSECURE=''
GOMOD='/home/devel/Workspace/go/src/go.mod'
GOMODCACHE='/home/devel/go/pkg/mod'
GONOPROXY=''
GONOSUMDB=''
GOOS='linux'
GOPATH='/home/devel/go'
GOPRIVATE=''
GOPROXY='https://proxy.golang.org,direct'
GOROOT='/home/devel/Workspace/go'
GOSUMDB='sum.golang.org'
GOTELEMETRY='local'
GOTELEMETRYDIR='/home/devel/.config/go/telemetry'
GOTMPDIR=''
GOTOOLCHAIN='auto'
GOTOOLDIR='/home/devel/Workspace/go/pkg/tool/linux_amd64'
GOVCS=''
GOVERSION='devel go1.24-02df9bbdbd Thu Nov 21 15:52:29 2024 +0000'
GOWORK=''
PKG_CONFIG='pkg-config'

What did you do?

Having GODEBUG=multipathtcp=1 being set when running Go apps using ListenTCP() or DialTCP() directly.

Or checking if MPTCP is used on a system supporting it, with Go 1.24 and a Go app using ListenTCP() directly.

What did you see happen?

MPTCP is unexpectedly not used when GODEBUG=multipathtcp=1 is set for these apps.

Same when using Go 1.24 with an app using ListenTCP() directly: MPTCP is unexpectedly not used.

What did you expect to see?

Setting GODEBUG=multipathtcp= has no effects on apps using ListenTCP() or DialTCP() directly.

According to the documentation, these functions are supposed to act like Listen and Dial respectively:

ListenTCP acts like Listen for TCP networks.
DialTCP acts like Dial for TCP networks.

So when reading this, I think we should expect GODEBUG=multipathtcp= to act on these functions as well.

Also, since #69016, MPTCP is used by default (if supported) with TCP listeners. Similarly, when ListenTCP() is used directly, MPTCP is unexpectedly not used. It is strange to have a different behaviour.

matttbe added a commit to matttbe/go that referenced this issue Nov 21, 2024
Setting GODEBUG=multipathtcp= [1] has no effects on apps using
ListenTCP or DialTCP directly.

According to the documentation, these functions are supposed to act like
Listen and Dial respectively:

    ListenTCP acts like Listen for TCP networks.
    DialTCP acts like Dial for TCP networks.

So when reading this, I think we should expect GODEBUG=multipathtcp= to
act on these functions as well.

Also, since golang#69016, MPTCP is used by default (if supported) with TCP
listeners. Similarly, when ListenTCP is used directly, MPTCP is
unexpectedly not used. It is strange to have a different behaviours.

So now, ListenTCP and DialTCP also check for MPTCP. This is the exact
same checks that are done in dial.go, see Listen and dialSingle.

Fixes golang#70500

Change-Id: I37217aa3c0de122f14c62baf004f158ecd25446f
matttbe added a commit to matttbe/go that referenced this issue Nov 21, 2024
Setting GODEBUG=multipathtcp= [1] has no effects on apps using
ListenTCP or DialTCP directly.

According to the documentation, these functions are supposed to act like
Listen and Dial respectively:

    ListenTCP acts like Listen for TCP networks.
    DialTCP acts like Dial for TCP networks.

So when reading this, I think we should expect GODEBUG=multipathtcp= to
act on these functions as well.

Also, since golang#69016, MPTCP is used by default (if supported) with TCP
listeners. Similarly, when ListenTCP is used directly, MPTCP is
unexpectedly not used. It is strange to have a different behaviour.

So now, ListenTCP and DialTCP also check for MPTCP. This is the exact
same checks that are done in dial.go, see Listen and dialSingle.

Fixes golang#70500
matttbe added a commit to matttbe/go that referenced this issue Nov 21, 2024
Setting GODEBUG=multipathtcp= [1] has no effects on apps using
ListenTCP or DialTCP directly.

According to the documentation, these functions are supposed to act like
Listen and Dial respectively:

    ListenTCP acts like Listen for TCP networks.
    DialTCP acts like Dial for TCP networks.

So when reading this, I think we should expect GODEBUG=multipathtcp= to
act on these functions as well.

Also, since golang#69016, MPTCP is used by default (if supported) with TCP
listeners. Similarly, when ListenTCP is used directly, MPTCP is
unexpectedly not used. It is strange to have a different behaviour.

So now, ListenTCP and DialTCP also check for MPTCP. This is the exact
same checks that are done in dial.go, see Listen and dialSingle.

[1] https://pkg.go.dev/net#Dialer.SetMultipathTCP

Fixes golang#70500
@gopherbot
Copy link
Contributor

Change https://go.dev/cl/630715 mentions this issue: net: check for MPTCP in DialTCP and ListenTCP

matttbe added a commit to matttbe/go that referenced this issue Nov 21, 2024
Setting GODEBUG=multipathtcp= [1] has no effects on apps using
ListenTCP or DialTCP directly.

According to the documentation, these functions are supposed to act like
Listen and Dial respectively:

    ListenTCP acts like Listen for TCP networks.
    DialTCP acts like Dial for TCP networks.

So when reading this, I think we should expect GODEBUG=multipathtcp= to
act on these functions as well.

Also, since golang#69016, MPTCP is used by default (if supported) with TCP
listeners. Similarly, when ListenTCP is used directly, MPTCP is
unexpectedly not used. It is strange to have a different behaviour.

So now, ListenTCP and DialTCP also check for MPTCP. Those are the exact
same checks that are done in dial.go, see Listen and dialSingle.

[1] https://pkg.go.dev/net#Dialer.SetMultipathTCP

Fixes golang#70500
@dmitshur dmitshur added the NeedsFix The path to resolution is known, but the work has not been done. label Nov 21, 2024
@dmitshur dmitshur added this to the Go1.24 milestone Nov 21, 2024
@dmitshur dmitshur added the FixPending Issues that have a fix which has not yet been reviewed or submitted. label Nov 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
FixPending Issues that have a fix which has not yet been reviewed or submitted. NeedsFix The path to resolution is known, but the work has not been done.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants