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

tiup tpcc causes panic on partitioned table on unistore #45698

Open
mjonss opened this issue Jul 31, 2023 · 0 comments
Open

tiup tpcc causes panic on partitioned table on unistore #45698

mjonss opened this issue Jul 31, 2023 · 0 comments
Labels
component/test may-affects-5.2 This bug maybe affects 5.2.x versions. may-affects-5.3 This bug maybe affects 5.3.x versions. may-affects-5.4 This bug maybe affects 5.4.x versions. may-affects-6.1 may-affects-6.5 may-affects-7.1 severity/moderate sig/transaction SIG:Transaction type/bug The issue is confirmed as a bug.

Comments

@mjonss
Copy link
Contributor

mjonss commented Jul 31, 2023

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

make
./bin/tidb-server > tidb-s.log 2>&1 &
tiup bench tpcc --partition-type 1 --parts 3 --warehouses 3 prepare
tiup bench tpcc --partition-type 1 --parts 3 --warehouses 3 run

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

Success / tpcc test running

3. What did you see instead (Required)

[2023-07-31 16:19:29] execute run failed, err exec SELECT c_balance, c_first, c_middle, c_id FROM customer WHERE c_w_id = ? AND c_d_id = ? AND c_last = ? ORDER BY c_first failed Error 1105: runtime error: index out of range [3] with length 3
execute run failed, err exec SELECT c_balance, c_first, c_middle, c_id FROM customer WHERE c_w_id = ? AND c_d_id = ? AND c_last = ? ORDER BY c_first failed Error 1105: runtime error: index out of range [3] with length 3
Finished

From the log:

[2023/07/31 16:19:29.521 +02:00] [INFO] [conn.go:1081] ["command dispatched failed"] [conn=2097158] [connInfo="id:2097158, addr:127.0.0.1:58058 status:11, collation:utf8mb4_general_ci, user:root"] [command=Execute] [status="inTxn:1, autocommit:1"] [sql="SELECT c_balance, c_first, c_middle, c_id FROM customer WHERE c_w_id = ? AND c_d_id = ? AND c_last = ? ORDER BY c_first [arguments: (3, 7, \"ATIONESEOUGHT\")]"] [txn_mode=PESSIMISTIC] [timestamp=443236527510388737] [err="runtime error: index out of range [3] with length 3
github.com/pingcap/tidb/store/copr.(*copIteratorWorker).handleTask.func1
	/repos/tidb/store/copr/coprocessor.go:1103
runtime.gopanic
	/opt/go1.20.2/src/runtime/panic.go:884
runtime.goPanicIndex
	/opt/go1.20.2/src/runtime/panic.go:113
github.com/pingcap/tidb/tablecodec.decodeRestoredValuesV5
	/repos/tidb/tablecodec/tablecodec.go:819
github.com/pingcap/tidb/tablecodec.reEncodeHandleConsiderNewCollation
	/repos/tidb/tablecodec/tablecodec.go:786
github.com/pingcap/tidb/tablecodec.decodeIndexKvForClusteredIndexVersion1
	/repos/tidb/tablecodec/tablecodec.go:1744
github.com/pingcap/tidb/tablecodec.DecodeIndexKV
	/repos/tidb/tablecodec/tablecodec.go:927
github.com/pingcap/tidb/store/mockstore/unistore/cophandler.(*indexScanExec).Process
	/repos/tidb/store/mockstore/unistore/cophandler/mpp_exec.go:296
github.com/pingcap/tidb/store/mockstore/unistore/tikv/dbreader.(*DBReader).Scan
	/repos/tidb/store/mockstore/unistore/tikv/dbreader/db_reader.go:240
github.com/pingcap/tidb/store/mockstore/unistore/cophandler.(*indexScanExec).open
	/repos/tidb/store/mockstore/unistore/cophandler/mpp_exec.go:346
github.com/pingcap/tidb/store/mockstore/unistore/cophandler.mppExecute
	/repos/tidb/store/mockstore/unistore/cophandler/cop_handler.go:197
github.com/pingcap/tidb/store/mockstore/unistore/cophandler.buildAndRunMPPExecutor
	/repos/tidb/store/mockstore/unistore/cophandler/cop_handler.go:188
github.com/pingcap/tidb/store/mockstore/unistore/cophandler.handleCopDAGRequest
	/repos/tidb/store/mockstore/unistore/cophandler/cop_handler.go:144
github.com/pingcap/tidb/store/mockstore/unistore/cophandler.HandleCopRequestWithMPPCtx
	/repos/tidb/store/mockstore/unistore/cophandler/cop_handler.go:71
github.com/pingcap/tidb/store/mockstore/unistore/cophandler.HandleCopRequest
	/repos/tidb/store/mockstore/unistore/cophandler/cop_handler.go:59
github.com/pingcap/tidb/store/mockstore/unistore/tikv.(*Server).Coprocessor
	/repos/tidb/store/mockstore/unistore/tikv/server.go:576
github.com/pingcap/tidb/store/mockstore/unistore.(*RPCClient).SendRequest
	/repos/tidb/store/mockstore/unistore/rpc.go:246
github.com/pingcap/tidb/store/mockstore.(*clientRedirector).SendRequest
	/repos/tidb/store/mockstore/redirector.go:72
github.com/tikv/client-go/v2/tikv.(*CodecClient).SendRequest
	/go/pkg/mod/github.com/tikv/client-go/v2@v2.0.8-0.20230726071354-76d6d93e9856/tikv/test_util.go:60
github.com/tikv/client-go/v2/internal/client.interceptedClient.SendRequest.func1
	/go/pkg/mod/github.com/tikv/client-go/v2@v2.0.8-0.20230726071354-76d6d93e9856/internal/client/client_interceptor.go:59
github.com/pingcap/tidb/util/topsql/stmtstats.(*KvExecCounter).RPCInterceptor.func1.1
	/repos/tidb/util/topsql/stmtstats/kv_exec_count.go:57
github.com/tikv/client-go/v2/internal/client.buildResourceControlInterceptor.func1.1
	/go/pkg/mod/github.com/tikv/client-go/v2@v2.0.8-0.20230726071354-76d6d93e9856/internal/client/client_interceptor.go:120
github.com/tikv/client-go/v2/internal/client.interceptedClient.SendRequest
	/go/pkg/mod/github.com/tikv/client-go/v2@v2.0.8-0.20230726071354-76d6d93e9856/internal/client/client_interceptor.go:60
github.com/tikv/client-go/v2/internal/client.reqCollapse.SendRequest
	/go/pkg/mod/github.com/tikv/client-go/v2@v2.0.8-0.20230726071354-76d6d93e9856/internal/client/client_collapse.go:74
github.com/tikv/client-go/v2/internal/locate.(*RegionRequestSender).sendReqToRegion
	/go/pkg/mod/github.com/tikv/client-go/v2@v2.0.8-0.20230726071354-76d6d93e9856/internal/locate/region_request.go:1443
github.com/tikv/client-go/v2/internal/locate.(*RegionRequestSender).SendReqCtx
	/go/pkg/mod/github.com/tikv/client-go/v2@v2.0.8-0.20230726071354-76d6d93e9856/internal/locate/region_request.go:1251
github.com/tikv/client-go/v2/txnkv/txnsnapshot.(*ClientHelper).SendReqCtx
	/go/pkg/mod/github.com/tikv/client-go/v2@v2.0.8-0.20230726071354-76d6d93e9856/txnkv/txnsnapshot/client_helper.go:146
github.com/pingcap/tidb/store/copr.(*copIteratorWorker).handleTaskOnce
	/repos/tidb/store/copr/coprocessor.go:1205
github.com/pingcap/tidb/store/copr.(*copIteratorWorker).handleTask
	/repos/tidb/store/copr/coprocessor.go:1113
github.com/pingcap/tidb/store/copr.(*copIteratorWorker).run
	/repos/tidb/store/copr/coprocessor.go:806
runtime.goexit
	/opt/go1.20.2/src/runtime/asm_amd64.s:1598
SELECT c_balance, c_first, c_middle, c_id FROM customer WHERE c_w_id = ? AND c_d_id = ? AND c_last = ? ORDER BY c_first [arguments: (3, 7, \"ATIONESEOUGHT\")]"]

4. What is your TiDB version? (Required)

tidb_version(): Release Version: v7.3.0-alpha-293-geb49c39cf3
Edition: Community
Git Commit Hash: eb49c39cf3f7cdad3483ea8b04e31689deaed4b4
Git Branch: master
UTC Build Time: 2023-07-31 14:17:17
GoVersion: go1.20.2
Race Enabled: false
Check Table Before Drop: false
Store: unistore
@mjonss mjonss added the type/bug The issue is confirmed as a bug. label Jul 31, 2023
@ti-chi-bot ti-chi-bot bot added may-affects-5.2 This bug maybe affects 5.2.x versions. may-affects-5.3 This bug maybe affects 5.3.x versions. may-affects-5.4 This bug maybe affects 5.4.x versions. may-affects-6.1 may-affects-6.5 may-affects-7.1 labels Aug 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/test may-affects-5.2 This bug maybe affects 5.2.x versions. may-affects-5.3 This bug maybe affects 5.3.x versions. may-affects-5.4 This bug maybe affects 5.4.x versions. may-affects-6.1 may-affects-6.5 may-affects-7.1 severity/moderate sig/transaction SIG:Transaction type/bug The issue is confirmed as a bug.
Projects
None yet
Development

No branches or pull requests

3 participants