TiDB_server_panic_total

为提高效率,提问时请提供以下信息,问题描述清晰可优先响应。

  • 【TiDB 版本】:v3.0.1
  • 【问题描述】:

tidb监控报警:

tidb-alert

业务端报错:

Error querying database. Cause: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure
The last packet successfully received from the server was 3 milliseconds ago. The last packet sent successfully to the server was 3 milliseconds ago.

tidb-server报错日志:

[2020/01/08 15:34:22.455 +08:00] [ERROR] [conn.go:599] ["connection running loop panic"] [conn=26936173] [lastCmd="select * from tc_account_advance where merchant_id='100000591528' and platform_user_type=1 and `date`='2020-01-08' for update"] [err="\"invalid memory address or nil pointer dereference\""] [stack="goroutine 7267652124 [running]:\ngithub.com/pingcap/tidb/server.(*clientConn).Run.func1(0x2250900, 0xc03384aba0, 0xc00f3391e0)\n\t/home/jenkins/workspace/release_tidb_3.0/go/src/github.com/pingcap/tidb/server/conn.go:597 +0xee\npanic(0x1d85fe0, 0x3198a30)\n\t/usr/local/go/src/runtime/panic.go:522 +0x1b5\ngithub.com/pingcap/tidb/server.(*clientConn).writeResultset.func1(0x0, 0x22626c0, 0xc042438000, 0xc003f69778, 0x2250900, 0xc03384aba0, 0xc00f3391e0)\n\t/home/jenkins/workspace/release_tidb_3.0/go/src/github.com/pingcap/tidb/server/conn.go:1255 +0x59c\npanic(0x1d85fe0, 0x3198a30)\n\t/usr/local/go/src/runtime/panic.go:522 +0x1b5\ngithub.com/pingcap/tidb/session.(*TxnState).LockKeys(0xc0329ad4b0, 0x2250900, 0xc03384aba0, 0x5be104da7a40017, 0xc00ec51120, 0x1, 0x1, 0x0, 0x0)\n\t<autogenerated>:1 +0x36\ngithub.com/pingcap/tidb/executor.(*PointGetExecutor).lockKeyIfNeeded(0xc056d783c0, 0x2250900, 0xc03384aba0, 0xc02dbdbac0, 0x13, 0x13, 0x70, 0x0)\n\t/home/jenkins/workspace/release_tidb_3.0/go/src/github.com/pingcap/tidb/executor/point_get.go:152 +0x144\ngithub.com/pingcap/tidb/executor.(*PointGetExecutor).Next(0xc056d783c0, 0x2250900, 0xc03384aba0, 0xc00f75b7d0, 0x0, 0x0)\n\t/home/jenkins/workspace/release_tidb_3.0/go/src/github.com/pingcap/tidb/executor/point_get.go:132 +0x1cc\ngithub.com/pingcap/tidb/executor.Next(0x2250900, 0xc03384aba0, 0x2257100, 0xc056d783c0, 0xc00f75b7d0, 0xc00f75b7d0, 0x3512910)\n\t/home/jenkins/workspace/release_tidb_3.0/go/src/github.com/pingcap/tidb/executor/executor.go:190 +0xbd\ngithub.com/pingcap/tidb/executor.(*recordSet).Next(0xc0672e1f90, 0x2250900, 0xc03384aba0, 0xc00f75b7d0, 0x0, 0x0)\n\t/home/jenkins/workspace/release_tidb_3.0/go/src/github.com/pingcap/tidb/executor/adapter.go:109 +0xb0\ngithub.com/pingcap/tidb/server.(*tidbResultSet).Next(0xc042438000, 0x2250900, 0xc03384aba0, 0xc00f75b7d0, 0x4, 0x400)\n\t/home/jenkins/workspace/release_tidb_3.0/go/src/github.com/pingcap/tidb/server/driver_tidb.go:365 +0x51\ngithub.com/pingcap/tidb/server.(*clientConn).writeChunks(0xc00f3391e0, 0x2250900, 0xc03384aba0, 0x22626c0, 0xc042438000, 0xc000009700, 0x2250900, 0xc03384aba0)\n\t/home/jenkins/workspace/release_tidb_3.0/go/src/github.com/pingcap/tidb/server/conn.go:1302 +0x319\ngithub.com/pingcap/tidb/server.(*clientConn).writeResultset(0xc00f3391e0, 0x2250900, 0xc03384aba0, 0x22626c0, 0xc042438000, 0xc000004300, 0x0, 0x0, 0x0)\n\t/home/jenkins/workspace/release_tidb_3.0/go/src/github.com/pingcap/tidb/server/conn.go:1268 +0x1a1\ngithub.com/pingcap/tidb/server.(*clientConn).handleQuery(0xc00f3391e0, 0x2250900, 0xc03384aba0, 0xc011b16381, 0x7d, 0x0, 0x0)\n\t/home/jenkins/workspace/release_tidb_3.0/go/src/github.com/pingcap/tidb/server/conn.go:1185 +0x212\ngithub.com/pingcap/tidb/server.(*clientConn).dispatch(0xc00f3391e0, 0x2250900, 0xc03384aba0, 0xc011b16381, 0x7e, 0x7e, 0x0, 0x0)\n\t/home/jenkins/workspace/release_tidb_3.0/go/src/github.com/pingcap/tidb/server/conn.go:895 +0x5c6\ngithub.com/pingcap/tidb/server.(*clientConn).Run(0xc00f3391e0, 0x2250900, 0xc03384aba0)\n\t/home/jenkins/workspace/release_tidb_3.0/go/src/github.com/pingcap/tidb/server/conn.go:650 +0x258\ngithub.com/pingcap/tidb/server.(*Server).onConn(0xc00aeccb80, 0xc00f3391e0)\n\t/home/jenkins/workspace/release_tidb_3.0/go/src/github.com/pingcap/tidb/server/server.go:440 +0x481\ncreated by github.com/pingcap/tidb/server.(*Server).Run\n\t/home/jenkins/workspace/release_tidb_3.0/go/src/github.com/pingcap/tidb/server/server.go:357 +0x83d\n"] [stack="github.com/pingcap/tidb/server.(*clientConn).Run.func1\n\t/home/jenkins/workspace/release_tidb_3.0/go/src/github.com/pingcap/tidb/server/conn.go:599\nruntime.gopanic\n\t/usr/local/go/src/runtime/panic.go:522\ngithub.com/pingcap/tidb/server.(*clientConn).writeResultset.func1\n\t/home/jenkins/workspace/release_tidb_3.0/go/src/github.com/pingcap/tidb/server/conn.go:1255\nruntime.gopanic\n\t/usr/local/go/src/runtime/panic.go:522\nruntime.panicmem\n\t/usr/local/go/src/runtime/panic.go:82\nruntime.sigpanic\n\t/usr/local/go/src/runtime/signal_unix.go:390\ngithub.com/pingcap/tidb/session.(*TxnState).LockKeys\n\t<autogenerated>:1\ngithub.com/pingcap/tidb/executor.(*PointGetExecutor).lockKeyIfNeeded\n\t/home/jenkins/workspace/release_tidb_3.0/go/src/github.com/pingcap/tidb/executor/point_get.go:152\ngithub.com/pingcap/tidb/executor.(*PointGetExecutor).Next\n\t/home/jenkins/workspace/release_tidb_3.0/go/src/github.com/pingcap/tidb/executor/point_get.go:132\ngithub.com/pingcap/tidb/executor.Next\n\t/home/jenkins/workspace/release_tidb_3.0/go/src/github.com/pingcap/tidb/executor/executor.go:190\ngithub.com/pingcap/tidb/executor.(*recordSet).Next\n\t/home/jenkins/workspace/release_tidb_3.0/go/src/github.com/pingcap/tidb/executor/adapter.go:109\ngithub.com/pingcap/tidb/server.(*tidbResultSet).Next\n\t/home/jenkins/workspace/release_tidb_3.0/go/src/github.com/pingcap/tidb/server/driver_tidb.go:365\ngithub.com/pingcap/tidb/server.(*clientConn).writeChunks\n\t/home/jenkins/workspace/release_tidb_3.0/go/src/github.com/pingcap/tidb/server/conn.go:1302\ngithub.com/pingcap/tidb/server.(*clientConn).writeResultset\n\t/home/jenkins/workspace/release_tidb_3.0/go/src/github.com/pingcap/tidb/server/conn.go:1268\ngithub.com/pingcap/tidb/server.(*clientConn).handleQuery\n\t/home/jenkins/workspace/release_tidb_3.0/go/src/github.com/pingcap/tidb/server/conn.go:1185\ngithub.com/pingcap/tidb/server.(*clientConn).dispatch\n\t/home/jenkins/workspace/release_tidb_3.0/go/src/github.com/pingcap/tidb/server/conn.go:895\ngithub.com/pingcap/tidb/server.(*clientConn).Run\n\t/home/jenkins/workspace/release_tidb_3.0/go/src/github.com/pingcap/tidb/server/conn.go:650\ngithub.com/pingcap/tidb/server.(*Server).onConn\n\t/home/jenkins/workspace/release_tidb_3.0/go/src/github.com/pingcap/tidb/server/server.go:440"]
[2020/01/08 15:34:28.000 +08:00] [ERROR] [conn.go:599] ["connection running loop panic"] [conn=26936198] [lastCmd="select * from tc_account_advance where merchant_id='100000591528' and platform_user_type=1 and `date`='2020-01-08' for update"] [err="\"invalid memory address or nil pointer dereference\""] [stack="goroutine 7267661209 [running]:\ngithub.com/pingcap/tidb/server.(*clientConn).Run.func1(0x2250900, 0xc040ed40f0, 0xc00f7ead00)\n\t/home/jenkins/workspace/release_tidb_3.0/go/src/github.com/pingcap/tidb/server/conn.go:597 +0xee\npanic(0x1d85fe0, 0x3198a30)\n\t/usr/local/go/src/runtime/panic.go:522 +0x1b5\ngithub.com/pingcap/tidb/server.(*clientConn).writeResultset.func1(0x0, 0x22626c0, 0xc01209dea0, 0xc017423778, 0x2250900, 0xc040ed40f0, 0xc00f7ead00)\n\t/home/jenkins/workspace/release_tidb_3.0/go/src/github.com/pingcap/tidb/server/conn.go:1255 +0x59c\npanic(0x1d85fe0, 0x3198a30)\n\t/usr/local/go/src/runtime/panic.go:522 +0x1b5\ngithub.com/pingcap/tidb/session.(*TxnState).LockKeys(0xc010f532d0, 0x2250900, 0xc040ed40f0, 0x5be104dfe5c000f, 0xc00d595960, 0x1, 0x1, 0x0, 0x0)\n\t<autogenerated>:1 +0x36\ngithub.com/pingcap/tidb/executor.(*PointGetExecutor).lockKeyIfNeeded(0xc0110b9800, 0x2250900, 0xc040ed40f0, 0xc010f27520, 0x13, 0x13, 0x70, 0x0)\n\t/home/jenkins/workspace/release_tidb_3.0/go/src/github.com/pingcap/tidb/executor/point_get.go:152 +0x144\ngithub.com/pingcap/tidb/executor.(*PointGetExecutor).Next(0xc0110b9800, 0x2250900, 0xc040ed40f0, 0xc043e89470, 0x0, 0x0)\n\t/home/jenkins/workspace/release_tidb_3.0/go/src/github.com/pingcap/tidb/executor/point_get.go:132 +0x1cc\ngithub.com/pingcap/tidb/executor.Next(0x2250900, 0xc040ed40f0, 0x2257100, 0xc0110b9800, 0xc043e89470, 0xc043e89470, 0x3512910)\n\t/home/jenkins/workspace/release_tidb_3.0/go/src/github.com/pingcap/tidb/executor/executor.go:190 +0xbd\ngithub.com/pingcap/tidb/executor.(*recordSet).Next(0xc01209de50, 0x2250900, 0xc040ed40f0, 0xc043e89470, 0x0, 0x0)\n\t/home/jenkins/workspace/release_tidb_3.0/go/src/github.com/pingcap/tidb/executor/adapter.go:109 +0xb0\ngithub.com/pingcap/tidb/server.(*tidbResultSet).Next(0xc01209dea0, 0x2250900, 0xc040ed40f0, 0xc043e89470, 0x4, 0x400)\n\t/home/jenkins/workspace/release_tidb_3.0/go/src/github.com/pingcap/tidb/server/driver_tidb.go:365 +0x51\ngithub.com/pingcap/tidb/server.(*clientConn).writeChunks(0xc00f7ead00, 0x2250900, 0xc040ed40f0, 0x22626c0, 0xc01209dea0, 0xc000003700, 0x2250900, 0xc040ed40f0)\n\t/home/jenkins/workspace/release_tidb_3.0/go/src/github.com/pingcap/tidb/server/conn.go:1302 +0x319\ngithub.com/pingcap/tidb/server.(*clientConn).writeResultset(0xc00f7ead00, 0x2250900, 0xc040ed40f0, 0x22626c0, 0xc01209dea0, 0xc000001e00, 0x0, 0x0, 0x0)\n\t/home/jenkins/workspace/release_tidb_3.0/go/src/github.com/pingcap/tidb/server/conn.go:1268 +0x1a1\ngithub.com/pingcap/tidb/server.(*clientConn).handleQuery(0xc00f7ead00, 0x2250900, 0xc040ed40f0, 0xc068973201, 0x7d, 0x0, 0x0)\n\t/home/jenkins/workspace/release_tidb_3.0/go/src/github.com/pingcap/tidb/server/conn.go:1185 +0x212\ngithub.com/pingcap/tidb/server.(*clientConn).dispatch(0xc00f7ead00, 0x2250900, 0xc040ed40f0, 0xc068973201, 0x7e, 0x7e, 0x0, 0x0)\n\t/home/jenkins/workspace/release_tidb_3.0/go/src/github.com/pingcap/tidb/server/conn.go:895 +0x5c6\ngithub.com/pingcap/tidb/server.(*clientConn).Run(0xc00f7ead00, 0x2250900, 0xc040ed40f0)\n\t/home/jenkins/workspace/release_tidb_3.0/go/src/github.com/pingcap/tidb/server/conn.go:650 +0x258\ngithub.com/pingcap/tidb/server.(*Server).onConn(0xc00aeccb80, 0xc00f7ead00)\n\t/home/jenkins/workspace/release_tidb_3.0/go/src/github.com/pingcap/tidb/server/server.go:440 +0x481\ncreated by github.com/pingcap/tidb/server.(*Server).Run\n\t/home/jenkins/workspace/release_tidb_3.0/go/src/github.com/pingcap/tidb/server/server.go:357 +0x83d\n"] [stack="github.com/pingcap/tidb/server.(*clientConn).Run.func1\n\t/home/jenkins/workspace/release_tidb_3.0/go/src/github.com/pingcap/tidb/server/conn.go:599\nruntime.gopanic\n\t/usr/local/go/src/runtime/panic.go:522\ngithub.com/pingcap/tidb/server.(*clientConn).writeResultset.func1\n\t/home/jenkins/workspace/release_tidb_3.0/go/src/github.com/pingcap/tidb/server/conn.go:1255\nruntime.gopanic\n\t/usr/local/go/src/runtime/panic.go:522\nruntime.panicmem\n\t/usr/local/go/src/runtime/panic.go:82\nruntime.sigpanic\n\t/usr/local/go/src/runtime/signal_unix.go:390\ngithub.com/pingcap/tidb/session.(*TxnState).LockKeys\n\t<autogenerated>:1\ngithub.com/pingcap/tidb/executor.(*PointGetExecutor).lockKeyIfNeeded\n\t/home/jenkins/workspace/release_tidb_3.0/go/src/github.com/pingcap/tidb/executor/point_get.go:152\ngithub.com/pingcap/tidb/executor.(*PointGetExecutor).Next\n\t/home/jenkins/workspace/release_tidb_3.0/go/src/github.com/pingcap/tidb/executor/point_get.go:132\ngithub.com/pingcap/tidb/executor.Next\n\t/home/jenkins/workspace/release_tidb_3.0/go/src/github.com/pingcap/tidb/executor/executor.go:190\ngithub.com/pingcap/tidb/executor.(*recordSet).Next\n\t/home/jenkins/workspace/release_tidb_3.0/go/src/github.com/pingcap/tidb/executor/adapter.go:109\ngithub.com/pingcap/tidb/server.(*tidbResultSet).Next\n\t/home/jenkins/workspace/release_tidb_3.0/go/src/github.com/pingcap/tidb/server/driver_tidb.go:365\ngithub.com/pingcap/tidb/server.(*clientConn).writeChunks\n\t/home/jenkins/workspace/release_tidb_3.0/go/src/github.com/pingcap/tidb/server/conn.go:1302\ngithub.com/pingcap/tidb/server.(*clientConn).writeResultset\n\t/home/jenkins/workspace/release_tidb_3.0/go/src/github.com/pingcap/tidb/server/conn.go:1268\ngithub.com/pingcap/tidb/server.(*clientConn).handleQuery\n\t/home/jenkins/workspace/release_tidb_3.0/go/src/github.com/pingcap/tidb/server/conn.go:1185\ngithub.com/pingcap/tidb/server.(*clientConn).dispatch\n\t/home/jenkins/workspace/release_tidb_3.0/go/src/github.com/pingcap/tidb/server/conn.go:895\ngithub.com/pingcap/tidb/server.(*clientConn).Run\n\t/home/jenkins/workspace/release_tidb_3.0/go/src/github.com/pingcap/tidb/server/conn.go:650\ngithub.com/pingcap/tidb/server.(*Server).onConn\n\t/home/jenkins/workspace/release_tidb_3.0/go/src/github.com/pingcap/tidb/server/server.go:440"]
[2020/01/08 15:34:28.584 +08:00] [ERROR] [conn.go:599] ["connection running loop panic"] [conn=26936199] [lastCmd="select * from tc_account_advance where merchant_id='100000591527' and platform_user_type=1 and `date`='2020-01-08' for update"] [err="\"invalid memory address or nil pointer dereference\""] [stack="goroutine 7267662341 [running]:\ngithub.com/pingcap/tidb/server.(*clientConn).Run.func1(0x2250900, 0xc00b831a40, 0xc03bf62c30)\n\t/home/jenkins/workspace/release_tidb_3.0/go/src/github.com/pingcap/tidb/server/conn.go:597 +0xee\npanic(0x1d85fe0, 0x3198a30)\n\t/usr/local/go/src/runtime/panic.go:522 +0x1b5\ngithub.com/pingcap/tidb/server.(*clientConn).writeResultset.func1(0x0, 0x22626c0, 0xc059130550, 0xc06efb9778, 0x2250900, 0xc00b831a40, 0xc03bf62c30)\n\t/home/jenkins/workspace/release_tidb_3.0/go/src/github.com/pingcap/tidb/server/conn.go:1255 +0x59c\npanic(0x1d85fe0, 0x3198a30)\n\t/usr/local/go/src/runtime/panic.go:522 +0x1b5\ngithub.com/pingcap/tidb/session.(*TxnState).LockKeys(0xc03ccda790, 0x2250900, 0xc00b831a40, 0x5be104e06f40051, 0xc028f592e0, 0x1, 0x1, 0x0, 0x0)\n\t<autogenerated>:1 +0x36\ngithub.com/pingcap/tidb/executor.(*PointGetExecutor).lockKeyIfNeeded(0xc044db1740, 0x2250900, 0xc00b831a40, 0xc016da0f80, 0x13, 0x13, 0x70, 0x0)\n\t/home/jenkins/workspace/release_tidb_3.0/go/src/github.com/pingcap/tidb/executor/point_get.go:152 +0x144\ngithub.com/pingcap/tidb/executor.(*PointGetExecutor).Next(0xc044db1740, 0x2250900, 0xc00b831a40, 0xc02e1d1830, 0x0, 0x0)\n\t/home/jenkins/workspace/release_tidb_3.0/go/src/github.com/pingcap/tidb/executor/point_get.go:132 +0x1cc\ngithub.com/pingcap/tidb/executor.Next(0x2250900, 0xc00b831a40, 0x2257100, 0xc044db1740, 0xc02e1d1830, 0xc02e1d1830, 0x3512910)\n\t/home/jenkins/workspace/release_tidb_3.0/go/src/github.com/pingcap/tidb/executor/executor.go:190 +0xbd\ngithub.com/pingcap/tidb/executor.(*recordSet).Next(0xc059130500, 0x2250900, 0xc00b831a40, 0xc02e1d1830, 0x0, 0x0)\n\t/home/jenkins/workspace/release_tidb_3.0/go/src/github.com/pingcap/tidb/executor/adapter.go:109 +0xb0\ngithub.com/pingcap/tidb/server.(*tidbResultSet).Next(0xc059130550, 0x2250900, 0xc00b831a40, 0xc02e1d1830, 0x4, 0x400)\n\t/home/jenkins/workspace/release_tidb_3.0/go/src/github.com/pingcap/tidb/server/driver_tidb.go:365 +0x51\ngithub.com/pingcap/tidb/server.(*clientConn).writeChunks(0xc03bf62c30, 0x2250900, 0xc00b831a40, 0x22626c0, 0xc059130550, 0xc000009700, 0x2250900, 0xc00b831a40)\n\t/home/jenkins/workspace/release_tidb_3.0/go/src/github.com/pingcap/tidb/server/conn.go:1302 +0x319\ngithub.com/pingcap/tidb/server.(*clientConn).writeResultset(0xc03bf62c30, 0x2250900, 0xc00b831a40, 0x22626c0, 0xc059130550, 0xc000009d00, 0x0, 0x0, 0x0)\n\t/home/jenkins/workspace/release_tidb_3.0/go/src/github.com/pingcap/tidb/server/conn.go:1268 +0x1a1\ngithub.com/pingcap/tidb/server.(*clientConn).handleQuery(0xc03bf62c30, 0x2250900, 0xc00b831a40, 0xc038a69c81, 0x7d, 0x0, 0x0)\n\t/home/jenkins/workspace/release_tidb_3.0/go/src/github.com/pingcap/tidb/server/conn.go:1185 +0x212\ngithub.com/pingcap/tidb/server.(*clientConn).dispatch(0xc03bf62c30, 0x2250900, 0xc00b831a40, 0xc038a69c81, 0x7e, 0x7e, 0x0, 0x0)\n\t/home/jenkins/workspace/release_tidb_3.0/go/src/github.com/pingcap/tidb/server/conn.go:895 +0x5c6\ngithub.com/pingcap/tidb/server.(*clientConn).Run(0xc03bf62c30, 0x2250900, 0xc00b831a40)\n\t/home/jenkins/workspace/release_tidb_3.0/go/src/github.com/pingcap/tidb/server/conn.go:650 +0x258\ngithub.com/pingcap/tidb/server.(*Server).onConn(0xc00aeccb80, 0xc03bf62c30)\n\t/home/jenkins/workspace/release_tidb_3.0/go/src/github.com/pingcap/tidb/server/server.go:440 +0x481\ncreated by github.com/pingcap/tidb/server.(*Server).Run\n\t/home/jenkins/workspace/release_tidb_3.0/go/src/github.com/pingcap/tidb/server/server.go:357 +0x83d\n"] [stack="github.com/pingcap/tidb/server.(*clientConn).Run.func1\n\t/home/jenkins/workspace/release_tidb_3.0/go/src/github.com/pingcap/tidb/server/conn.go:599\nruntime.gopanic\n\t/usr/local/go/src/runtime/panic.go:522\ngithub.com/pingcap/tidb/server.(*clientConn).writeResultset.func1\n\t/home/jenkins/workspace/release_tidb_3.0/go/src/github.com/pingcap/tidb/server/conn.go:1255\nruntime.gopanic\n\t/usr/local/go/src/runtime/panic.go:522\nruntime.panicmem\n\t/usr/local/go/src/runtime/panic.go:82\nruntime.sigpanic\n\t/usr/local/go/src/runtime/signal_unix.go:390\ngithub.com/pingcap/tidb/session.(*TxnState).LockKeys\n\t<autogenerated>:1\ngithub.com/pingcap/tidb/executor.(*PointGetExecutor).lockKeyIfNeeded\n\t/home/jenkins/workspace/release_tidb_3.0/go/src/github.com/pingcap/tidb/executor/point_get.go:152\ngithub.com/pingcap/tidb/executor.(*PointGetExecutor).Next\n\t/home/jenkins/workspace/release_tidb_3.0/go/src/github.com/pingcap/tidb/executor/point_get.go:132\ngithub.com/pingcap/tidb/executor.Next\n\t/home/jenkins/workspace/release_tidb_3.0/go/src/github.com/pingcap/tidb/executor/executor.go:190\ngithub.com/pingcap/tidb/executor.(*recordSet).Next\n\t/home/jenkins/workspace/release_tidb_3.0/go/src/github.com/pingcap/tidb/executor/adapter.go:109\ngithub.com/pingcap/tidb/server.(*tidbResultSet).Next\n\t/home/jenkins/workspace/release_tidb_3.0/go/src/github.com/pingcap/tidb/server/driver_tidb.go:365\ngithub.com/pingcap/tidb/server.(*clientConn).writeChunks\n\t/home/jenkins/workspace/release_tidb_3.0/go/src/github.com/pingcap/tidb/server/conn.go:1302\ngithub.com/pingcap/tidb/server.(*clientConn).writeResultset\n\t/home/jenkins/workspace/release_tidb_3.0/go/src/github.com/pingcap/tidb/server/conn.go:1268\ngithub.com/pingcap/tidb/server.(*clientConn).handleQuery\n\t/home/jenkins/workspace/release_tidb_3.0/go/src/github.com/pingcap/tidb/server/conn.go:1185\ngithub.com/pingcap/tidb/server.(*clientConn).dispatch\n\t/home/jenkins/workspace/release_tidb_3.0/go/src/github.com/pingcap/tidb/server/conn.go:895\ngithub.com/pingcap/tidb/server.(*clientConn).Run\n\t/home/jenkins/workspace/release_tidb_3.0/go/src/github.com/pingcap/tidb/server/conn.go:650\ngithub.com/pingcap/tidb/server.(*Server).onConn\n\t/home/jenkins/workspace/release_tidb_3.0/go/src/github.com/pingcap/tidb/server/server.go:440"]
[2020/01/08 15:34:31.048 +08:00] [ERROR] [conn.go:599] ["connection running loop panic"] [conn=26936209] [lastCmd="select * from tc_account_advance where merchant_id='100000591527' and platform_user_type=1 and `date`='2020-01-08' for update"] [err="\"invalid memory address or nil pointer dereference\""] [stack="goroutine 7267666782 [running]:\ngithub.com/pingcap/tidb/server.(*clientConn).Run.func1(0x2250900, 0xc042998900, 0xc0013cd450)\n\t/home/jenkins/workspace/release_tidb_3.0/go/src/github.com/pingcap/tidb/server/conn.go:597 +0xee\npanic(0x1d85fe0, 0x3198a30)\n\t/usr/local/go/src/runtime/panic.go:522 +0x1b5\ngithub.com/pingcap/tidb/server.(*clientConn).writeResultset.func1(0x0, 0x22626c0, 0xc00d2b4af0, 0xc003e5d778, 0x2250900, 0xc042998900, 0xc0013cd450)\n\t/home/jenkins/workspace/release_tidb_3.0/go/src/github.com/pingcap/tidb/server/conn.go:1255 +0x59c\npanic(0x1d85fe0, 0x3198a30)\n\t/usr/local/go/src/runtime/panic.go:522 +0x1b5\ngithub.com/pingcap/tidb/session.(*TxnState).LockKeys(0xc01104b1e0, 0x2250900, 0xc042998900, 0x5be104e2e040007, 0xc018b2e200, 0x1, 0x1, 0x0, 0x0)\n\t<autogenerated>:1 +0x36\ngithub.com/pingcap/tidb/executor.(*PointGetExecutor).lockKeyIfNeeded(0xc02e26ac00, 0x2250900, 0xc042998900, 0xc0e82b2f40, 0x13, 0x13, 0x70, 0x0)\n\t/home/jenkins/workspace/release_tidb_3.0/go/src/github.com/pingcap/tidb/executor/point_get.go:152 +0x144\ngithub.com/pingcap/tidb/executor.(*PointGetExecutor).Next(0xc02e26ac00, 0x2250900, 0xc042998900, 0xc02f7819b0, 0x0, 0x0)\n\t/home/jenkins/workspace/release_tidb_3.0/go/src/github.com/pingcap/tidb/executor/point_get.go:132 +0x1cc\ngithub.com/pingcap/tidb/executor.Next(0x2250900, 0xc042998900, 0x2257100, 0xc02e26ac00, 0xc02f7819b0, 0xc02f7819b0, 0x3512910)\n\t/home/jenkins/workspace/release_tidb_3.0/go/src/github.com/pingcap/tidb/executor/executor.go:190 +0xbd\ngithub.com/pingcap/tidb/executor.(*recordSet).Next(0xc00d2b4aa0, 0x2250900, 0xc042998900, 0xc02f7819b0, 0x0, 0x0)\n\t/home/jenkins/workspace/release_tidb_3.0/go/src/github.com/pingcap/tidb/executor/adapter.go:109 +0xb0\ngithub.com/pingcap/tidb/server.(*tidbResultSet).Next(0xc00d2b4af0, 0x2250900, 0xc042998900, 0xc02f7819b0, 0x4, 0x400)\n\t/home/jenkins/workspace/release_tidb_3.0/go/src/github.com/pingcap/tidb/server/driver_tidb.go:365 +0x51\ngithub.com/pingcap/tidb/server.(*clientConn).writeChunks(0xc0013cd450, 0x2250900, 0xc042998900, 0x22626c0, 0xc00d2b4af0, 0xc00000d700, 0x2250900, 0xc042998900)\n\t/home/jenkins/workspace/release_tidb_3.0/go/src/github.com/pingcap/tidb/server/conn.go:1302 +0x319\ngithub.com/pingcap/tidb/server.(*clientConn).writeResultset(0xc0013cd450, 0x2250900, 0xc042998900, 0x22626c0, 0xc00d2b4af0, 0xc000003300, 0x0, 0x0, 0x0)\n\t/home/jenkins/workspace/release_tidb_3.0/go/src/github.com/pingcap/tidb/server/conn.go:1268 +0x1a1\ngithub.com/pingcap/tidb/server.(*clientConn).handleQuery(0xc0013cd450, 0x2250900, 0xc042998900, 0xc03b22bb01, 0x7d, 0x0, 0x0)\n\t/home/jenkins/workspace/release_tidb_3.0/go/src/github.com/pingcap/tidb/server/conn.go:1185 +0x212\ngithub.com/pingcap/tidb/server.(*clientConn).dispatch(0xc0013cd450, 0x2250900, 0xc042998900, 0xc03b22bb01, 0x7e, 0x7e, 0x0, 0x0)\n\t/home/jenkins/workspace/release_tidb_3.0/go/src/github.com/pingcap/tidb/server/conn.go:895 +0x5c6\ngithub.com/pingcap/tidb/server.(*clientConn).Run(0xc0013cd450, 0x2250900, 0xc042998900)\n\t/home/jenkins/workspace/release_tidb_3.0/go/src/github.com/pingcap/tidb/server/conn.go:650 +0x258\ngithub.com/pingcap/tidb/server.(*Server).onConn(0xc00aeccb80, 0xc0013cd450)\n\t/home/jenkins/workspace/release_tidb_3.0/go/src/github.com/pingcap/tidb/server/server.go:440 +0x481\ncreated by github.com/pingcap/tidb/server.(*Server).Run\n\t/home/jenkins/workspace/release_tidb_3.0/go/src/github.com/pingcap/tidb/server/server.go:357 +0x83d\n"] [stack="github.com/pingcap/tidb/server.(*clientConn).Run.func1\n\t/home/jenkins/workspace/release_tidb_3.0/go/src/github.com/pingcap/tidb/server/conn.go:599\nruntime.gopanic\n\t/usr/local/go/src/runtime/panic.go:522\ngithub.com/pingcap/tidb/server.(*clientConn).writeResultset.func1\n\t/home/jenkins/workspace/release_tidb_3.0/go/src/github.com/pingcap/tidb/server/conn.go:1255\nruntime.gopanic\n\t/usr/local/go/src/runtime/panic.go:522\nruntime.panicmem\n\t/usr/local/go/src/runtime/panic.go:82\nruntime.sigpanic\n\t/usr/local/go/src/runtime/signal_unix.go:390\ngithub.com/pingcap/tidb/session.(*TxnState).LockKeys\n\t<autogenerated>:1\ngithub.com/pingcap/tidb/executor.(*PointGetExecutor).lockKeyIfNeeded\n\t/home/jenkins/workspace/release_tidb_3.0/go/src/github.com/pingcap/tidb/executor/point_get.go:152\ngithub.com/pingcap/tidb/executor.(*PointGetExecutor).Next\n\t/home/jenkins/workspace/release_tidb_3.0/go/src/github.com/pingcap/tidb/executor/point_get.go:132\ngithub.com/pingcap/tidb/executor.Next\n\t/home/jenkins/workspace/release_tidb_3.0/go/src/github.com/pingcap/tidb/executor/executor.go:190\ngithub.com/pingcap/tidb/executor.(*recordSet).Next\n\t/home/jenkins/workspace/release_tidb_3.0/go/src/github.com/pingcap/tidb/executor/adapter.go:109\ngithub.com/pingcap/tidb/server.(*tidbResultSet).Next\n\t/home/jenkins/workspace/release_tidb_3.0/go/src/github.com/pingcap/tidb/server/driver_tidb.go:365\ngithub.com/pingcap/tidb/server.(*clientConn).writeChunks\n\t/home/jenkins/workspace/release_tidb_3.0/go/src/github.com/pingcap/tidb/server/conn.go:1302\ngithub.com/pingcap/tidb/server.(*clientConn).writeResultset\n\t/home/jenkins/workspace/release_tidb_3.0/go/src/github.com/pingcap/tidb/server/conn.go:1268\ngithub.com/pingcap/tidb/server.(*clientConn).handleQuery\n\t/home/jenkins/workspace/release_tidb_3.0/go/src/github.com/pingcap/tidb/server/conn.go:1185\ngithub.com/pingcap/tidb/server.(*clientConn).dispatch\n\t/home/jenkins/workspace/release_tidb_3.0/go/src/github.com/pingcap/tidb/server/conn.go:895\ngithub.com/pingcap/tidb/server.(*clientConn).Run\n\t/home/jenkins/workspace/release_tidb_3.0/go/src/github.com/pingcap/tidb/server/conn.go:650\ngithub.com/pingcap/tidb/server.(*Server).onConn\n\t/home/jenkins/workspace/release_tidb_3.0/go/src/github.com/pingcap/tidb/server/server.go:440"]
[2020/01/08 15:34:32.703 +08:00] [ERROR] [conn.go:599] ["connection running loop panic"] [conn=26936217] [lastCmd="select * from tc_account_advance where merchant_id='100000591527' and platform_user_type=1 and `date`='2020-01-08' for update"] [err="\"invalid memory address or nil pointer dereference\""] [stack="goroutine 7267670570 [running]:\ngithub.com/pingcap/tidb/server.(*clientConn).Run.func1(0x2250900, 0xc00f76a7e0, 0xc00ecb0000)\n\t/home/jenkins/workspace/release_tidb_3.0/go/src/github.com/pingcap/tidb/server/conn.go:597 +0xee\npanic(0x1d85fe0, 0x3198a30)\n\t/usr/local/go/src/runtime/panic.go:522 +0x1b5\ngithub.com/pingcap/tidb/server.(*clientConn).writeResultset.func1(0x0, 0x22626c0, 0xc04cde33b0, 0xc03983f778, 0x2250900, 0xc00f76a7e0, 0xc00ecb0000)\n\t/home/jenkins/workspace/release_tidb_3.0/go/src/github.com/pingcap/tidb/server/conn.go:1255 +0x59c\npanic(0x1d85fe0, 0x3198a30)\n\t/usr/local/go/src/runtime/panic.go:522 +0x1b5\ngithub.com/pingcap/tidb/session.(*TxnState).LockKeys(0xc00fdda970, 0x2250900, 0xc00f76a7e0, 0x5be104e47cc0006, 0xc04528c320, 0x1, 0x1, 0x0, 0x0)\n\t<autogenerated>:1 +0x36\ngithub.com/pingcap/tidb/executor.(*PointGetExecutor).lockKeyIfNeeded(0xc0184dec00, 0x2250900, 0xc00f76a7e0, 0xc00d6e1080, 0x13, 0x13, 0x70, 0x0)\n\t/home/jenkins/workspace/release_tidb_3.0/go/src/github.com/pingcap/tidb/executor/point_get.go:152 +0x144\ngithub.com/pingcap/tidb/executor.(*PointGetExecutor).Next(0xc0184dec00, 0x2250900, 0xc00f76a7e0, 0xc032dd1320, 0x0, 0x0)\n\t/home/jenkins/workspace/release_tidb_3.0/go/src/github.com/pingcap/tidb/executor/point_get.go:132 +0x1cc\ngithub.com/pingcap/tidb/executor.Next(0x2250900, 0xc00f76a7e0, 0x2257100, 0xc0184dec00, 0xc032dd1320, 0xc032dd1320, 0x3512910)\n\t/home/jenkins/workspace/release_tidb_3.0/go/src/github.com/pingcap/tidb/executor/executor.go:190 +0xbd\ngithub.com/pingcap/tidb/executor.(*recordSet).Next(0xc04cde3360, 0x2250900, 0xc00f76a7e0, 0xc032dd1320, 0x0, 0x0)\n\t/home/jenkins/workspace/release_tidb_3.0/go/src/github.com/pingcap/tidb/executor/adapter.go:109 +0xb0\ngithub.com/pingcap/tidb/server.(*tidbResultSet).Next(0xc04cde33b0, 0x2250900, 0xc00f76a7e0, 0xc032dd1320, 0x4, 0x400)\n\t/home/jenkins/workspace/release_tidb_3.0/go/src/github.com/pingcap/tidb/server/driver_tidb.go:365 +0x51\ngithub.com/pingcap/tidb/server.(*clientConn).writeChunks(0xc00ecb0000, 0x2250900, 0xc00f76a7e0, 0x22626c0, 0xc04cde33b0, 0xc00000f700, 0x2250900, 0xc00f76a7e0)\n\t/home/jenkins/workspace/release_tidb_3.0/go/src/github.com/pingcap/tidb/server/conn.go:1302 +0x319\ngithub.com/pingcap/tidb/server.(*clientConn).writeResultset(0xc00ecb0000, 0x2250900, 0xc00f76a7e0, 0x22626c0, 0xc04cde33b0, 0xc000009700, 0x0, 0x0, 0x0)\n\t/home/jenkins/workspace/release_tidb_3.0/go/src/github.com/pingcap/tidb/server/conn.go:1268 +0x1a1\ngithub.com/pingcap/tidb/server.(*clientConn).handleQuery(0xc00ecb0000, 0x2250900, 0xc00f76a7e0, 0xc056ce9781, 0x7d, 0x0, 0x0)\n\t/home/jenkins/workspace/release_tidb_3.0/go/src/github.com/pingcap/tidb/server/conn.go:1185 +0x212\ngithub.com/pingcap/tidb/server.(*clientConn).dispatch(0xc00ecb0000, 0x2250900, 0xc00f76a7e0, 0xc056ce9781, 0x7e, 0x7e, 0x0, 0x0)\n\t/home/jenkins/workspace/release_tidb_3.0/go/src/github.com/pingcap/tidb/server/conn.go:895 +0x5c6\ngithub.com/pingcap/tidb/server.(*clientConn).Run(0xc00ecb0000, 0x2250900, 0xc00f76a7e0)\n\t/home/jenkins/workspace/release_tidb_3.0/go/src/github.com/pingcap/tidb/server/conn.go:650 +0x258\ngithub.com/pingcap/tidb/server.(*Server).onConn(0xc00aeccb80, 0xc00ecb0000)\n\t/home/jenkins/workspace/release_tidb_3.0/go/src/github.com/pingcap/tidb/server/server.go:440 +0x481\ncreated by github.com/pingcap/tidb/server.(*Server).Run\n\t/home/jenkins/workspace/release_tidb_3.0/go/src/github.com/pingcap/tidb/server/server.go:357 +0x83d\n"] [stack="github.com/pingcap/tidb/server.(*clientConn).Run.func1\n\t/home/jenkins/workspace/release_tidb_3.0/go/src/github.com/pingcap/tidb/server/conn.go:599\nruntime.gopanic\n\t/usr/local/go/src/runtime/panic.go:522\ngithub.com/pingcap/tidb/server.(*clientConn).writeResultset.func1\n\t/home/jenkins/workspace/release_tidb_3.0/go/src/github.com/pingcap/tidb/server/conn.go:1255\nruntime.gopanic\n\t/usr/local/go/src/runtime/panic.go:522\nruntime.panicmem\n\t/usr/local/go/src/runtime/panic.go:82\nruntime.sigpanic\n\t/usr/local/go/src/runtime/signal_unix.go:390\ngithub.com/pingcap/tidb/session.(*TxnState).LockKeys\n\t<autogenerated>:1\ngithub.com/pingcap/tidb/executor.(*PointGetExecutor).lockKeyIfNeeded\n\t/home/jenkins/workspace/release_tidb_3.0/go/src/github.com/pingcap/tidb/executor/point_get.go:152\ngithub.com/pingcap/tidb/executor.(*PointGetExecutor).Next\n\t/home/jenkins/workspace/release_tidb_3.0/go/src/github.com/pingcap/tidb/executor/point_get.go:132\ngithub.com/pingcap/tidb/executor.Next\n\t/home/jenkins/workspace/release_tidb_3.0/go/src/github.com/pingcap/tidb/executor/executor.go:190\ngithub.com/pingcap/tidb/executor.(*recordSet).Next\n\t/home/jenkins/workspace/release_tidb_3.0/go/src/github.com/pingcap/tidb/executor/adapter.go:109\ngithub.com/pingcap/tidb/server.(*tidbResultSet).Next\n\t/home/jenkins/workspace/release_tidb_3.0/go/src/github.com/pingcap/tidb/server/driver_tidb.go:365\ngithub.com/pingcap/tidb/server.(*clientConn).writeChunks\n\t/home/jenkins/workspace/release_tidb_3.0/go/src/github.com/pingcap/tidb/server/conn.go:1302\ngithub.com/pingcap/tidb/server.(*clientConn).writeResultset\n\t/home/jenkins/workspace/release_tidb_3.0/go/src/github.com/pingcap/tidb/server/conn.go:1268\ngithub.com/pingcap/tidb/server.(*clientConn).handleQuery\n\t/home/jenkins/workspace/release_tidb_3.0/go/src/github.com/pingcap/tidb/server/conn.go:1185\ngithub.com/pingcap/tidb/server.(*clientConn).dispatch\n\t/home/jenkins/workspace/release_tidb_3.0/go/src/github.com/pingcap/tidb/server/conn.go:895\ngithub.com/pingcap/tidb/server.(*clientConn).Run\n\t/home/jenkins/workspace/release_tidb_3.0/go/src/github.com/pingcap/tidb/server/conn.go:650\ngithub.com/pingcap/tidb/server.(*Server).onConn\n\t/home/jenkins/workspace/release_tidb_3.0/go/src/github.com/pingcap/tidb/server/server.go:440"]
[2020/01/08 15:34:36.781 +08:00] [ERROR] [conn.go:599] ["connection running loop panic"] [conn=26936234] [lastCmd="select * from tc_account_advance where merchant_id='100000591528' and platform_user_type=1 and `date`='2020-01-08' for update"] [err="\"invalid memory address or nil pointer dereference\""] [stack="goroutine 7267679214 [running]:\ngithub.com/pingcap/tidb/server.(*clientConn).Run.func1(0x2250900, 0xc01457e6c0, 0xc012f9e410)\n\t/home/jenkins/workspace/release_tidb_3.0/go/src/github.com/pingcap/tidb/server/conn.go:597 +0xee\npanic(0x1d85fe0, 0x3198a30)\n\t/usr/local/go/src/runtime/panic.go:522 +0x1b5\ngithub.com/pingcap/tidb/server.(*clientConn).writeResultset.func1(0x0, 0x22626c0, 0xc03b8be7d0, 0xc06efb9778, 0x2250900, 0xc01457e6c0, 0xc012f9e410)\n\t/home/jenkins/workspace/release_tidb_3.0/go/src/github.com/pingcap/tidb/server/conn.go:1255 +0x59c\npanic(0x1d85fe0, 0x3198a30)\n\t/usr/local/go/src/runtime/panic.go:522 +0x1b5\ngithub.com/pingcap/tidb/session.(*TxnState).LockKeys(0xc042dc5b40, 0x2250900, 0xc01457e6c0, 0x5be104e87140025, 0xc001042480, 0x1, 0x1, 0x0, 0x0)\n\t<autogenerated>:1 +0x36\ngithub.com/pingcap/tidb/executor.(*PointGetExecutor).lockKeyIfNeeded(0xc06776c0c0, 0x2250900, 0xc01457e6c0, 0xc054ac2560, 0x13, 0x13, 0x70, 0x0)\n\t/home/jenkins/workspace/release_tidb_3.0/go/src/github.com/pingcap/tidb/executor/point_get.go:152 +0x144\ngithub.com/pingcap/tidb/executor.(*PointGetExecutor).Next(0xc06776c0c0, 0x2250900, 0xc01457e6c0, 0xc0bcf3c5a0, 0x0, 0x0)\n\t/home/jenkins/workspace/release_tidb_3.0/go/src/github.com/pingcap/tidb/executor/point_get.go:132 +0x1cc\ngithub.com/pingcap/tidb/executor.Next(0x2250900, 0xc01457e6c0, 0x2257100, 0xc06776c0c0, 0xc0bcf3c5a0, 0xc0bcf3c5a0, 0x3512910)\n\t/home/jenkins/workspace/release_tidb_3.0/go/src/github.com/pingcap/tidb/executor/executor.go:190 +0xbd\ngithub.com/pingcap/tidb/executor.(*recordSet).Next(0xc03b8be780, 0x2250900, 0xc01457e6c0, 0xc0bcf3c5a0, 0x0, 0x0)\n\t/home/jenkins/workspace/release_tidb_3.0/go/src/github.com/pingcap/tidb/executor/adapter.go:109 +0xb0\ngithub.com/pingcap/tidb/server.(*tidbResultSet).Next(0xc03b8be7d0, 0x2250900, 0xc01457e6c0, 0xc0bcf3c5a0, 0x4, 0x400)\n\t/home/jenkins/workspace/release_tidb_3.0/go/src/github.com/pingcap/tidb/server/driver_tidb.go:365 +0x51\ngithub.com/pingcap/tidb/server.(*clientConn).writeChunks(0xc012f9e410, 0x2250900, 0xc01457e6c0, 0x22626c0, 0xc03b8be7d0, 0xc000009700, 0x2250900, 0xc01457e6c0)\n\t/home/jenkins/workspace/release_tidb_3.0/go/src/github.com/pingcap/tidb/server/conn.go:1302 +0x319\ngithub.com/pingcap/tidb/server.(*clientConn).writeResultset(0xc012f9e410, 0x2250900, 0xc01457e6c0, 0x22626c0, 0xc03b8be7d0, 0xc00000ad00, 0x0, 0x0, 0x0)\n\t/home/jenkins/workspace/release_tidb_3.0/go/src/github.com/pingcap/tidb/server/conn.go:1268 +0x1a1\ngithub.com/pingcap/tidb/server.(*clientConn).handleQuery(0xc012f9e410, 0x2250900, 0xc01457e6c0, 0xc054bd2101, 0x7d, 0x0, 0x0)\n\t/home/jenkins/workspace/release_tidb_3.0/go/src/github.com/pingcap/tidb/server/conn.go:1185 +0x212\ngithub.com/pingcap/tidb/server.(*clientConn).dispatch(0xc012f9e410, 0x2250900, 0xc01457e6c0, 0xc054bd2101, 0x7e, 0x7e, 0x0, 0x0)\n\t/home/jenkins/workspace/release_tidb_3.0/go/src/github.com/pingcap/tidb/server/conn.go:895 +0x5c6\ngithub.com/pingcap/tidb/server.(*clientConn).Run(0xc012f9e410, 0x2250900, 0xc01457e6c0)\n\t/home/jenkins/workspace/release_tidb_3.0/go/src/github.com/pingcap/tidb/server/conn.go:650 +0x258\ngithub.com/pingcap/tidb/server.(*Server).onConn(0xc00aeccb80, 0xc012f9e410)\n\t/home/jenkins/workspace/release_tidb_3.0/go/src/github.com/pingcap/tidb/server/server.go:440 +0x481\ncreated by github.com/pingcap/tidb/server.(*Server).Run\n\t/home/jenkins/workspace/release_tidb_3.0/go/src/github.com/pingcap/tidb/server/server.go:357 +0x83d\n"] [stack="github.com/pingcap/tidb/server.(*clientConn).Run.func1\n\t/home/jenkins/workspace/release_tidb_3.0/go/src/github.com/pingcap/tidb/server/conn.go:599\nruntime.gopanic\n\t/usr/local/go/src/runtime/panic.go:522\ngithub.com/pingcap/tidb/server.(*clientConn).writeResultset.func1\n\t/home/jenkins/workspace/release_tidb_3.0/go/src/github.com/pingcap/tidb/server/conn.go:1255\nruntime.gopanic\n\t/usr/local/go/src/runtime/panic.go:522\nruntime.panicmem\n\t/usr/local/go/src/runtime/panic.go:82\nruntime.sigpanic\n\t/usr/local/go/src/runtime/signal_unix.go:390\ngithub.com/pingcap/tidb/session.(*TxnState).LockKeys\n\t<autogenerated>:1\ngithub.com/pingcap/tidb/executor.(*PointGetExecutor).lockKeyIfNeeded\n\t/home/jenkins/workspace/release_tidb_3.0/go/src/github.com/pingcap/tidb/executor/point_get.go:152\ngithub.com/pingcap/tidb/executor.(*PointGetExecutor).Next\n\t/home/jenkins/workspace/release_tidb_3.0/go/src/github.com/pingcap/tidb/executor/point_get.go:132\ngithub.com/pingcap/tidb/executor.Next\n\t/home/jenkins/workspace/release_tidb_3.0/go/src/github.com/pingcap/tidb/executor/executor.go:190\ngithub.com/pingcap/tidb/executor.(*recordSet).Next\n\t/home/jenkins/workspace/release_tidb_3.0/go/src/github.com/pingcap/tidb/executor/adapter.go:109\ngithub.com/pingcap/tidb/server.(*tidbResultSet).Next\n\t/home/jenkins/workspace/release_tidb_3.0/go/src/github.com/pingcap/tidb/server/driver_tidb.go:365\ngithub.com/pingcap/tidb/server.(*clientConn).writeChunks\n\t/home/jenkins/workspace/release_tidb_3.0/go/src/github.com/pingcap/tidb/server/conn.go:1302\ngithub.com/pingcap/tidb/server.(*clientConn).writeResultset\n\t/home/jenkins/workspace/release_tidb_3.0/go/src/github.com/pingcap/tidb/server/conn.go:1268\ngithub.com/pingcap/tidb/server.(*clientConn).handleQuery\n\t/home/jenkins/workspace/release_tidb_3.0/go/src/github.com/pingcap/tidb/server/conn.go:1185\ngithub.com/pingcap/tidb/server.(*clientConn).dispatch\n\t/home/jenkins/workspace/release_tidb_3.0/go/src/github.com/pingcap/tidb/server/conn.go:895\ngithub.com/pingcap/tidb/server.(*clientConn).Run\n\t/home/jenkins/workspace/release_tidb_3.0/go/src/github.com/pingcap/tidb/server/conn.go:650\ngithub.com/pingcap/tidb/server.(*Server).onConn\n\t/home/jenkins/workspace/release_tidb_3.0/go/src/github.com/pingcap/tidb/server/server.go:440"]

请大佬帮忙看下

select for update 在 v3.0.1 有已知的 bug ,建议先升级到 v3.0.8 ,再验证一下是否还有问题。

我们这个是生产环境的报错,在尽量不升级版本的情况下,有其他的办法可以规避这个问题吗?

因为我们发现也不是所有的情况下select for update都会报这个错:joy:

稍等,确认中

确认过是 v3.0.1 的已知 bug ,最好升级一下解决问题。 相关 pr

嗯嗯,因为是生产环境,升级一个版本的话需要一段时间的测试,但是现阶段业务也需要保持正常运行的:joy:,我想知道在什么场景下会报这种错误,然后我们想办法在业务逻辑层面去规避这个问题

SQL 应该有 primaryKey={val} 这种情况,会走到 TiDB 的pointGet 逻辑,以加速。可以设置这个 select forupdate 的 where 修改为 pk=val and 1=1 试试。

select * from tc_account_advance where merchant_id='100000591528' and platform_user_type=1 and `date`='2020-01-08' for update

这一条sql是没有用到主键id的

可以加一下 1=1 试一下