-
Notifications
You must be signed in to change notification settings - Fork 6.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
ClickHouse raise an Assertion when execute select on hdfs engine on 21.8.3-lts #29251
Comments
More infomation:
Both clang and gcc can reproduce the problem on debug mode, but it is weird that it can't be reproduced with gcc on release mode on my machine, And I haven't try clang on release mode yet(May be it is because the assertion has been removed in release mode). Also I have change some code of libhdfs and ligsasl in order to extend the functionality, but I think it is irrelevant to this problem. So my recommendation is : fix it only if you can reproduce it as I do(I still believe the bug do exists as I analyzed theoretically above). And if it's convenient,please let me know whether it can be reproduced or not. Thanks! |
Actually it can be reproduced much easier than that. Just a small modification of libhdfs3 (ClickHouse/libhdfs3#13) and a debug build. In this case all our integration tests with hdfs failed with assertion.
btw, if you want you can make a PR with these changes here https://github.com/ClickHouse-Extras/libhdfs3. Extending functionality of libhdfs might be useful. |
Glad to here that, the work is still in progress now, we would consider to make a PR if we get things done at last。 And thanks for your efforts in solving this bug. It looks much professional than update impl->position() directly. 😆 |
Describe what's wrong
Clickhouse raise an Assertion when execute select on HDFS engine.
Does it reproduce on recent release?
The list of releases
very likely can be reproduced on recent release.
How to reproduce
Execute select on hdfs engine on 21.8.3.-lts with kerberos authentication.
CREATE TABLE
statements for all tables involvedAny data that fits table above with csv format.
Expected behavior
Error message and/or stacktrace
Additional context
saveUpToPosition just update the pos of BufferBase of ReadBufferFromHDFS , but not the BufferBase of ReadBufferFromHDFSImpl.
so when we execute eof function , the first hasPendingData and the next method are invoke from diffierent object 。hasPendingData is invoked on BufferBase of ReadBufferFromHDFS, and next is invoked on BufferBase of ReadBufferFromHDFSImpl which leads to the assertion.
May be we can solve the problem some how by rewriting the ReadBufferFromHDFS::nextImpl as below. But as I am not an expert on this , I can't make sure if it is the right way.
bool ReadBufferFromHDFS::nextImpl()
{
auto result = impl->next();
}
The text was updated successfully, but these errors were encountered: