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

Query tiflash_replica view with panic #48074

Closed
pcqz opened this issue Oct 30, 2023 · 2 comments
Closed

Query tiflash_replica view with panic #48074

pcqz opened this issue Oct 30, 2023 · 2 comments
Labels
affects-7.1 This bug affects the 7.1.x(LTS) versions. found/gs found by gs 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 severity/major sig/transaction SIG:Transaction type/bug The issue is confirmed as a bug.

Comments

@pcqz
Copy link

pcqz commented Oct 30, 2023

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

mysql> create table t(a int);
Query OK, 0 rows affected (0.08 sec)

mysql> alter table t set tiflash replica 1;
Query OK, 0 rows affected (0.08 sec)

mysql> set tidb_replica_read='prefer-leader';
Query OK, 0 rows affected (0.00 sec)

mysql> select * from information_schema.tiflash_replica;
ERROR 1105 (HY000): runtime error: invalid memory address or nil pointer dereference

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

Execute the query successfully.

3. What did you see instead (Required)

[err="runtime error: invalid memory address or nil pointer dereference\ngithub.com/pingcap/tidb/store/copr.(*copIteratorWorker).handleTask.func1\n\t/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tidb/store/copr/coprocessor.go:1098\nruntime.gopanic\n\t/usr/local/go/src/runtime/panic.go:884\nruntime.panicmem\n\t/usr/local/go/src/runtime/panic.go:260\nruntime.sigpanic\n\t/usr/local/go/src/runtime/signal_unix.go:841\ngithub.com/tikv/client-go/v2/internal/locate.(*Store).recordSlowScoreStat\n\t/go/pkg/mod/github.com/tikv/client-go/[email protected]/internal/locate/region_cache.go:2949\ngithub.com/tikv/client-go/v2/internal/locate.(*RegionRequestSender).sendReqToRegion\n\t/go/pkg/mod/github.com/tikv/client-go/[email protected]/internal/locate/region_request.go:1621\ngithub.com/tikv/client-go/v2/internal/locate.(*RegionRequestSender).SendReqCtx\n\t/go/pkg/mod/github.com/tikv/client-go/[email protected]/internal/locate/region_request.go:1353\ngithub.com/tikv/client-go/v2/txnkv/txnsnapshot.(*ClientHelper).SendReqCtx\n\t/go/pkg/mod/github.com/tikv/client-go/[email protected]/txnkv/txnsnapshot/client_helper.go:146\ngithub.com/pingcap/tidb/store/copr.(*copIteratorWorker).handleTaskOnce\n\t/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tidb/store/copr/coprocessor.go:1197\ngithub.com/pingcap/tidb/store/copr.(*copIteratorWorker).handleTask\n\t/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tidb/store/copr/coprocessor.go:1108\ngithub.com/pingcap/tidb/store/copr.(*copIteratorWorker).run\n\t/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tidb/store/copr/coprocessor.go:801\nruntime.goexit\n\t/usr/local/go/src/runtime/asm_amd64.s:1598"]

4. What is your TiDB version? (Required)

v7.1.2

@pcqz pcqz added the type/bug The issue is confirmed as a bug. label Oct 30, 2023
@pcqz
Copy link
Author

pcqz commented Oct 30, 2023

/found gs

@ti-chi-bot ti-chi-bot bot added the found/gs found by gs label Oct 30, 2023
@ti-chi-bot ti-chi-bot bot added 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 may-affects-7.5 labels Oct 30, 2023
@ti-chi-bot ti-chi-bot added affects-7.5 This bug affects the 7.5.x(LTS) versions. affects-7.1 This bug affects the 7.1.x(LTS) versions. and removed may-affects-7.1 may-affects-7.5 labels Oct 30, 2023
@cfzjywxk
Copy link
Contributor

Duplicate with #47531, already fixed in client-go tikv/client-go#1017.

@ti-chi-bot ti-chi-bot removed the affects-7.5 This bug affects the 7.5.x(LTS) versions. label Nov 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects-7.1 This bug affects the 7.1.x(LTS) versions. found/gs found by gs 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 severity/major sig/transaction SIG:Transaction type/bug The issue is confirmed as a bug.
Projects
None yet
Development

No branches or pull requests

5 participants
@cfzjywxk @jebter @pcqz @ti-chi-bot and others