-
Notifications
You must be signed in to change notification settings - Fork 5.8k
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 crash for the error of cannot find mpp task #31636
Comments
minimal reproduce: create table t1(a int(11) primary key CLUSTERED);
alter table t1 set tiflash replica 1;
create table t2(a int(11), b char(20)) ;
alter table t2 set tiflash replica 1;
insert into t2 value (null, null);
explain SELECT * from t2 where t2.a = ALL ( SELECT b from t1 where t1.a = t2.a); reproduce in 5.3.0 & 5.4.0 reproduce in 5.2.0, but tidb won't crashed.
in 5.1-, planner will only read t1 from tikv, and when I enforce it read from tiflash, it will report:
|
Since very far versions, this statement fails to generate mpp tasks. But the reason for the crash is that when the task balancer is introduced, it is assumed that there is at least one task, causing the array to go out of bounds. balancer code: https://github.com/pingcap/tidb/pull/26130/files#diff-dec6808c7659579faf2c9c6f9d8b7a7e0d7095b61b9a07cfd2cbc9546a3c7c86R161 |
another original reproduce: set @@tidb_enforce_mpp=on;
sELECT /*+ hash_agg() */ count( distinct t2. `pk` ) from table_10_utf8mb4collate_utf8mb4_bin_undef as t2 where t2. `col_varchar(20)_key_signed` > ( SELECT `col_date_key_signed` from table_1000_binary_undef as t1 where not t1. `pk` <> t2. `col_int_undef_signed` order by pk asc limit 1 ); |
Please check whether the issue should be labeled with 'affects-x.y' or 'fixes-x.y.z', and then remove 'needs-more-info' label. |
Bug Report
Please answer these questions before submitting your issue. Thanks!
1. Minimal reproduce step (Required)
2. What did you expect to see? (Required)
successfully
3. What did you see instead (Required)
ERROR 1105 (HY000): cannot find mpp task
tidb crash
4. What is your TiDB version? (Required)
Release Version: v5.4.0
Edition: Community
Git Commit Hash: 65e167a
Git Branch: heads/refs/tags/v5.4.0
UTC Build Time: 2022-01-12 10:36:52
GoVersion: go1.16.4
Race Enabled: false
TiKV Min Version: v3.0.0-60965b006877ca7234adaced7890d7b029ed1306
Check Table Before Drop: false
The text was updated successfully, but these errors were encountered: