Skip to content

Dashboard throws 500 for slow query detail page with invalid utf-8 error #1515

@AndreMouche

Description

@AndreMouche

Bug Report

Please answer these questions before submitting your issue. Thanks!

What did you do?
In TiDB, I can set an invalid utf-8 string to a binary column successfully.
img_v2_c10f98b3-451a-4303-b4d7-9c01c04851fg

However when the above log shows in slow-log, I try to find more details for this slow log on dashboard

What did you expect to see?

the details for the slow log

What did you see instead?

500
and see the error log tipb.ExplainOperator.operator_info contains invalid UTF-8
details:

{"error":true,"message":"proto: field tipb.ExplainOperator.operator_info contains invalid UTF-8","code":"common.internal","full_text":"proto: field tipb.ExplainOperator.operator_info contains invalid UTF-8\n at github.com/pingcap/tidb-dashboard/util/rest.Error()\n\t/root/tidb-dashboard/util/rest/context_helpers.go:19\n at github.com/pingcap/tidb-dashboard/pkg/apiserver/slowquery.(*Service).getDetails()\n\t/root/tidb-dashboard/pkg/apiserver/slowquery/service.go:106\n at github.com/gin-gonic/gin.(*Context).Next()\n\t/root/go/pkg/mod/github.com/gin-gonic/[gin@v1.7.4](mailto:gin@v1.7.4)/context.go:165\n at github.com/pingcap/tidb-dashboard/pkg/apiserver/utils.MWConnectTiDB.func1()\n\t/root/tidb-dashboard/pkg/apiserver/utils/tidb_conn.go:66\n at github.com/gin-gonic/gin.(*Context).Next()\n\t/root/go/pkg/mod/github.com/gin-gonic/[gin@v1.7.4](mailto:gin@v1.7.4)/context.go:165\n at github.com/breeswish/gin-jwt/v2.(*GinJWTMiddleware).middlewareImpl()\n\t/root/go/pkg/mod/github.com/breeswish/gin-jwt/[v2@v2.6.4-jwt-patch](mailto:v2@v2.6.4-jwt-patch)/auth_jwt.go:403\n at github.com/pingcap/tidb-dashboard/pkg/apiserver/user.(*AuthService).MWAuthRequired.func1()\n\t/root/go/pkg/mod/github.com/breeswish/gin-jwt/[v2@v2.6.4-jwt-patch](mailto:v2@v2.6.4-jwt-patch)/auth_jwt.go:365\n at github.com/gin-gonic/gin.(*Context).Next()\n\t/root/go/pkg/mod/github.com/gin-gonic/[gin@v1.7.4](mailto:gin@v1.7.4)/context.go:165\n at github.com/pingcap/tidb-dashboard/util/rest.ErrorHandlerFn.func1()\n\t/root/tidb-dashboard/util/rest/error.go:70\n at github.com/gin-gonic/gin.(*Context).Next()\n\t/root/go/pkg/mod/github.com/gin-gonic/[gin@v1.7.4](mailto:gin@v1.7.4)/context.go:165\n at github.com/gin-contrib/gzip.Gzip.func2()\n\t/root/go/pkg/mod/github.com/gin-contrib/[gzip@v0.0.1](mailto:gzip@v0.0.1)/gzip.go:47\n at github.com/gin-gonic/gin.(*Context).Next()\n\t/root/go/pkg/mod/github.com/gin-gonic/[gin@v1.7.4](mailto:gin@v1.7.4)/context.go:165\n at github.com/gin-gonic/gin.CustomRecoveryWithWriter.func1()\n\t/root/go/pkg/mod/github.com/gin-gonic/[gin@v1.7.4](mailto:gin@v1.7.4)/recovery.go:99\n at github.com/gin-gonic/gin.(*Context).Next()\n\t/root/go/pkg/mod/github.com/gin-gonic/[gin@v1.7.4](mailto:gin@v1.7.4)/context.go:165\n at github.com/gin-gonic/gin.(*Engine).handleHTTPRequest()\n\t/root/go/pkg/mod/github.com/gin-gonic/[gin@v1.7.4](mailto:gin@v1.7.4)/gin.go:489\n at github.com/gin-gonic/gin.(*Engine).ServeHTTP()\n\t/root/go/pkg/mod/github.com/gin-gonic/[gin@v1.7.4](mailto:gin@v1.7.4)/gin.go:445\n at github.com/pingcap/tidb-dashboard/pkg/apiserver.(*Service).handler()\n\t/root/tidb-dashboard/pkg/apiserver/apiserver.go:244\n at net/http.HandlerFunc.ServeHTTP()\n\t/usr/local/go/src/net/http/server.go:2084\n at github.com/pingcap/tidb-dashboard/pkg/utils.(*ServiceStatus).NewStatusAwareHandler.func1()\n\t/root/tidb-dashboard/pkg/utils/service_status.go:67\n at net/http.HandlerFunc.ServeHTTP()\n\t/usr/local/go/src/net/http/server.go:2084\n at net/http.(*ServeMux).ServeHTTP()\n\t/usr/local/go/src/net/http/server.go:2462\n at net/http.serverHandler.ServeHTTP()\n\t/usr/local/go/src/net/http/server.go:2916\n at net/http.(*conn).serve()\n\t/usr/local/go/src/net/http/server.go:1966\n at runtime.goexit()\n\t/usr/local/go/src/runtime/asm_amd64.s:1571"}

What version of TiDB Dashboard are you using (./tidb-dashboard --version)?
6.5

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions