DigitalChinaOpenSource / TiDB-for-PostgreSQL

PgSQL compatible on distributed database TiDB
Apache License 2.0
387 stars 21 forks source link

TiDB4PG panic: runtime error: invalid memory address or nil pointer dereference #82

Open leeraya opened 2 years ago

leeraya commented 2 years ago

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. What did you do?

send the sourcecode to linux. cd to tidb-server directory run: go run main.go &

2. What did you expect to see?

It can keep alive long

3. What did you see instead?

It can start up ,but panic some hours ago.

the error: [root@loader bubble]# panic: runtime error: invalid memory address or nil pointer dereference [signal SIGSEGV: segmentation violation code=0x1 addr=0xc0 pc=0x2e01153]

goroutine 327269 [running]: github.com/pingcap/tidb/server.(clientConn).writeError(0xc000113700, 0x3b29c80, 0xc001baedb0, 0x3acad40, 0xc001584050, 0x1, 0x0) /opt/TiDB-for-PostgreSQL/server/conn.go:1138 +0x1b3 github.com/pingcap/tidb/server.(Server).onConn(0xc0013b46e0, 0xc000113700) /opt/TiDB-for-PostgreSQL/server/server.go:439 +0x147 created by github.com/pingcap/tidb/server.(*Server).Run /opt/TiDB-for-PostgreSQL/server/server.go:370 +0x7c9 exit status 2

[1]- Exit 1 go run main.go (wd: /opt/TiDB-for-PostgreSQL/tidb-server)