-
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
panic when point get is executed under index merge join #16817
Comments
@zz-jason I can't reproduce this problem in my environment using your script and commands. I added |
I have reproduced the panic in a SMP environment. Change the When plan cache is disabled, the plan for the query is The root cause of the panic was introduced by #14775 originally, and the code which triggers the panic was introduced by #15400, but the panic is actually exposed by a recent PR #15627. RCA of the panic: in code snippet of
the I turned on the
The reason of the data race is that: PointGet is outer child of IndexMergeJoin, during I guess there may exist other problems / panics behind this single symptom described in this issue, because I checked out the commit before #15400, and the panic still happened, but in another code place, e.g, when calling I prefer @lzmhhh123 @SunRunAway you guys to fix this problem because you know more about the potential risks of the concurrent execution than me. BTW, another problem exposed by this issue is that, in https://github.com/pingcap/tidb/blob/master/executor/index_lookup_merge_join.go#L300, the outer worker only prints an ERROR log without reporting this error to upper level, so the query actually can succeed with empty result, which is unexpected. Please fix this as well. |
@qw4990 PTAL |
@SunRunAway the issue title is not reflecting the remaining unresolved problem. I think we can create another issue for that and close this one. |
Thanks for the reminding, #18070 and #18572 are reflecting this problem and both of them are resolved now. I'm going to close this issue. |
Bug Report
I wrote a customer sysbench test, the lua script file is named
issue.lua
, and the content is:Each connection constantly print a panic log as following when the sysbench runs:
1. What did you do?
step 1: start a tidb-server with mocktikv and plan cache enabled
step 2: prepare table and data via the sysbench test:
2. What did you expect to see?
3. What did you see instead?
panic as described above
4. What version of TiDB are you using? (
tidb-server -V
or runselect tidb_version();
on TiDB)The text was updated successfully, but these errors were encountered: