envoyproxy / envoy

Cloud-native high-performance edge/middle/service proxy
https://www.envoyproxy.io
Apache License 2.0
24.23k stars 4.68k forks source link

bidirectional streaming grpc panic #34536

Open zgqqiang opened 3 weeks ago

zgqqiang commented 3 weeks ago

I used the Golang interceptor to modify the data in the GRPC dynamic modification @doujiang24

Service RequestStream{
//Build a streamRequest
Rpc requestStream (Payload) returns (stream Payload){
}
}This can
Service BiRequestStream{
//Sends a commonRequest
Rpc requestBiStream (stream Payload) returns (stream Payload){
}
}This bidirectional flow GRPC will report an error

type.googleapis.com/envoy.extensions.filters.http.golang.v3alpha.Config

Envoy version v1.30.1 found panic The error is as follows:

[2024-06-05 02:22:48.188] [60] [error] [golang] [contrib/golang/common/log/cgo. cc: 24] http: panic serving: not processing Go
Goroutine 35 [running, locked to thread]:
Github. com/envoyproxy/envoy/contrib/golang/filters/http/source/go/pkg/http. (* htpRequest) RecoverPanic (0xc000198600)
/Data/go/pkg/mod/github. com/envoyproxy/ envoy@v1.30.1 /Contrib/golang/filters/http/source/go/pkg/http/filters. go: 134+0x65
Pan ({0x7eff073ed0a0?, 0xc000099ae0?})
/Usr/local/go/src/runtime/panic. go: 770+0x132
Github. com/envoyproxy/envoy/contrib/golang/filters/http/source/go/pkg/http. handleCApiStatus (...)
/Data/go/pkg/mod/github. com/envoyproxy/ envoy@v1.30.1 /Contrib/golang/filters/http/source/go/pkg/http/capi_impl. go: 81
Github. com/envoyproxy/envoy/contrib/golang/filters/http/source/go/pkg/http. (* htpCApiImpl) HttpGetBuffer (0x0?, 0x52bff31ec80, 0x52bff328480, 0x81)
/Data/go/pkg/mod/github. com/envoyproxy/ envoy@v1.30.1 /Contrib/golang/filters/http/source/go/pkg/http/capi_impl. go: 214+0xc5
Github. com/envoyproxy/envoy/contrib/golang/filters/http/source/go/pkg/http. (* htpBuffer) Bytes (0xc00028c570)
/Data/go/pkg/mod/github. com/envoyproxy/ envoy@v1.30.1 /Contrib/golang/filters/http/source/go/pkg/http/type. go: 387+0x3d
Main. (* filter) DecodeData (0x7eff07416f20?, {0x7eff074b9df8, 0xc00028c570}, 0x0)
/Data/zgq/mosn/invoice/filter. go: 78+0xe2
Github. com/envoyproxy/envoy/contrib/golang/filters/http/source/go/pkg/http. envoyGoFilterOnHttpData (0x52bff31ec80, 0x0, 0x52bff328480, 0x81)
/Data/go/pkg/mod/github. com/envoyproxy/ envoy@v1.30.1 /Contrib/golang/filters/http/source/go/pkg/http/ship. go: 229+0x150

The community has also found the same case, but it has not been merged into the version. Is there a plan https://github.com/envoyproxy/envoy/issues/32033 https://github.com/envoyproxy/envoy/pull/33377

adisuissa commented 3 weeks ago

cc @doujiang24 @wangfakang

doujiang24 commented 2 weeks ago

@zgqqiang

33377 is working in progess, and it's very close to ready, sorry to the late.

doujiang24 commented 2 weeks ago

Hello @zgqqiang , #33377 is merged, would you like to have a try? thanks.

zgqqiang commented 1 week ago

I have retested based on the latest submission and the functionality is normal. Thank you @doujiang24