Functionbeat 1.11 cannot process more than one message on cloud function

Hello,

When I deploy functionbeat 1.11 on a GCP Cloud function, functionbeat always crashes after having to deal with the second event coming from pub/sub.

Error message shows a panic crash like this :

WARN\t[cfgwarn]\tpubsub/pubsub.go:25\tBETA: Google Cloud Platform support is in beta
- 2021-05-04T16:58:29.958Z\tFATAL\t[functionbeat]\tinstance/beat.go:164\tFailed due to panic.\t{\"panic\": \"name version already used\", \"stack\": \"pubsub/vendor/github.com/elastic/beats/v7/libbeat/cmd/instance.Run.func1.1 
 /workspace/src/pubsub/vendor/github.com/elastic/beats/v7/libbeat/cmd/instance/beat.go:165runtime.gopanic 
 /usr/local/go/src/runtime/panic.go:679pubsub/vendor/github.com/elastic/beats/v7/libbeat/monitoring.panicErr 
 /workspace/src/pubsub/vendor/github.com/elastic/beats/v7/libbeat/monitoring/registry.go:257pubsub/vendor/github.com/elastic/beats/v7/libbeat/monitoring.(*Registry).doAdd 
 /workspace/src/pubsub/vendor/github.com/elastic/beats/v7/libbeat/monitoring/registry.go:159pubsub/vendor/github.com/elastic/beats/v7/libbeat/monitoring.addVar 
 /workspace/src/pubsub/vendor/github.com/elastic/beats/v7/libbeat/monitoring/metrics.go:225pubsub/vendor/github.com/elastic/beats/v7/libbeat/monitoring.NewString 
 /workspace/src/pubsub/vendor/github.com/elastic/beats/v7/libbeat/monitoring/metrics.go:170pubsub/vendor/github.com/elastic/beats/v7/libbeat/cmd/instance.Run.func1 
 /workspace/src/pubsub/vendor/github.com/elastic/beats/v7/libbeat/cmd/instance/beat.go:175pubsub/vendor/github.com/elastic/beats/v7/libbeat/cmd/instance.Run 
 /workspace/src/pubsub/vendor/github.com/elastic/beats/v7/libbeat/cmd/instance/beat.go:190pubsub.RunPubSub 
 /workspace/src/pubsub/pubsub.go:35reflect.Value.call 
 /usr/local/go/src/reflect/value.go:460reflect.Value.Call 
 /usr/local/go/src/reflect/value.go:321github.com/GoogleCloudPlatform/functions-framework-go/funcframework.runUserFunctionWithContext 
 /workspace/src/github.com/GoogleCloudPlatform/functions-framework-go/funcframework/framework.go:202github.com/GoogleCloudPlatform/functions-framework-go/funcframework.runBackgroundEvent 
 /workspace/src/github.com/GoogleCloudPlatform/functions-framework-go/funcframework/events.go:101github.com/GoogleCloudPlatform/functions-framework-go/funcframework.handleEventFunction 
 /workspace/src/github.com/GoogleCloudPlatform/functions-framework-go/funcframework/framework.go:169github.com/GoogleCloudPlatform/functions-framework-go/funcframework.registerEventFunction.func1 
 /workspace/src/github.com/GoogleCloudPlatform/functions-framework-go/funcframework/framework.go:136net/http.HandlerFunc.ServeHTTP 
 /usr/local/go/src/net/http/server.go:2036net/http.(*ServeMux).ServeHTTP 
 /usr/local/go/src/net/http/server.go:2416net/http.serverHandler.ServeHTTP 
 /usr/local/go/src/net/http/server.go:2831net/http.(*conn).serve 
 /usr/local/go/src/net/http/server.go:1919\"}
Function execution took 32 ms, finished with status: 'connection error'

This means only one message can be process through functionbeat before crashing. An ugly workaround is to setup a retry on the pub/sub topic but this make you spawn a lot of cloud function instances.

This issue has been traced here : GCP/FunctionBeat Errors [cannot find matching process for pid=1, name version already used] · Issue #25596 · elastic/beats · GitHub but it looks dead for months.

Does anyone know how much time it usually takes to have a fix for critical issue like this one ?

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.