Skip to content

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

@moyiun09

Description

@moyiun09

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/net@v0.24.0/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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    FrozenDueToAgeNeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy