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

v5.1.0, tidb panicked with runtime error: index out of range [-1] #25812

Closed
seiya-annie opened this issue Jun 29, 2021 · 13 comments
Closed

v5.1.0, tidb panicked with runtime error: index out of range [-1] #25812

seiya-annie opened this issue Jun 29, 2021 · 13 comments
Assignees
Labels
affects-5.1 This bug affects 5.1.x versions. fixes-5.1.2 severity/major sig/planner SIG: Planner type/bug The issue is confirmed as a bug.

Comments

@seiya-annie
Copy link

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

execute SQL:
"select * from t1 where c_decimal <= all (select c_decimal from t2 where c_datetime > '2020-02-29 09:40:31') for update"
tables:
MySQL [db2__38f42204_2463_4648_aa21_50a0b66835a7]> show create table t1;
+-------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Table | Create Table |
+-------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| t1 | CREATE TABLE t1 (
c_int int(11) NOT NULL,
c_str varchar(40) NOT NULL,
c_datetime datetime DEFAULT NULL,
c_timestamp timestamp NULL DEFAULT NULL,
c_double double DEFAULT NULL,
c_decimal decimal(12,6) DEFAULT NULL,
PRIMARY KEY (c_int,c_str) /*T![clustered_index] NONCLUSTERED */,
KEY c_int_2 (c_int),
KEY c_str (c_str),
KEY c_datetime (c_datetime),
KEY c_timestamp (c_timestamp)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin
PARTITION BY HASH( c_int )
PARTITIONS 4 |
+-------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
1 row in set (0.01 sec)

MySQL [db2__38f42204_2463_4648_aa21_50a0b66835a7]> show create table t2;
+-------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Table | Create Table |
+-------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| t2 | CREATE TABLE t2 (
c_int int(11) DEFAULT NULL,
c_str varchar(40) DEFAULT NULL,
c_datetime datetime DEFAULT NULL,
c_timestamp timestamp NULL DEFAULT NULL,
c_double double DEFAULT NULL,
c_decimal decimal(12,6) DEFAULT NULL,
UNIQUE KEY c_str (c_str),
KEY c_decimal (c_decimal)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin |
+-------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
1 row in set (0.00 sec)

MySQL [db2__38f42204_2463_4648_aa21_50a0b66835a7]> select * from t1;
+-------+------------------+---------------------+---------------------+-----------+-----------+
| c_int | c_str | c_datetime | c_timestamp | c_double | c_decimal |
+-------+------------------+---------------------+---------------------+-----------+-----------+
| 9 | adoring wu | 2020-01-15 17:47:08 | 2020-05-22 01:40:57 | 96.112838 | 8.821000 |
| 13 | lucid driscoll | 2020-01-02 13:56:32 | 2020-02-20 01:52:23 | 99.68412 | 7.275000 |
| 4 | admiring jemison | 2020-04-19 20:49:03 | 2020-03-27 19:59:41 | 70.372352 | 4.402000 |
| 12 | vigorous meitner | 2020-01-23 19:04:40 | 2020-03-12 04:50:05 | 12.412372 | 6.663000 |
| 12 | charming taussig | 2020-06-15 21:56:09 | 2020-02-11 04:13:56 | 72.127955 | 0.379000 |
| 6 | agitated khorana | 2020-03-09 07:54:53 | 2020-02-08 11:21:23 | 85.321686 | 4.683000 |
| 3 | boring solomon | 2020-06-11 00:19:49 | 2020-01-10 16:10:38 | 16.63727 | 6.987000 |
| 3 | frosty wilbur | 2020-06-02 13:37:38 | 2020-05-12 21:39:32 | 55.727316 | 2.990000 |
| 11 | modest tharp | 2020-05-24 07:16:15 | 2020-06-22 02:20:09 | 18.242227 | 4.924000 |
+-------+------------------+---------------------+---------------------+-----------+-----------+
9 rows in set (0.01 sec)

MySQL [db2__38f42204_2463_4648_aa21_50a0b66835a7]> select * from t2;
+-------+-------------------------+---------------------+---------------------+-----------+-----------+
| c_int | c_str | c_datetime | c_timestamp | c_double | c_decimal |
+-------+-------------------------+---------------------+---------------------+-----------+-----------+
| 1 | wizardly dewdney | 2020-05-30 21:08:10 | 2020-02-27 22:36:51 | 80.593312 | 3.325000 |
| 2 | relaxed goldwasser | 2020-03-05 21:03:41 | 2020-05-21 06:27:39 | 76.052927 | 4.491000 |
| 10 | trusting blackburn | 2020-02-11 14:19:39 | 2020-03-22 18:39:15 | 85.288783 | 7.212000 |
| 11 | upbeat wu | 2020-03-01 11:58:03 | 2020-06-12 18:48:25 | 46.392315 | 9.294000 |
| 11 | elegant jemison | 2020-01-14 02:47:50 | 2020-01-26 22:04:34 | 24.716133 | 1.968000 |
| 12 | stoic lichterman | 2020-04-21 13:54:15 | 2020-06-30 05:02:56 | 66.913576 | 2.602000 |
| 10 | fervent lewin | 2020-04-05 03:45:15 | 2020-04-07 02:19:43 | 25.054941 | 9.160000 |
| 10 | intelligent stonebraker | 2020-05-03 12:34:35 | 2020-04-10 14:10:57 | 19.391548 | 6.024000 |
+-------+-------------------------+---------------------+---------------------+-----------+-----------+
8 rows in set (0.00 sec)

MySQL [db2__38f42204_2463_4648_aa21_50a0b66835a7]>

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

3. What did you see instead (Required)

[2021/06/29 10:35:02.269 +08:00] [ERROR] [projection.go:455] ["projection executor panicked"] [error="runtime error: index out of range [-1]"] [stack="goroutine 88941574 [running]:\ngithub.com/pingcap/tidb/util.GetStack(...)\n\t/home/jenkins/agent/workspace/optimization-build-tidb-linux-amd/go/src/github.com/pingcap/tidb/util/misc.go:73\ngithub.com/pingcap/tidb/executor.recoveryProjection(0xc0083c4c40, 0x352b340, 0xc0041609c0)\n\t/home/jenkins/agent/workspace/optimization-build-tidb-linux-amd/go/src/github.com/pingcap/tidb/executor/projection.go:454 +0x96\ngithub.com/pingcap/tidb/executor.(*projectionInputFetcher).run.func1(0xc00098af50, 0xc0045e4a80)\n\t/home/jenkins/agent/workspace/optimization-build-tidb-linux-amd/go/src/github.com/pingcap/tidb/executor/projection.go:356 +0x85\npanic(0x352b340, 0xc0041609c0)\n\t/usr/local/go/src/runtime/panic.go:965 +0x1b9\ngithub.com/pingcap/tidb/util/chunk.Row.GetInt64(...)\n\t/home/jenkins/agent/workspace/optimization-build-tidb-linux-amd/go/src/github.com/pingcap/tidb/util/chunk/row.go:52\ngithub.com/pingcap/tidb/executor.(*SelectLockExec).Next(0xc00361c000, 0x3bea2f8, 0xc00775ea50, 0xc0015b73b0, 0xc000a2ce28, 0x10c6d45)\n\t/home/jenkins/agent/workspace/optimization-build-tidb-linux-amd/go/src/github.com/pingcap/tidb/executor/executor.go:933 +0x845\ngithub.com/pingcap/tidb/executor.Next(0x3bea2f8, 0xc00775ea50, 0x3bee938, 0xc00361c000, 0xc0015b73b0, 0x0, 0x0)\n\t/home/jenkins/agent/workspace/optimization-build-tidb-linux-amd/go/src/github.com/pingcap/tidb/executor/executor.go:286 +0x2de\ngithub.com/pingcap/tidb/executor.(*projectionInputFetcher).run(0xc0045e4a80, 0x3bea2f8, 0xc00775ea50)\n\t/home/jenkins/agent/workspace/optimization-build-tidb-linux-amd/go/src/github.com/pingcap/tidb/executor/projection.go:380 +0x254\ncreated by github.com/pingcap/tidb/executor.(*ProjectionExec).prepare\n\t/home/jenkins/agent/workspace/optimization-build-tidb-linux-amd/go/src/github.com/pingcap/tidb/executor/projection.go:271 +0x73c\n"]
[2021/06/29 10:35:02.270 +08:00] [WARN] [session.go:1551] ["run statement failed"] [conn=413] [schemaVersion=1237] [error="runtime error: index out of range [-1]"] [session="{\n "currDBName": "db2__38f42204_2463_4648_aa21_50a0b66835a7",\n "id": 413,\n "preparedStmtCount": 1800,\n "status": 3,\n "strictMode": true,\n "txn": "425966725292097537",\n "user": {\n "Username": "root",\n "Hostname": "172.16.5.197",\n "CurrentUser": false,\n "AuthUsername": "root",\n "AuthHostname": "%"\n }\n}"]

4. What is your TiDB version? (Required)

| Release Version: v5.1.0
Edition: Community
Git Commit Hash: 7784454
Git Branch: heads/refs/tags/v5.1.0
UTC Build Time: 2021-06-22 03:26:55
GoVersion: go1.16.4
Race Enabled: false
TiKV Min Version: v3.0.0-60965b006877ca7234adaced7890d7b029ed1306
Check Table Before Drop: false |

@seiya-annie seiya-annie added type/bug The issue is confirmed as a bug. sig/planner SIG: Planner severity/major labels Jun 29, 2021
@seiya-annie
Copy link
Author

please check whether it is a known issue.

@winoros
Copy link
Member

winoros commented Jun 29, 2021

@seiya-annie Would you please provide the row data with INSERT? It's a little hard to re-create the table with data inserted

@seiya-annie
Copy link
Author

ok, i will found insert sql later

@seiya-annie
Copy link
Author

out_of_index.log

@seiya-annie
Copy link
Author

reproduce steps:

create table t1  (c_int int, c_str varchar(40), c_datetime datetime, c_timestamp timestamp, c_double double, c_decimal decimal(12, 6) , primary key(c_int)    , unique key(c_decimal)   , key(c_timestamp));
create table t2  (c_int int, c_str varchar(40), c_datetime datetime, c_timestamp timestamp, c_double double, c_decimal decimal(12, 6), primary key (c_int) , key(c_int)  , key(c_decimal)  ) partition by hash (c_int) partitions 4 ;


insert into t1 values (1, 'xenodochial banach', '2020-02-12 17:33:59', '2020-01-16 03:21:23', 94.757853, 5.002), (2, 'laughing tu', '2020-05-23 05:50:43', '2020-03-13 06:58:12', 98.115196, 4.090), (3, 'jolly knuth', '2020-03-09 05:32:16', '2020-02-17 08:14:52', 4.333927, 3.440), (4, 'confident euler', '2020-03-07 04:26:00', '2020-04-03 21:23:43', 36.852174, 7.802), (5, 'goofy cray', '2020-06-23 10:23:12', '2020-04-27 23:03:52', 24.461259, 4.070);
insert into t1 values (6, 'angry shaw', '2020-01-22 01:43:28', '2020-02-06 05:24:24', 6.765795, 5.865), (7, 'modest pasteur', '2020-03-07 05:43:33', '2020-05-29 14:17:11', 83.331384, 8.822), (8, 'suspicious varahamihira', '2020-04-29 09:41:47', '2020-03-09 01:40:35', 74.802889, 0.776), (9, 'fervent buck', '2020-04-04 09:33:20', '2020-01-01 19:33:31', 53.479705, 7.687), (10, 'blissful diffie', '2020-06-28 13:02:51', '2020-05-31 16:17:10', 75.008655, 2.313);

insert into t2 values (1, 'clever meitner', '2020-06-06 10:53:13', '2020-06-30 08:29:11', 40.866159, 7.668), (2, 'friendly greider', '2020-05-10 12:12:47', '2020-02-02 20:34:30', 30.753924, 0.409), (3, 'wizardly tharp', '2020-03-08 02:01:37', '2020-06-04 03:36:23', 8.946563, 0.322), (4, 'stoic dirac', '2020-02-28 13:53:10', '2020-02-21 21:13:03', 36.619695, 7.242), (5, 'frosty leavitt', '2020-03-06 02:25:33', '2020-04-16 07:06:16', 20.306697, 1.707);
insert into t2 values (6, 'pensive shannon', '2020-04-15 01:30:47', '2020-05-03 09:55:06', 70.002011, 9.583), (7, 'amazing fermi', '2020-05-19 15:18:21', '2020-02-13 16:57:28', 73.072089, 2.538), (8, 'reverent hugle', '2020-06-18 15:36:09', '2020-01-25 11:35:45', 16.469419, 1.151), (9, 'confident bell', '2020-01-17 11:43:21', '2020-03-10 07:12:36', 37.619867, 6.881), (10, 'vigilant diffie', '2020-01-26 21:11:18', '2020-03-12 12:16:53', 89.405786, 4.207);

#txn1:
begin;
update  t1, t2 set t1.c_timestamp = '2020-04-19 18:39:55', t2.c_str = 'gallant pasteur' where t1.c_int = t2.c_int and (t1.c_timestamp <= t2.c_timestamp);                       
select (select t2.c_str from t2 where t2.c_str > t1.c_str and t2.c_int in (2, 9, 5) order by t2.c_str limit 1 ) x from t1 /* force-unordered */ ;                               
insert into t2 values (11, 'xenodochial dewdney', '2020-01-06 17:11:19', '2020-01-06 05:06:00', 57.734162, 8.230);                                                              
insert into t2 values (10, 'fervent ganguly', '2020-01-13 22:07:41', '2020-05-05 23:43:21', 6.965909, 1.423), (4, 'charming turing', '2020-04-29 09:57:50', '2020-04-12 14:14:06', 22.665115, 2.317), (12, 'naughty almeida', '2020-03-13 19:06:55', '2020-05-24 06:54:45', 33.863869, 6.675) on duplicate key update c_int = c_int + 1, c_str = concat(c_int, ':', c_str);
update t1 set c_int = c_int + 10, c_str = 'keen raman' where c_int in (2, 9);                                                                                                   
select (select t2.c_int from t2 where t2.c_int < t1.c_int and t2.c_int = 5 order by t2.c_int limit 1 for update) x from t1 /* force-unordered */ ;                              
select (select t2.c_decimal from t2 where t2.c_decimal != t1.c_decimal and t2.c_int = 9 order by t2.c_decimal limit 1 for update) x from t1 /* force-unordered */ ;            
select * from t1 where c_str != all (select c_str from t2 where t1.c_int = t2.c_int or t1.c_int in (3, 7, 2)); 
delete /*+ HASH_JOIN(t1,t2) */  t2 from t1, t2 where t1.c_int = t2.c_int and t1.c_str != t2.c_str and t1.c_str in ('nifty goldberg', 'optimistic leakey', 'fervent driscoll'); 
select  * from t1, t2 where t1.c_str = 'gifted goldberg' for update;                                                                                                            
(select /*+ MERGE_JOIN(t1,t2) */  * from t1, t2 where t1.c_str <= t2.c_str or t1.c_str != t2.c_str for update) union all (select  * from t1, t2 where t1.c_int = t2.c_int );    
select (select t2.c_int from t2 where t2.c_int <= t1.c_int and t2.c_int in (3, 3, 2) order by t2.c_int limit 1 ) x from t1 /* force-unordered */  ;                             
select  * from t1, t2 where t1.c_int = t2.c_int  ;                                                                                                                              
select /*+ MERGE_JOIN(t1,t2) */  * from t1, t2 where t1.c_decimal != t2.c_decimal;
select * from t1 where c_int <> all (select c_int from t2 where c_datetime > '2020-04-12 14:00:22') ; 
delete  t1 from t1, t2 where t1.c_int = t2.c_int or t1.c_int = t2.c_int and t1.c_str > t2.c_str;   
update /*+ INL_HASH_JOIN(t1,t2) */  t1, t2 set t1.c_double = t2.c_double where t1.c_int = t2.c_int and (t1.c_int = t2.c_int);
(select  * from t1, t2 where t1.c_int = t2.c_int ) union (select /*+ HASH_JOIN(t1,t2) */  * from t1, t2 where t1.c_str = t2.c_str ); 
commit;
#txn2:
begin;
insert into t1 (c_int, c_str, c_datetime, c_double) values (4, 'awesome moore', '2020-04-15 05:42:00', 98.771454) ;
delete from t2 where c_str is null; 
insert into t1 values (12, 'flamboyant kepler', '2020-06-04 17:24:37', '2020-04-03 13:03:35', 26.264747, 5.261), (4, 'sleepy clarke', '2020-05-06 17:22:58', '2020-04-07 15:01:48', 35.920293, 4.621), (11, 'beautiful newton', '2020-06-17 00:59:25', '2020-04-21 20:11:34', 45.005982, 9.964) on duplicate key update c_int=values(c_int), c_str=values(c_str), c_double=values(c_double), c_timestamp=values(c_timestamp);
select * from t1 where c_timestamp in (select c_timestamp from t2 where t1.c_int in (2, 11, 4));  
delete from t1 where c_str is null ;  
delete from t1 where c_str is null;    
update  t1, t2 set t1.c_int = t2.c_int where t1.c_int = t2.c_int and (t1.c_int = 3); 
select (select t2.c_int from t2 where t2.c_int < t1.c_int and t2.c_int in (9, 8, 2) order by t2.c_int limit 1 ) x from t1 /* force-unordered */;
update t2 set c_int = c_int + 5, c_str = 'kind kalam' where (c_int, c_str) in ((8, 'laughing babbage'), (1, 'practical keller'), (6, 'vibrant kepler')) ;  
select (select t2.c_int from t2 where t2.c_int < t1.c_int and t2.c_int = 5 order by t2.c_int limit 1 ) x from t1 /* force-unordered */ ; 
select * from t1 where c_int <= all (select c_int from t2 where t1.c_int > t2.c_int) for update ;  
select (select t2.c_int from t2 where t2.c_int >= t1.c_int and t2.c_int = 5 order by t2.c_int limit 1 ) x from t1 /* force-unordered */ ; 
update  t1, t2 set t1.c_int = 2, t1.c_decimal = t2.c_decimal, t1.c_decimal = 1.078, t1.c_decimal = 4.719, t2.c_int = 7 where t1.c_int = t2.c_int and (t1.c_int = t2.c_int and t1.c_str != t2.c_str or t1.c_int < t2.c_int); 
update /*+ MERGE_JOIN(t1,t2) */  t1, t2 set t2.c_int = 5, t1.c_decimal = 6.018, t1.c_int = 10, t1.c_str = 'trusting kirch', t1.c_str = t2.c_str, t1.c_timestamp = '2020-05-12 10:01:43', t1.c_str = 'nostalgic bassi' where t1.c_int = t2.c_int and (t1.c_int = t2.c_int and t1.c_str <> t2.c_str) ; 
update t1 set c_double = c_decimal, c_decimal = 1.197 where c_int in (6, 8, 8) ; 
delete from t2 where c_int = 9 ;  
select (select t2.c_datetime from t2 where t1.c_str in ('charming williamson', 'strange wu', 'beautiful swartz') order by t2.c_datetime limit 1 ) x from t1 /* force-unordered */  ; 
select * from t1 where c_str > some (select c_str from t2 where c_decimal < 5) for update ;

@seiya-annie
Copy link
Author

[conn.go:801] ["connection running loop panic"] [conn=149] [lastSQL="select * from t1 where c_str > some (select c_str from t2 where c_decimal < 5) for update"] [err="runtime error: index out of range [-1]"] [stack="goroutine 169461 [running]:\ngithub.com/pingcap/tidb/server.(*clientConn).Run.func1(0x3c13118, 0xc002328570, 0xc0000df400)\n\t/home/jenkins/agent/workspace/optimization-build-tidb-linux-amd/go/src/github.com/pingcap/tidb/server/conn.go:799 +0xf5\npanic(0x3550540, 0xc00134e630)\n\t/usr/local/go/src/runtime/panic.go:965 +0x1b9\ngithub.com/pingcap/tidb/executor.(*ExecStmt).Exec.func1(0xc00399bd40, 0xc003bcab10, 0xc003bcaaf0)\n\t/home/jenkins/agent/workspace/optimization-build-tidb-linux-amd/go/src/github.com/pingcap/tidb/executor/adapter.go:332 +0x4d4\npanic(0x3550540, 0xc00134e630)\n\t/usr/local/go/src/runtime/panic.go:965 +0x1b9\ngithub.com/pingcap/tidb/util/chunk.Row.GetInt64(...)\n\t/home/jenkins/agent/workspace/optimization-build-tidb-linux-amd/go/src/github.com/pingcap/tidb/util/chunk/row.go:52\ngithub.com/pingcap/tidb/executor.(*SelectLockExec).Next(0xc001ae96b0, 0x3c13118, 0xc0036b55f0, 0xc0028e4f00, 0xc002913400, 0xc0006546c0)\n\t/home/jenkins/agent/workspace/optimization-build-tidb-linux-amd/go/src/github.com/pingcap/tidb/executor/executor.go:933 +0x845\ngithub.com/pingcap/tidb/executor.Next(0x3c13118, 0xc0036b55f0, 0x3c17738, 0xc001ae96b0, 0xc0028e4f00, 0x0, 0x0)\n\t/home/jenkins/agent/workspace/optimization-build-tidb-linux-amd/go/src/github.com/pingcap/tidb/executor/executor.go:286 +0x2de\ngithub.com/pingcap/tidb/executor.(*ExecStmt).runPessimisticSelectForUpdate(0xc00399bd40, 0x3c13118, 0xc0036b55f0, 0x3c17738, 0xc001ae96b0, 0x0, 0x0, 0x0, 0x0)\n\t/home/jenkins/agent/workspace/optimization-build-tidb-linux-amd/go/src/github.com/pingcap/tidb/executor/adapter.go:543 +0x285\ngithub.com/pingcap/tidb/executor.(*ExecStmt).handlePessimisticSelectForUpdate(0xc00399bd40, 0x3c13118, 0xc0036b55f0, 0x3c17738, 0xc001ae96b0, 0x57b5ce0, 0x3c13103, 0x0, 0x203000)\n\t/home/jenkins/agent/workspace/optimization-build-tidb-linux-amd/go/src/github.com/pingcap/tidb/executor/adapter.go:524 +0x5d\ngithub.com/pingcap/tidb/executor.(*ExecStmt).Exec(0xc00399bd40, 0x3c13118, 0xc0036b55f0, 0x0, 0x0, 0x0, 0x0)\n\t/home/jenkins/agent/workspace/optimization-build-tidb-linux-amd/go/src/github.com/pingcap/tidb/executor/adapter.go:416 +0xb49\ngithub.com/pingcap/tidb/session.runStmt(0x3c13118, 0xc003866930, 0xc00120da40, 0x3c29098, 0xc00399bd40, 0x0, 0x0, 0x0, 0x0)\n\t/home/jenkins/agent/workspace/optimization-build-tidb-linux-amd/go/src/github.com/pingcap/tidb/session/session.go:1635 +0x37f\ngithub.com/pingcap/tidb/session.(*session).ExecuteStmt(0xc00120da40, 0x3c13118, 0xc003866930, 0x3c2d7e8, 0xc0029a5950, 0x0, 0x0, 0x0, 0x0)\n\t/home/jenkins/agent/workspace/optimization-build-tidb-linux-amd/go/src/github.com/pingcap/tidb/session/session.go:1530 +0xaab\ngithub.com/pingcap/tidb/server.(*TiDBContext).ExecuteStmt(0xc002328d50, 0x3c13118, 0xc003866930, 0x3c2d7e8, 0xc0029a5950, 0xc000621680, 0x3c13118, 0xc003866930, 0xc003bcb0d0)\n\t/home/jenkins/agent/workspace/optimization-build-tidb-linux-amd/go/src/github.com/pingcap/tidb/server/driver_tidb.go:218 +0x68\ngithub.com/pingcap/tidb/server.(*clientConn).handleStmt(0xc0000df400, 0x3c13070, 0xc003866930, 0x3c2d7e8, 0xc0029a5950, 0x57e8de0, 0x0, 0x0, 0x1, 0x0, ...)\n\t/home/jenkins/agent/workspace/optimization-build-tidb-linux-amd/go/src/github.com/pingcap/tidb/server/conn.go:1691 +0x1bb\ngithub.com/pingcap/tidb/server.(*clientConn).handleQuery(0xc0000df400, 0x3c13070, 0xc001764c40, 0xc0046025a1, 0x59, 0x0, 0x0)\n\t/home/jenkins/agent/workspace/optimization-build-tidb-linux-amd/go/src/github.com/pingcap/tidb/server/conn.go:1563 +0x492\ngithub.com/pingcap/tidb/server.(*clientConn).dispatch(0xc0000df400, 0x3c13070, 0xc001764c40, 0xc0046025a0, 0x5a, 0x59, 0x0, 0x0)\n\t/home/jenkins/agent/workspace/optimization-build-tidb-linux-amd/go/src/github.com/pingcap/tidb/server/conn.go:1097 +0xafd\ngithub.com/pingcap/tidb/server.(*clientConn).Run(0xc0000df400, 0x3c13118, 0xc002328570)\n\t/home/jenkins/agent/workspace/optimization-build-tidb-linux-amd/go/src/github.com/pingcap/tidb/server/conn.go:860 +0x296\ngithub.com/pingcap/tidb/server.(*Server).onConn(0xc00101e1a0, 0xc0000df400)\n\t/home/jenkins/agent/workspace/optimization-build-tidb-linux-amd/go/src/github.com/p"]

@winoros
Copy link
Member

winoros commented Jul 28, 2021

It's strange that we cannot reproduce it on the master branch even if it's a branch before we checkout the v5.1 branch

@winoros winoros self-assigned this Jul 28, 2021
@seiya-annie
Copy link
Author

still exist in 5.2.0
|| Release Version: v5.2.0-alpha-549-g6720fcd40
Edition: Community
Git Commit Hash: 6720fcd
Git Branch: master
UTC Build Time: 2021-08-09 03:22:37
GoVersion: go1.16.4
Race Enabled: false
TiKV Min Version: v3.0.0-60965b006877ca7234adaced7890d7b029ed1306
Check Table Before Drop: false |

@yudongusa
Copy link

@seiya-annie It seems PR#28141 closed, and would you please verify if the problem is solved or still there?

@chrysan
Copy link
Contributor

chrysan commented Nov 22, 2021

/assign yisaer

@chrysan
Copy link
Contributor

chrysan commented Nov 22, 2021

/unassign winoros

@Yisaer
Copy link
Contributor

Yisaer commented Nov 23, 2021

The panic has been fixed in #26380, and the bug fixing has been merged in v5.1.2. plz upgrade to v5.1.2 or higher to avoid this problem.

@github-actions
Copy link

Please check whether the issue should be labeled with 'affects-x.y' or 'fixes-x.y.z', and then remove 'needs-more-info' label.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects-5.1 This bug affects 5.1.x versions. fixes-5.1.2 severity/major sig/planner SIG: Planner type/bug The issue is confirmed as a bug.
Projects
None yet
Development

No branches or pull requests

5 participants