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

panic when insert values #19278

Closed
3pointer opened this issue Aug 19, 2020 · 4 comments
Closed

panic when insert values #19278

3pointer opened this issue Aug 19, 2020 · 4 comments
Labels
type/bug The issue is confirmed as a bug.

Comments

@3pointer
Copy link
Contributor

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

  1. create database file_sort;

  2. go-ycsb load mysql -P workload -p mysql.host=127.0.0.1 -p mysql.port=4000 -p mysql.db=file_sort;
    workload:

        threadcount=10
        recordcount=15000
        operationcount=0
        workload=core
        readallfields=true
        readproportion=0
        updateproportion=0
        scanproportion=0
        insertproportion=0
        requestdistribution=uniform
    
  3. create table file_sort.USERTABLE2 like file_sort.USERTABLE;

  4. insert into file_sort.USERTABLE2 select * from file_sort.USERTABLE;

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

ERROR 1105 (HY000): runtime error: invalid memory address or nil pointer dereference

3. What did you see instead (Required)

insert succeed

4. What is your TiDB version? (Required)

Release Version: v4.0.0-beta.2-973-g67214e763
Edition: Community
Git Commit Hash: 67214e7
Git Branch: master
UTC Build Time: 2020-08-18 11:53:56
GoVersion: go1.13
Race Enabled: false
TiKV Min Version: v3.0.0-60965b006877ca7234adaced7890d7b029ed1306
Check Table Before Drop: false

@3pointer 3pointer added the type/bug The issue is confirmed as a bug. label Aug 19, 2020
@amyangfei
Copy link
Contributor

amyangfei commented Aug 19, 2020

fixed by #19277

@amyangfei
Copy link
Contributor

panic stack

[2020-08-18T13:41:28.408Z] [2020/08/18 21:41:08.492 +08:00] [ERROR] [conn.go:671] ["connection running loop panic"] [conn=44] [lastSQL="insert into file_sort.USERTABLE2 select * from file_sort.USERTABLE"] [err="runtime error: invalid memory address or nil pointer dereference"] [stack="goroutine 139296 [running]:\ngithub.com/pingcap/tidb/server.(*clientConn).Run.func1(0x3b61fe0, 0xc001d04420, 0xc001fbc000)\n\t/home/jenkins/agent/workspace/tidb_master/go/src/github.com/pingcap/tidb/server/conn.go:669 +0xee\npanic(0x31ce540, 0x52c8160)\n\t/usr/local/go/src/runtime/panic.go:679 +0x1b2\ngithub.com/pingcap/tidb/distsql.(*selectResultRuntimeStats).String(0xc002547ec0, 0xc00530b720, 0xd)\n\t/home/jenkins/agent/workspace/tidb_master/go/src/github.com/pingcap/tidb/distsql/select_result.go:397 +0xfc\ngithub.com/pingcap/tidb/planner/core.getRuntimeInfo(0x3ba8de0, 0xc0002c13b0, 0x3b94380, 0xc00166c2a0, 0x0, 0x18, 0x0, 0x0, 0x0, 0x0, ...)\n\t/home/jenkins/agent/workspace/tidb_master/go/src/github.com/pingcap/tidb/planner/core/common_plans.go:1058 +0x40d\ngithub.com/pingcap/tidb/planner/core.(*planEncoder).encodePlan(0xc000cf1890, 0x3b94380, 0xc00166c2a0, 0x3b94301, 0x1)\n\t/home/jenkins/agent/workspace/tidb_master/go/src/github.com/pingcap/tidb/planner/core/encode.go:75 +0xb5\ngithub.com/pingcap/tidb/planner/core.(*planEncoder).encodePlan(0xc000cf1890, 0x3b93580, 0xc001e98000, 0x1, 0x1)\n\t/home/jenkins/agent/workspace/tidb_master/go/src/github.com/pingcap/tidb/planner/core/encode.go:89 +0x938\ngithub.com/pingcap/tidb/planner/core.(*planEncoder).encodePlanTree(0xc000cf1890, 0x3b93580, 0xc001e98000, 0xc00166c2a0, 0x20)\n\t/home/jenkins/agent/workspace/tidb_master/go/src/github.com/pingcap/tidb/planner/core/encode.go:58 +0x82\ngithub.com/pingcap/tidb/planner/core.EncodePlan(0x3b93580, 0xc001e98000, 0x0, 0x0)\n\t/home/jenkins/agent/workspace/tidb_master/go/src/github.com/pingcap/tidb/planner/core/encode.go:52 +0x10e\ngithub.com/pingcap/tidb/executor.(*ExecStmt).SummaryStmt.func1(0xc001c0a281, 0x42)\n\t/home/jenkins/agent/workspace/tidb_master/go/src/github.com/pingcap/tidb/executor/adapter.go:960 +0x37\ngithub.com/pingcap/tidb/util/stmtsummary.newStmtSummaryByDigestElement(0xc0051daac8, 0x5f3bd7d8, 0x708, 0x708)\n\t/home/jenkins/agent/workspace/tidb_master/go/src/github.com/pingcap/tidb/util/stmtsummary/statement_summary.go:578 +0x61\ngithub.com/pingcap/tidb/util/stmtsummary.(*stmtSummaryByDigest).add.func1(0xc005fe9d80, 0xc0051daac8, 0x5f3bd7d8, 0x708, 0x18, 0x0, 0xc005fe9d00)\n\t/home/jenkins/agent/workspace/tidb_master/go/src/github.com/pingcap/tidb/util/stmtsummary/statement_summary.go:496 +0x1c8\ngithub.com/pingcap/tidb/util/stmtsummary.(*stmtSummaryByDigest).add(0xc005fe9d80, 0xc0051daac8, 0x5f3bd7d8, 0x708, 0x18)\n\t/home/jenkins/agent/workspace/tidb_master/go/src/github.com/pingcap/tidb/util/stmtsummary/statement_summary.go:507 +0x53\ngithub.com/pingcap/tidb/util/stmtsummary.(*stmtSummaryByDigestMap).AddStatement(0xc000307e00, 0xc0051daac8)\n\t/home/jenkins/agent/workspace/tidb_master/go/src/github.com/pingcap/tidb/util/stmtsummary/statement_summary.go:266 +0x1be\ngithub.com/pingcap/tidb/executor.(*ExecStmt).SummaryStmt(0xc001808510, 0x5d007354f2c0001)\n\t/home/jenkins/agent/workspace/tidb_master/go/src/github.com/pingcap/tidb/executor/adapter.go:981 +0x696\ngithub.com/pingcap/tidb/executor.(*ExecStmt).FinishExecuteStmt(0xc001808510, 0x5d007354f2c0002, 0xc0002c0001)\n\t/home/jenkins/agent/workspace/tidb_master/go/src/github.com/pingcap/tidb/executor/adapter.go:776 +0x62\ngithub.com/pingcap/tidb/session.runStmt(0x3b61fe0, 0xc001d04f30, 0xc0002c13b0, 0x3b6bee0, 0xc001808510, 0x0, 0x0, 0x0, 0x0)\n\t/home/jenkins/agent/workspace/tidb_master/go/src/github.com/pingcap/tidb/session/session.go:1226 +0x446\ngithub.com/pingcap/tidb/session.(*session).ExecuteStmt(0xc0002c13b0, 0x3b61fe0, 0xc001d04f30, 0x3b6b3e0, 0xc001de8750, 0x0, 0x0, 0x0, 0x0)\n\t/home/jenkins/agent/workspace/tidb_master/go/src/github.com/pingcap/tidb/session/session.go:1162 +0x7bc\ngithub.com/pingcap/tidb/server.(*TiDBContext).ExecuteStmt(0xc001d04780, 0x3b61fe0, 0xc001d04f30, 0x3b6b3e0, 0xc001de8750, 0xc002582090, 0x3b61fe0, 0xc001d04f30, 0xc00169b201)\n\t/home/jenkins/agent/workspace/tidb_master/go/src/github.com/pingcap/tidb/server/driver_tidb.go:198 +0x68\ngithub.com/pingcap/tidb/server.(*clientConn).handleStmt(0xc001fbc000, 0x3b61fe0, 0xc001d04f30, 0x3b6b3e0, 0xc001de8750, 0x5836de8, 0x0, 0x0, 0x1, 0"]

@ghost
Copy link

ghost commented Aug 19, 2020

@3pointer It looks like this issue has been fixed in master. Can you confirm?

@fzhedu
Copy link
Contributor

fzhedu commented Aug 24, 2020

fixed by #19277, so close it.

@fzhedu fzhedu closed this as completed Aug 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/bug The issue is confirmed as a bug.
Projects
None yet
Development

No branches or pull requests

3 participants