-
Notifications
You must be signed in to change notification settings - Fork 5.9k
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 server panic #12385
Comments
@AlexNewTao Thanks for your report, could you post the full error stack to help us identify the problem? BTW, it would be very helpful if you can provide the minimal reproduce step for this issue. |
log before panic
|
it's normal in query
but it will cause tidb panic when add where condition
UNIX_TIMESTAMP(if(t3.time is null, DATE_ADD(Now(), INTERVAL -1 YEAR), DATE_ADD(FROM_UNIXTIME(t3.time), INTERVAL 1 YEAR))) adding to call stack,It is very likely that these time functions trigger panic github.com/pingcap/tidb/types.(*MyDecimal).GetDigitsFrac(...)\n\t/go/src/github.com/pingcap/tidb/types/mydecimal.go:250\ngithub.com/pingcap/tidb/expression.(*fromUnixTimeFunctionClass).getFunction |
The formatted panic log is:
From the stack, seems this panic happens in the predicate pushdown rule. @AlexNewTao Could you provide us the table schema and the panic query? |
the table schema info is already given to 张曾钧,include panic query; For some reason, it is inconvenient to post directly here. btw,according to our test,If you modify the time function to a specific value, it will not cause panic, you can check it from this direction. |
Minimal Reproduce Stepsreproduced on my local machine, a minimal reproduce step is: drop table if exists t;
create table t(a bigint, b bigint);
-- the following sql cause the same panic:
select * from t t1 left join t t2 on t1.a=t2.a where from_unixtime(t2.b); The panic stack is:
RCAFor the outer join, which is In the above case, the filter is The panic happens when the planner tries to calculate the 1578 } else if isArg0Con {
1579 arg0, _, err1 := args[0].EvalDecimal(ctx, chunk.Row{})
1580 if err1 != nil {
1581 return sig, err1
1582 }
1583 fsp := int(arg0.GetDigitsFrac())
1584 if fsp > types.MaxFsp {
1585 fsp = types.MaxFsp
1586 }
1587 bf.tp.Decimal = fsp |
Bug Report
Please answer these questions before submitting your issue. Thanks!
If possible, provide a recipe for reproducing the error.
tidb panic
tidb server is normal,do not panic
tidb panic
panic日志
tidb-server -V
or runselect tidb_version();
on TiDB)?v 3.0.2
The text was updated successfully, but these errors were encountered: