TiCDC OpenAPI handler panics for "Get Processor" #3840
Closed
Description
What did you do?
Run GET /api/v1/processors/{changefeed_id}/{capture_id}
What did you expect to see?
Everything should be normal.
What did you see instead?
2021-12-13 10:34:28.916887 I | http: panic serving 127.0.0.1:53358: runtime error: invalid memory address or nil pointer dereference
goroutine 1572 [running]:
net/http.(*conn).serve.func1(0xc0006f2320)
/usr/local/go/src/net/http/server.go:1824 +0x168
panic(0x617ad40, 0x98bda70)
/usr/local/go/src/runtime/panic.go:971 +0x499
github.com/pingcap/ticdc/cdc/capture.(*HTTPHandler).GetProcessor(0xc000ff8078, 0xc00541e000)
/home/jenkins/agent/workspace/cdc_ghpr_integration_test/go/src/github.com/pingcap/ticdc/cdc/capture/http_handler.go:591 +0xf90
github.com/gin-gonic/gin.(*Context).Next(...)
/nfs/cache/mod/github.com/gin-gonic/gin@v1.7.4/context.go:165
github.com/pingcap/ticdc/cdc.errorHandleMiddleware.func1(0xc00541e000)
/home/jenkins/agent/workspace/cdc_ghpr_integration_test/go/src/github.com/pingcap/ticdc/cdc/http_router.go:159 +0xe4
github.com/gin-gonic/gin.(*Context).Next(...)
/nfs/cache/mod/github.com/gin-gonic/gin@v1.7.4/context.go:165
github.com/pingcap/ticdc/cdc.timeoutMiddleware.func1(0xc00541e000)
/home/jenkins/agent/workspace/cdc_ghpr_integration_test/go/src/github.com/pingcap/ticdc/cdc/http_router.go:125 +0x3f0
github.com/gin-gonic/gin.(*Context).Next(...)
/nfs/cache/mod/github.com/gin-gonic/gin@v1.7.4/context.go:165
github.com/pingcap/ticdc/cdc.logMiddleware.func1(0xc00541e000)
/home/jenkins/agent/workspace/cdc_ghpr_integration_test/go/src/github.com/pingcap/ticdc/cdc/http_router.go:134 +0x208
github.com/gin-gonic/gin.(*Context).Next(...)
/nfs/cache/mod/github.com/gin-gonic/gin@v1.7.4/context.go:165
github.com/gin-gonic/gin.(*Engine).handleHTTPRequest(0xc000d681a0, 0xc00541e000)
/nfs/cache/mod/github.com/gin-gonic/gin@v1.7.4/gin.go:489 +0xaca
github.com/gin-gonic/gin.(*Engine).ServeHTTP(0xc000d681a0, 0x7ba9630, 0xc0027e02a0, 0xc002934400)
/nfs/cache/mod/github.com/gin-gonic/gin@v1.7.4/gin.go:445 +0x377
net/http.serverHandler.ServeHTTP(0xc0005508c0, 0x7ba9630, 0xc0027e02a0, 0xc002934400)
/usr/local/go/src/net/http/server.go:2887 +0xcb
net/http.(*conn).serve(0xc0006f2320, 0x7bb9b50, 0xc000fae940)
/usr/local/go/src/net/http/server.go:1952 +0x87e
created by net/http.(*Server).Serve
/usr/local/go/src/net/http/server.go:3013 +0x645
Versions of the cluster
TiCDC version (execute cdc version
):
f0a38a7aaf9f3b11a4d807da275b567642733f58 (master)