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

x/net/http2: stream state handling issues #67036

Closed
moyiun09 opened this issue Apr 25, 2024 · 1 comment
Closed

x/net/http2: stream state handling issues #67036

moyiun09 opened this issue Apr 25, 2024 · 1 comment
Labels
NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.

Comments

@moyiun09
Copy link

Go version

go version go1.22.2 linux/amd64

Output of go env in your module/workspace:

GO111MODULE='on'
GOARCH='amd64'
GOBIN=''
GOCACHE='/home/moyiun09/.cache/go-build'
GOENV='/home/moyiun09/.config/go/env'
GOEXE=''
GOEXPERIMENT=''
GOFLAGS=''
GOHOSTARCH='amd64'
GOHOSTOS='linux'
GOINSECURE=''
GOMODCACHE='/home/moyiun09/go/pkg/mod'
GONOPROXY=''
GONOSUMDB=''
GOOS='linux'
GOPATH='/home/moyiun09/go'
GOPRIVATE=''
GOPROXY='https://goproxy.cn,direct'
GOROOT='/home/moyiun09/env/go1.22.2'
GOSUMDB='sum.golang.org'
GOTMPDIR=''
GOTOOLCHAIN='auto'
GOTOOLDIR='/home/moyiun09/env/go1.22.2/pkg/tool/linux_amd64'
GOVCS=''
GOVERSION='go1.22.2'
GCCGO='gccgo'
GOAMD64='v1'
AR='ar'
CC='gcc'
CXX='g++'
CGO_ENABLED='1'
GOMOD='/home/moyiun09/work/server/caddy-ss/go.mod'
GOWORK=''
CGO_CFLAGS='-O2 -g'
CGO_CPPFLAGS=''
CGO_CXXFLAGS='-O2 -g'
CGO_FFLAGS='-O2 -g'
CGO_LDFLAGS='-O2 -g'
PKG_CONFIG='pkg-config'
GOGCCFLAGS='-fPIC -m64 -pthread -Wl,--no-gc-sections -fmessage-length=0 -ffile-prefix-map=/tmp/go-build3636811921=/tmp/go-build -gno-record-gcc-switches'

What did you do?

An abnormal flow sequence is sent on caddy.
After RST interrupts the flow, the request is still forwarded.
env golang.org/x/net v0.24.0

Detailed information:
caddyserver/caddy#6265

What did you see happen?

I am not familiar with the x/net/http2 standard library, and various situations occurred while I was debugging the program.
Unusual frames sequence triggered

x/[email protected]/http2/server.go
2053 func (st *stream) processTrailerHeaders(f *MetaHeadersFrame)

But the request was forwarded anyway

What did you expect to see?

When RST interrupts the stream, x/net/http2 interrupts stream processing and caddy should not forward the request.
Is this caused by multi-thread competition?

@joedian joedian added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Apr 26, 2024
@gopherbot
Copy link
Contributor

Change https://go.dev/cl/585595 mentions this issue: http2: cancel handler context on stream errors

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Projects
None yet
Development

No branches or pull requests

4 participants
@gopherbot @joedian @moyiun09 and others