apache / apisix-go-plugin-runner

Go Plugin Runner for APISIX
https://apisix.apache.org/
Apache License 2.0
169 stars 69 forks source link

bug: invalid memory address or nil pointer dereference #41

Closed a11enhuang closed 2 years ago

a11enhuang commented 2 years ago

Issue description

Environment

给某个路由定义好go-pre-plugin一段时间后(可能是因为长时间没有请求),go plugin会出错导致接口无法访问。异常信息: 2021/10/08 03:03:14 [warn] 56#56: 207 [lua] init.lua:681: 2021-10-08T03:03:14.440Z ERROR server/server.go:69 panic recovered: runtime error: invalid memory address or nil pointer dereference 2021/10/8 上午11:03:14 github.com/apache/apisix-go-plugin-runner/internal/server.recoverPanic 2021/10/8 上午11:03:14 /var/lib/jenkins/workspace/build-dev-apple-fuller-apisix-go-plugin-runner/apisix-go-plugin-runner/internal/server/server.go:69 2021/10/8 上午11:03:14 runtime.gopanic 2021/10/8 上午11:03:14 /root/go/src/runtime/panic.go:1038 2021/10/8 上午11:03:14 runtime.panicmem 2021/10/8 上午11:03:14 /root/go/src/runtime/panic.go:221 2021/10/8 上午11:03:14 runtime.sigpanic 2021/10/8 上午11:03:14 /root/go/src/runtime/signal_unix.go:735 2021/10/8 上午11:03:14 github.com/google/flatbuffers/go.(Builder).Reset 2021/10/8 上午11:03:14 /root/go-path/pkg/mod/github.com/google/flatbuffers@v2.0.0+incompatible/go/builder.go:45 2021/10/8 上午11:03:14 github.com/apache/apisix-go-plugin-runner/internal/util.PutBuilder 2021/10/8 上午11:03:14 /var/lib/jenkins/workspace/build-dev-apple-fuller-apisix-go-plugin-runner/apisix-go-plugin-runner/internal/util/pool.go:37 2021/10/8 上午11:03:14 github.com/apache/apisix-go-plugin-runner/internal/server.handleConn 2021/10/8 上午11:03:14 /var/lib/jenkins/workspace/build-dev-apple-fuller-apisix-go-plugin-runner/apisix-go-plugin-runner/internal/server/server.go:122 2021/10/8 上午11:03:14 , context: ngx.timer

envestcc commented 2 years ago

我也遇到了相同的问题