Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tidb panic: invalid memory address or nil pointer dereference #30252

Open
vivid392845427 opened this issue Nov 30, 2021 · 3 comments
Open

tidb panic: invalid memory address or nil pointer dereference #30252

vivid392845427 opened this issue Nov 30, 2021 · 3 comments
Assignees
Labels
affects-5.4 This bug affects the 5.4.x(LTS) versions. affects-6.0 affects-6.2 affects-6.3 affects-6.4 affects-6.5 This bug affects the 6.5.x(LTS) versions. affects-6.6 affects-7.0 affects-7.1 This bug affects the 7.1.x(LTS) versions. affects-7.5 This bug affects the 7.5.x(LTS) versions. affects-8.1 This bug affects the 8.1.x(LTS) versions. affects-8.5 This bug affects the 8.5.x(LTS) versions. severity/major sig/diagnosis SIG: Diagnosis type/bug The issue is confirmed as a bug.

Comments

@vivid392845427
Copy link

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

run auto testcase tipocket-bank2a on test-store

2. What did you expect to see? (Required)

testcase run success

3. What did you see instead (Required)

testcase run failed, found tidb panic:
2021/11/30 01:34:48 panic_check.go:85: [fatal] panic found:
	node[comp=tidb,ip=tipocket-bank2a-tidb-0.tipocket-bank2a-tidb-peer.tipocket-bank2a-1638230400.svc:4000,ns=tipocket-bank2a-1638230400,pod=tipocket-bank2a-tidb-0]:
		[2021/11/30 01:34:29.150 +00:00] [Error] [conn.go:1010] ["connection running loop panic"] [conn=259] [lastSQL="SELECT id, balance FROM bank2_accounts WHERE id IN (133020, 241884) FOR UPDATE"] [err="runtime error: invalid memory address or nil pointer dereference"] [stack="goroutine 4450 [running]:\ngithub.com/pingcap/tidb/server.(*clientConn).Run.func1(0x42fa5f0, 0xc002313680, 0xc002221e00)\n\t/home/jenkins/agent/workspace/build_tidb_multi_branch_master/go/src/github.com/pingcap/tidb/server/conn.go:1008 +0xf5\npanic(0x39424e0, 0x5a78460)\n\t/usr/local/go/src/runtime/panic.go:965 +0x1b9\ngithub.com/pingcap/tidb/parser.(*Digest).String(...)\n\t/home/jenkins/agent/workspace/build_tidb_multi_branch_master/go/src/github.com/pingcap/tidb/parser/digester.go:45\ngithub.com/pingcap/tidb/session.(*session).SetProcessInfo(0xc003b1c400, 0x0, 0x0, 0xc0617dc948fa68ae, 0x30e904ea51, 0x619fe40, 0xc00171a400, 0x0)\n\t/home/jenkins/agent/workspace/build_tidb_multi_branch_master/go/src/github.com/pingcap/tidb/session/session.go:1247 +0x3ea\ngithub.com/pingcap/tidb/server.(*clientConn).dispatch.func2(0xc002221e00, 0xc0617dc948fa68ae, 0x30e904ea51, 0x619fe40, 0x61d2f28, 0x43308a0, 0x61d2f28)\n\t/home/jenkins/agent/workspace/build_tidb_multi_branch_master/go/src/github.com/pingcap/tidb/server/conn.go:1269 +0x12a\npanic(0x39424e0, 0x5a78460)\n\t/usr/local/go/src/runtime/panic.go:971 +0x499\ngithub.com/pingcap/tidb/parser.(*Digest).String(...)\n\t/home/jenkins/agent/workspace/build_tidb_multi_branch_master/go/src/github.com/pingcap/tidb/parser/digester.go:45\ngithub.com/pingcap/tidb/session.(*session).SetProcessInfo(0xc003b1c400, 0xc00053f541, 0x4e, 0xc0617dc948fba22e, 0x30e90623e5, 0x619fe40, 0x1332e03, 0x0)\n\t/home/jenkins/agent/workspace/build_tidb_multi_branch_master/go/src/github.com/pingcap/tidb/session/session.go:1247 +0x3ea\ngithub.com/pingcap/tidb/session.(*session).ExecuteStmt(0xc003b1c400, 0x42fa5f0, 0xc00a893b60, 0x4319018, 0xc008b23c20, 0x0, 0x0, 0x0, 0x0)\n\t/home/jenkins/agent/workspace/build_tidb_multi_branch_master/go/src/github.com/pingcap/tidb/session/session.go:1548 +0x3f4\ngithub.com/pingcap/tidb/server.(*TiDBContext).ExecuteStmt(0xc003b36ea0, 0x42fa5f0, 0xc00a893b60, 0x4319018, 0xc008b23c20, 0xc00ab9d0e0, 0x42fa5f0, 0xc00a893b60, 0x0)\n\t/home/jenkins/agent/workspace/build_tidb_multi_branch_master/go/src/github.com/pingcap/tidb/server/driver_tidb.go:219 +0x6b\ngithub.com/pingcap/tidb/server.(*clientConn).handleStmt(0xc002221e00, 0x42fa548, 0xc00a893b60, 0x4319018, 0xc008b23c20, 0x61d2f28, 0x0, 0x0, 0x1, 0x0, ...)\n\t/home/jenkins/agent/workspace/build_tidb_multi_branch_master/go/src/github.com/pingcap/tidb/server/conn.go:1941 +0x1d1\ngithub.com/pingcap/tidb/server.(*clientConn).handleQuery(0xc002221e00, 0x42fa548, 0xc006269e00, 0xc00053f541, 0x4e, 0x0, 0x0)\n\t/home/jenkins/agent/workspace/build_tidb_multi_branch_master/go/src/github.com/pingcap/tidb/server/conn.go:1810 +0x498\ngithub.com/pingcap/tidb/server.(*clientConn).dispatch(0xc002221e00, 0x42fa548, 0xc006269e00, 0xc00053f540, 0x4f, 0x4e, 0x0, 0x0)\n\t/home/jenkins/agent/workspace/build_tidb_multi_branch_master/go/src/github.com/pingcap/tidb/server/conn.go:1315 +0xafd\ngithub.com/pingcap/tidb/server.(*clientConn).Run(0xc002221e00, 0x42fa5f0, 0xc002313680)\n\t/home/jenkins/agent/workspace/build_tidb_multi_branch_master/go/src/github.com/pingcap/tidb/server/conn.go:1070 +0x2bc\ngithub.com/pingcap/tidb/server.(*Server).onConn(0xc00030b520, 0xc002221e00)\n\t/home/jenkins/agent/workspace/build_tidb_multi_branch_master/go/src/github.com/pingcap/tidb/server/server.go:548 +0xa93\ncreated by github.com/pingcap/tidb/server.(*Server).startNetworkListener\n\t/home/jenkins/agent/workspace/build_tidb_multi_branch_master/go/src/github.com/pingcap/tidb/server/server.go:451 +0x91c\n"]

4. What is your TiDB version? (Required)

["Welcome to TiDB."] ["Release Version"=v5.4.0-alpha-263-g443f15ed4] [Edition=Community] ["Git Commit Hash"=443f15ed4edf9b4a7fc4a79fef17828fdd3ca984] ["Git Branch"=master] ["UTC Build Time"="2021-11-29 12:29:26"] [GoVersion=go1.16.4] ["Race Enabled"=false] ["Check Table Before Drop"=false] ["TiKV Min Version"=v3.0.0-60965b006877ca7234adaced7890d7b029ed1306]

@vivid392845427 vivid392845427 added type/bug The issue is confirmed as a bug. sig/sql-infra SIG: SQL Infra severity/major labels Nov 30, 2021
@bb7133 bb7133 added sig/diagnosis SIG: Diagnosis and removed sig/sql-infra SIG: SQL Infra labels Nov 30, 2021
@bb7133
Copy link
Member

bb7133 commented Nov 30, 2021

It looks that it is introduced by pingcap/parser#1231, PTAL @crazycs520

@zyguan zyguan changed the title tidb panic:invalid memory address or nil pointer dereference tidb panic: invalid memory address or nil pointer dereference Dec 2, 2021
@crazycs520
Copy link
Contributor

@vivid392845427 Can this case be reproduced?

@vivid392845427
Copy link
Author

@vivid392845427 Can this case be reproduced?

it is occasional,only appeared one time

@jebter jebter added the affects-5.4 This bug affects the 5.4.x(LTS) versions. label Jan 11, 2022
@VelocityLight VelocityLight added the affects-6.1 This bug affects the 6.1.x(LTS) versions. label May 20, 2022
@VelocityLight VelocityLight added the affects-6.5 This bug affects the 6.5.x(LTS) versions. label Dec 2, 2022
@crazycs520 crazycs520 removed the affects-6.1 This bug affects the 6.1.x(LTS) versions. label Jan 10, 2023
@VelocityLight VelocityLight added the affects-7.1 This bug affects the 7.1.x(LTS) versions. label Apr 20, 2023
@ti-chi-bot ti-chi-bot added the affects-7.5 This bug affects the 7.5.x(LTS) versions. label Oct 23, 2023
@ti-chi-bot ti-chi-bot added the affects-8.1 This bug affects the 8.1.x(LTS) versions. label Apr 9, 2024
@ti-chi-bot ti-chi-bot added the affects-8.5 This bug affects the 8.5.x(LTS) versions. label Nov 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects-5.4 This bug affects the 5.4.x(LTS) versions. affects-6.0 affects-6.2 affects-6.3 affects-6.4 affects-6.5 This bug affects the 6.5.x(LTS) versions. affects-6.6 affects-7.0 affects-7.1 This bug affects the 7.1.x(LTS) versions. affects-7.5 This bug affects the 7.5.x(LTS) versions. affects-8.1 This bug affects the 8.1.x(LTS) versions. affects-8.5 This bug affects the 8.5.x(LTS) versions. severity/major sig/diagnosis SIG: Diagnosis type/bug The issue is confirmed as a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants