-
Notifications
You must be signed in to change notification settings - Fork 244
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
Fix a potential NPE error in the sized hash join #12101
Conversation
Signed-off-by: Firestarman <[email protected]>
build |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The change is simple, but I don't understand the situation that caused the SpillableColumnarBatchResult to be closed twice. I look at the code and I don't see any code that could have caused it. But I have not dug that deeply. My main concern is that this might be masking something where we might have a used after free. I think it is more likely that this is the correct fix, but I would prefer it if I understood what happened.
I found a possible case of the duplicate close in the sized hash join, you can refer to the linked issue for more details. |
Post the possible case here. There was always a host memory OOM before this NPE error. And looks like the close of a SpillableHostConcatResult was called more than once for some exception cases.
|
close #12100
This PR fixes a potential NPE error in the sized hash join by checking the
buffer
's existence before actually closing it.Otherwise duplicate call to this
close
method will lead to a NPE error.It is a quite simple change so no tests for it.