【 TiDB 使用环境】生产环境
【 TiDB 版本】 v4.0.5
【复现路径】什么都没有做
【遇到的问题:问题现象及影响】
tidb节点频繁重启,没有oom, 没有cpu高。 每次重启,tidb_stderr.log日志里都打印:
panic: runtime error: index out of range [512] with length 512
goroutine 2101 [running]:
github.com/pingcap/sysutil.readLastLines(0xc006f43268, 0x12bfffd8, 0xc00783cea0, 0x0, 0x0, 0xc007833e00)
/home/jenkins/agent/workspace/tidb_v4.0.5/go/pkg/mod/github.com/pingcap/sysutil@v0.0.0-20200715082929-4c47bcac246a/search_log.go:210 +0x366
github.com/pingcap/sysutil.readLastValidLog(0xc006f43268, 0xa, 0xc00779dd40, 0x0, 0x0)
/home/jenkins/agent/workspace/tidb_v4.0.5/go/pkg/mod/github.com/pingcap/sysutil@v0.0.0-20200715082929-4c47bcac246a/search_log.go:144 +0xe5
github.com/pingcap/sysutil.resolveFiles.func1(0xc007821e00, 0x51, 0x36e6c80, 0xc00783cdd0, 0x0, 0x0, 0x11defa9, 0xc00783cdd0)
/home/jenkins/agent/workspace/tidb_v4.0.5/go/pkg/mod/github.com/pingcap/sysutil@v0.0.0-20200715082929-4c47bcac246a/search_log.go:83 +0x37f
path/filepath.walk(0xc007821e00, 0x51, 0x36e6c80, 0xc00783cdd0, 0xc006f1b9c0, 0x0, 0x0)
/usr/local/go/src/path/filepath/path.go:358 +0x425
path/filepath.walk(0x7ffe7eb2fed6, 0x30, 0x36e6c80, 0xc006ee69c0, 0xc006f1b9c0, 0x0, 0x7ffe7eb2fed6)
/usr/local/go/src/path/filepath/path.go:382 +0x2ff
path/filepath.Walk(0x7ffe7eb2fed6, 0x30, 0xc00a8db9c0, 0x4, 0x15d03eb)
/usr/local/go/src/path/filepath/path.go:404 +0xff
github.com/pingcap/sysutil.resolveFiles(0x7ffe7eb2fed6, 0x39, 0x190a1aa2200, 0x190a7076c80, 0x0, 0x0, 0x0, 0x0, 0x0)
/home/jenkins/agent/workspace/tidb_v4.0.5/go/pkg/mod/github.com/pingcap/sysutil@v0.0.0-20200715082929-4c47bcac246a/search_log.go:54 +0x1be
github.com/pingcap/sysutil.(*DiagnosticsServer).SearchLog(0xc0022c4790, 0xc006f4a310, 0x36eac40, 0xc0016c09e0, 0x0, 0x0)
/home/jenkins/agent/workspace/tidb_v4.0.5/go/pkg/mod/github.com/pingcap/sysutil@v0.0.0-20200715082929-4c47bcac246a/service.go:45 +0x94
github.com/pingcap/kvproto/pkg/diagnosticspb._Diagnostics_SearchLog_Handler(0x312d9e0, 0xc002650c30, 0x36e6980, 0xc006fdc000, 0x51c3ff0, 0xc005559900)
/home/jenkins/agent/workspace/tidb_v4.0.5/go/pkg/mod/github.com/pingcap/kvproto@v0.0.0-20200818080353-7aaed8998596/pkg/diagnosticspb/diagnosticspb.pb.go:633 +0x109
google.golang.org/grpc.(*Server).processStreamingRPC(0xc002849380, 0x36f4b40, 0xc005cd3380, 0xc005559900, 0xc002650cc0, 0x4c8ba40, 0x0, 0x0, 0x0)
/home/jenkins/agent/workspace/tidb_v4.0.5/go/pkg/mod/google.golang.org/grpc@v1.26.0/server.go:1237 +0xb42
google.golang.org/grpc.(*Server).handleStream(0xc002849380, 0x36f4b40, 0xc005cd3380, 0xc005559900, 0x0)
/home/jenkins/agent/workspace/tidb_v4.0.5/go/pkg/mod/google.golang.org/grpc@v1.26.0/server.go:1317 +0xd30
google.golang.org/grpc.(*Server).serveStreams.func1.1(0xc0069faba0, 0xc002849380, 0x36f4b40, 0xc005cd3380, 0xc005559900)
/home/jenkins/agent/workspace/tidb_v4.0.5/go/pkg/mod/google.golang.org/grpc@v1.26.0/server.go:722 +0xbb
created by google.golang.org/grpc.(*Server).serveStreams.func1
/home/jenkins/agent/workspace/tidb_v4.0.5/go/pkg/mod/google.golang.org/grpc@v1.26.0/server.go:720 +0xa1